aboutsummaryrefslogtreecommitdiffstats
path: root/traceview/etc
diff options
context:
space:
mode:
authorAndroid (Google) Code Review <android-gerrit@google.com>2009-06-04 15:00:45 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2009-06-04 15:00:45 -0700
commitadaadbbe9db20f9aa41b32e1d8c664a88e82aaf0 (patch)
treed9e54206090ca19e3a0243497f9c2ffccb25625f /traceview/etc
parent7580545dc0aade804f97cf6a326a03bb0c5bfefc (diff)
parentf5e1cc8856d792d71f1455ae70316fc37cff4e7c (diff)
downloadsdk-adaadbbe9db20f9aa41b32e1d8c664a88e82aaf0.zip
sdk-adaadbbe9db20f9aa41b32e1d8c664a88e82aaf0.tar.gz
sdk-adaadbbe9db20f9aa41b32e1d8c664a88e82aaf0.tar.bz2
Merge change 3195 into donut
* changes: Change the SDK, DDMS and Traceview to work with the new SWT libraries.
Diffstat (limited to 'traceview/etc')
-rwxr-xr-xtraceview/etc/traceview27
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" "$@"