From f5e1cc8856d792d71f1455ae70316fc37cff4e7c Mon Sep 17 00:00:00 2001 From: Xavier Ducrohet Date: Wed, 3 Jun 2009 16:07:36 -0700 Subject: 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. --- traceview/etc/traceview | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) (limited to 'traceview/etc') 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" "$@" -- cgit v1.1