diff options
author | Xavier Ducrohet <xav@google.com> | 2013-07-25 09:41:15 -0700 |
---|---|---|
committer | Xavier Ducrohet <xav@google.com> | 2013-07-25 09:52:38 -0700 |
commit | 88d4ec3d86fbb8639657df640f38426df561d328 (patch) | |
tree | ddd016d48ba8fe3cde1c753d752ebcc65d1cc39d /eclipse | |
parent | 50ab1922a3e5cb1f275dc7f49d7fe8bd8e090728 (diff) | |
download | sdk-88d4ec3d86fbb8639657df640f38426df561d328.zip sdk-88d4ec3d86fbb8639657df640f38426df561d328.tar.gz sdk-88d4ec3d86fbb8639657df640f38426df561d328.tar.bz2 |
Fix renderscript issue on windows.
The code was quoting paths send to the command line (even though
it's not required since the exec tasks an array of args instead of
a single line). However if the paths end with a trailing file separator
then, on windows only, this had the effect of escaping the quote,
basically adding with the path:
"c:\foo\" -> c:\foo"
Change-Id: Ia77b6404e69fda8df457fd1a56478296ee455898
Diffstat (limited to 'eclipse')
3 files changed, 9 insertions, 13 deletions
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/META-INF/MANIFEST.MF b/eclipse/plugins/com.android.ide.eclipse.adt/META-INF/MANIFEST.MF index 413c44c..1683324 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/META-INF/MANIFEST.MF +++ b/eclipse/plugins/com.android.ide.eclipse.adt/META-INF/MANIFEST.MF @@ -134,14 +134,7 @@ Export-Package: com.android.assetstudiolib;x-friends:="com.android.ide.eclipse.t com.android.tools.lint.client.api;x-friends:="com.android.ide.eclipse.tests", com.android.tools.lint.detector.api;x-friends:="com.android.ide.eclipse.tests", freemarker.cache;x-friends:="com.android.ide.eclipse.tests", - freemarker.template;x-friends:="com.android.ide.eclipse.tests", - org.kxml2.io;x-friends:="com.android.ide.eclipse.tests", - org.kxml2.kdom;x-friends:="com.android.ide.eclipse.tests", - org.kxml2.wap;x-friends:="com.android.ide.eclipse.tests", - org.kxml2.wap.syncml;x-friends:="com.android.ide.eclipse.tests", - org.kxml2.wap.wml;x-friends:="com.android.ide.eclipse.tests", - org.kxml2.wap.wv;x-friends:="com.android.ide.eclipse.tests", - org.xmlpull.v1;x-friends:="com.android.ide.eclipse.tests" + freemarker.template;x-friends:="com.android.ide.eclipse.tests" Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Import-Package: com.ibm.icu.text, org.eclipse.core.variables diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/RenderScriptProcessor.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/RenderScriptProcessor.java index 817b806..6a3f40d 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/RenderScriptProcessor.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/RenderScriptProcessor.java @@ -184,15 +184,15 @@ public class RenderScriptProcessor extends SourceProcessor { // create the command line String[] command = new String[15]; int index = 0; - command[index++] = quote(buildToolInfo.getPath(BuildToolInfo.PathId.LLVM_RS_CC)); + command[index++] = buildToolInfo.getPath(BuildToolInfo.PathId.LLVM_RS_CC); command[index++] = "-I"; //$NON-NLS-1$ - command[index++] = quote(buildToolInfo.getPath(BuildToolInfo.PathId.ANDROID_RS_CLANG)); + command[index++] = buildToolInfo.getPath(BuildToolInfo.PathId.ANDROID_RS_CLANG); command[index++] = "-I"; //$NON-NLS-1$ - command[index++] = quote(buildToolInfo.getPath(BuildToolInfo.PathId.ANDROID_RS)); + command[index++] = buildToolInfo.getPath(BuildToolInfo.PathId.ANDROID_RS); command[index++] = "-p"; //$NON-NLS-1$ - command[index++] = quote(genFolder.getLocation().toOSString()); + command[index++] = genFolder.getLocation().toOSString(); command[index++] = "-o"; //$NON-NLS-1$ - command[index++] = quote(rawFolder.getLocation().toOSString()); + command[index++] = rawFolder.getLocation().toOSString(); command[index++] = "-target-api"; //$NON-NLS-1$ command[index++] = Integer.toString(mTargetApi); diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/SourceProcessor.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/SourceProcessor.java index a82d54d..7dd92aa 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/SourceProcessor.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/SourceProcessor.java @@ -80,6 +80,9 @@ public abstract class SourceProcessor { */ public static String quote(String path) { if (SdkConstants.CURRENT_PLATFORM == SdkConstants.PLATFORM_WINDOWS) { + if (path.endsWith(File.separator)) { + path = path.substring(0, path.length() -1); + } return "\"" + path + "\""; } |