aboutsummaryrefslogtreecommitdiffstats
path: root/traceview
diff options
context:
space:
mode:
authorXavier Ducrohet <xav@android.com>2009-06-03 16:07:36 -0700
committerXavier Ducrohet <xav@android.com>2009-06-04 14:50:43 -0700
commitf5e1cc8856d792d71f1455ae70316fc37cff4e7c (patch)
tree13e8768d92dcdc37fd8f8f5012895e43890a5fd5 /traceview
parent0d8ba9e1b1a3db2773453844b8d129b5f97fe102 (diff)
downloadsdk-f5e1cc8856d792d71f1455ae70316fc37cff4e7c.tar.gz
sdk-f5e1cc8856d792d71f1455ae70316fc37cff4e7c.tar.bz2
sdk-f5e1cc8856d792d71f1455ae70316fc37cff4e7c.zip
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')
-rwxr-xr-xtraceview/etc/traceview27
-rw-r--r--traceview/src/Android.mk6
2 files changed, 29 insertions, 4 deletions
diff --git a/traceview/etc/traceview b/traceview/etc/traceview
index 1cc913d8f..fc7d8c025 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" "$@"
diff --git a/traceview/src/Android.mk b/traceview/src/Android.mk
index 7a006de4c..fd901f133 100644
--- a/traceview/src/Android.mk
+++ b/traceview/src/Android.mk
@@ -11,9 +11,9 @@ LOCAL_JAVA_LIBRARIES := \
androidprefs \
sdkstats \
swt \
- org.eclipse.jface_3.2.0.I20060605-1400 \
- org.eclipse.equinox.common_3.2.0.v20060603 \
- org.eclipse.core.commands_3.2.0.I20060605-1400
+ org.eclipse.jface_3.4.2.M20090107-0800 \
+ org.eclipse.equinox.common_3.4.0.v20080421-2006 \
+ org.eclipse.core.commands_3.4.0.I20080509-2000
LOCAL_MODULE := traceview
include $(BUILD_HOST_JAVA_LIBRARY)