aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xddms/app/etc/ddms.bat24
-rwxr-xr-xsdkmanager/app/etc/android.bat28
-rwxr-xr-xtraceview/etc/traceview.bat25
3 files changed, 59 insertions, 18 deletions
diff --git a/ddms/app/etc/ddms.bat b/ddms/app/etc/ddms.bat
index 5da9fb5..ffe536d 100755
--- a/ddms/app/etc/ddms.bat
+++ b/ddms/app/etc/ddms.bat
@@ -26,15 +26,12 @@ cd /d %~dp0
set jarfile=ddms.jar
set frameworkdir=
-set libdir=
if exist %frameworkdir%%jarfile% goto JarFileOk
set frameworkdir=lib\
- set libdir=lib\
if exist %frameworkdir%%jarfile% goto JarFileOk
set frameworkdir=..\framework\
- set libdir=..\lib\
:JarFileOk
@@ -45,4 +42,23 @@ if debug NEQ "%1" goto NoDebug
set jarpath=%frameworkdir%%jarfile%
-call java %java_debug% -Djava.ext.dirs=%frameworkdir% -Djava.library.path=%libdir% -Dcom.android.ddms.bindir= -jar %jarpath% %*
+if not defined ANDROID_SWT goto QueryArch
+ set swt_path=%ANDROID_SWT%
+ goto SwtDone
+
+:QueryArch
+
+ for /f %%a in ('java -jar %frameworkdir%archquery.jar') do set swt_path=%frameworkdir%%%a
+
+:SwtDone
+
+if exist %swt_path% goto SetPath
+ echo SWT folder '%swt_path%' does not exist.
+ echo Please set ANDROID_SWT to point to the folder containing swt.jar for your platform.
+ exit /B
+
+:SetPath
+set javaextdirs=%swt_path%;%frameworkdir%
+
+call java %java_debug% -Djava.ext.dirs=%javaextdirs% -Dcom.android.ddms.bindir= -jar %jarpath% %*
+
diff --git a/sdkmanager/app/etc/android.bat b/sdkmanager/app/etc/android.bat
index de950ed..b41105c 100755
--- a/sdkmanager/app/etc/android.bat
+++ b/sdkmanager/app/etc/android.bat
@@ -29,23 +29,33 @@ cd /d %~dp0
set jarfile=sdkmanager.jar
set frameworkdir=
-set libdir=
if exist %frameworkdir%%jarfile% goto JarFileOk
set frameworkdir=lib\
- set libdir=lib\
if exist %frameworkdir%%jarfile% goto JarFileOk
set frameworkdir=..\framework\
- set libdir=..\lib\
:JarFileOk
-if debug NEQ "%1" goto NoDebug
- set java_debug=-agentlib:jdwp=transport=dt_socket,server=y,address=8050,suspend=y
- shift 1
-:NoDebug
-
set jarpath=%frameworkdir%%jarfile%
-call java %java_debug% -Djava.ext.dirs=%frameworkdir% -Djava.library.path=%libdir% -Dcom.android.sdkmanager.toolsdir= -Dcom.android.sdkmanager.workdir="%workdir%" -jar %jarpath% %*
+if not defined ANDROID_SWT goto QueryArch
+ set swt_path=%ANDROID_SWT%
+ goto SwtDone
+
+:QueryArch
+
+ for /f %%a in ('java -jar %frameworkdir%archquery.jar') do set swt_path=%frameworkdir%%%a
+
+:SwtDone
+
+if exist %swt_path% goto SetPath
+ echo SWT folder '%swt_path%' does not exist.
+ echo Please set ANDROID_SWT to point to the folder containing swt.jar for your platform.
+ exit /B
+
+:SetPath
+set javaextdirs=%swt_path%;%frameworkdir%
+
+call java -Djava.ext.dirs=%javaextdirs% -Dcom.android.sdkmanager.toolsdir= -Dcom.android.sdkmanager.workdir="%workdir%" -jar %jarpath% %*
diff --git a/traceview/etc/traceview.bat b/traceview/etc/traceview.bat
index a9b573d..2da8a3b 100755
--- a/traceview/etc/traceview.bat
+++ b/traceview/etc/traceview.bat
@@ -20,24 +20,39 @@ rem Set up prog to be the path of this script, including following symlinks,
rem and set up progdir to be the fully-qualified pathname of its directory.
set prog=%~f0
-rem Change current directory and drive to where traceview.bat is, to avoid
+rem Change current directory and drive to where the script is, to avoid
rem issues with directories containing whitespaces.
cd /d %~dp0
set jarfile=traceview.jar
set frameworkdir=
-set libdir=
if exist %frameworkdir%%jarfile% goto JarFileOk
set frameworkdir=lib\
- set libdir=lib\
if exist %frameworkdir%%jarfile% goto JarFileOk
set frameworkdir=..\framework\
- set libdir=..\lib\
:JarFileOk
set jarpath=%frameworkdir%%jarfile%
-java -Djava.ext.dirs=%frameworkdir% -Djava.library.path=%libdir% -jar %jarpath% %*
+if not defined ANDROID_SWT goto QueryArch
+ set swt_path=%ANDROID_SWT%
+ goto SwtDone
+
+:QueryArch
+
+ for /f %%a in ('java -jar %frameworkdir%archquery.jar') do set swt_path=%frameworkdir%%%a
+
+:SwtDone
+
+if exist %swt_path% goto SetPath
+ echo SWT folder '%swt_path%' does not exist.
+ echo Please set ANDROID_SWT to point to the folder containing swt.jar for your platform.
+ exit /B
+
+:SetPath
+set javaextdirs=%swt_path%;%frameworkdir%
+
+call java -Djava.ext.dirs=%javaextdirs% -jar %jarpath% %*