File: fix-hierarchyviewer-script-paths.patch

package info (click to toggle)
androidsdk-tools 22.2%2Bgit20130830~92d25d6-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 5,944 kB
  • ctags: 9,691
  • sloc: java: 67,001; sh: 270; makefile: 34
file content (62 lines) | stat: -rw-r--r-- 2,182 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
From 465d2f18b59f855983b3c9259447c379d47d2a03 Mon Sep 17 00:00:00 2001
From: Jakub Adam <jakub.adam@tieto.com>
Date: Fri, 15 Mar 2013 12:22:11 +0100
Subject: [PATCH] fix-hierarchyviewer-script-paths

---
 hierarchyviewer2/app/etc/hierarchyviewer |   27 ++-------------------------
 1 file changed, 2 insertions(+), 25 deletions(-)

diff --git a/hierarchyviewer2/app/etc/hierarchyviewer b/hierarchyviewer2/app/etc/hierarchyviewer
index a0cc5f9..76ff55f 100755
--- a/hierarchyviewer2/app/etc/hierarchyviewer
+++ b/hierarchyviewer2/app/etc/hierarchyviewer
@@ -35,7 +35,7 @@ prog="${progdir}"/`basename "${prog}"`
 cd "${oldwd}"
 
 jarfile=hierarchyviewer2.jar
-frameworkdir="$progdir"
+frameworkdir="/usr/share/java"
 libdir="$progdir"
 if [ ! -r "$frameworkdir/$jarfile" ]
 then
@@ -78,29 +78,6 @@ fi
 
 jarpath="$frameworkdir/$jarfile:$frameworkdir/swtmenubar.jar"
 
-# 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=`${javaCmd} -jar "${frameworkdir}"/archquery.jar`
-    if [ -n "$ANDROID_BUILD_TOP" ]; then
-        osname=`uname -s | tr A-Z a-z`
-        swtpath="${ANDROID_BUILD_TOP}/prebuilts/tools/${osname}-${vmarch}/swt"
-    else
-        swtpath="${frameworkdir}/${vmarch}"
-    fi
-fi
-
-if [ ! -d "$swtpath" ]; then
-    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
-
 if [ -x $progdir/monitor ]; then
     echo "The standalone version of hieararchyviewer is deprecated."
     echo "Please use Android Device Monitor (tools/monitor) instead."
@@ -110,5 +87,5 @@ fi
 exec "$javaCmd" \
     -Xmx512M $os_opts $java_debug \
     -Dcom.android.hierarchyviewer.bindir="$progdir" \
-    -classpath "$jarpath:$swtpath/swt.jar" \
+    -classpath "$jarpath" \
     com.android.hierarchyviewer.HierarchyViewerApplication "$@"
-- 
1.7.10.4