diff options
author | Xavier Ducrohet <xav@android.com> | 2009-06-03 16:07:36 -0700 |
---|---|---|
committer | Xavier Ducrohet <xav@android.com> | 2009-06-04 14:50:43 -0700 |
commit | f5e1cc8856d792d71f1455ae70316fc37cff4e7c (patch) | |
tree | 13e8768d92dcdc37fd8f8f5012895e43890a5fd5 /traceview/etc | |
parent | 0d8ba9e1b1a3db2773453844b8d129b5f97fe102 (diff) | |
download | sdk-f5e1cc8856d792d71f1455ae70316fc37cff4e7c.zip sdk-f5e1cc8856d792d71f1455ae70316fc37cff4e7c.tar.gz sdk-f5e1cc8856d792d71f1455ae70316fc37cff4e7c.tar.bz2 |
Change the SDK, DDMS and Traceview to work with the new SWT libraries.
The SDK now contains 32 and 64 bit version of SWT. DDMS and Traceview
use the archquery java app to check the architecture of the VM to decide
which version of SWT should be used to run the apps.
Diffstat (limited to 'traceview/etc')
-rwxr-xr-x | traceview/etc/traceview | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/traceview/etc/traceview b/traceview/etc/traceview index 1cc913d..fc7d8c0 100755 --- a/traceview/etc/traceview +++ b/traceview/etc/traceview @@ -97,5 +97,30 @@ else jarpath="$frameworkdir/$jarfile" fi +# Figure out the path to the swt.jar for the current architecture. +# if ANDROID_SWT is defined, then just use this. +# else, if running in the Android source tree, then look for the correct swt folder in prebuilt +# else, look for the correct swt folder in the SDK under tools/lib/ +swtpath="" +if [ -n "$ANDROID_SWT" ]; then + swtpath="$ANDROID_SWT" +else + vmarch=`java -jar "${frameworkdir}"/archquery.jar` + if [ -n "$ANDROID_BUILD_TOP" ]; then + osname=`uname -s | tr A-Z a-z` + swtpath="${ANDROID_BUILD_TOP}/prebuilt/${osname}-${vmarch}/swt" + else + swtpath="${frameworkdir}/${vmarch}" + fi +fi + +# Combine the swtpath and the framework dir path. +if [ -d "$swtpath" ]; then + frameworkdir="${swtpath}:${frameworkdir}" +else + echo "SWT folder '${swtpath}' does not exist." + echo "Please export ANDROID_SWT to point to the folder containing swt.jar for your platform." + exit 1 +fi -exec "$javaCmd" $javaOpts -Djava.ext.dirs="$frameworkdir" -Djava.library.path="$libdir" -jar "$jarpath" "$@" +exec "$javaCmd" $javaOpts -Djava.ext.dirs="$frameworkdir" -jar "$jarpath" "$@" |