[androidsdk-tools] 23/51: Build hierarchyviewer app

Tony Mancill tmancill at moszumanska.debian.org
Sun Nov 23 23:37:53 GMT 2014


This is an automated email from the git hooks/post-receive script.

tmancill pushed a commit to branch master
in repository androidsdk-tools.

commit 4dea1a8c9f94a135d01d9238f37c49a29baf900f
Author: Jakub Adam <jakub.adam at ktknet.cz>
Date:   Sat Dec 22 22:34:56 2012 +0100

    Build hierarchyviewer app
---
 debian/androidsdk-hierarchyviewer.install          |  3 ++
 debian/androidsdk-hierarchyviewer.links            |  1 +
 debian/classpath                                   |  2 +
 debian/control                                     | 24 +++++++++
 debian/hierarchyviewer.desktop                     |  7 +++
 debian/javabuild                                   |  2 +
 .../libandroidsdk-hierarchyviewerlib-java.install  |  1 +
 .../patches/fix-hierarchyviewer-script-paths.patch | 62 ++++++++++++++++++++++
 debian/rules                                       | 15 +++++-
 9 files changed, 116 insertions(+), 1 deletion(-)

diff --git a/debian/androidsdk-hierarchyviewer.install b/debian/androidsdk-hierarchyviewer.install
new file mode 100644
index 0000000..4f10a24
--- /dev/null
+++ b/debian/androidsdk-hierarchyviewer.install
@@ -0,0 +1,3 @@
+androidsdk-hierarchyviewer.jar usr/share/java
+hierarchyviewer2/app/etc/hierarchyviewer usr/bin
+debian/hierarchyviewer.desktop usr/share/applications
diff --git a/debian/androidsdk-hierarchyviewer.links b/debian/androidsdk-hierarchyviewer.links
new file mode 100644
index 0000000..4843a24
--- /dev/null
+++ b/debian/androidsdk-hierarchyviewer.links
@@ -0,0 +1 @@
+usr/share/java/androidsdk-hierarchyviewer.jar usr/share/java/hierarchyviewer2.jar
diff --git a/debian/classpath b/debian/classpath
index fb01375..1e529ac 100644
--- a/debian/classpath
+++ b/debian/classpath
@@ -5,3 +5,5 @@ androidsdk-swtmenubar.jar swt.jar
 androidsdk-ddmlib.jar .
 androidsdk-ddmuilib.jar androidsdk-ddmlib.jar jfreechart.jar jfreechart-swt.jar
 androidsdk-ddms.jar androidsdk-ddmlib.jar androidsdk-ddmuilib.jar androidsdk-sdkstats.jar androidsdk-swtmenubar.jar  org.eclipse.jface.jar
+androidsdk-hierarchyviewerlib.jar androidsdk-ddmlib.jar androidsdk-ddmuilib.jar org.eclipse.jface.jar swt.jar
+androidsdk-hierarchyviewer.jar androidsdk-hierarchyviewerlib.jar androidsdk-swtmenubar.jar androidsdk-common.jar
diff --git a/debian/control b/debian/control
index cb26c33..5456253 100644
--- a/debian/control
+++ b/debian/control
@@ -85,3 +85,27 @@ Description: Graphical debugging tool for Android
  .
  This package is required only when you want to run DDMS as a standalone
  application. For usage from within Eclipse IDE, install eclipse-adt.
+
+Package: libandroidsdk-hierarchyviewerlib-java
+Section: java
+Architecture: all
+Depends: libandroidsdk-ddmuilib-java, ${java:Depends}, ${misc:Depends}
+Description: Android Hierarchy Viewer library
+ Hierarchy Viewer allows you to debug and optimize your user interface.
+ It provides a visual representation of the layout's View hierarchy
+ (the Layout View) and a magnified inspector of the display (the Pixel
+ Perfect View).
+
+Package: androidsdk-hierarchyviewer
+Section: java
+Architecture: all
+Depends: libandroidsdk-hierarchyviewerlib-java, libandroidsdk-common-java,
+ libandroidsdk-swtmenubar-java, ${java:Depends}, ${misc:Depends}
+Description: Tool to debug and optimize Android user interface
+ Hierarchy Viewer allows you to debug and optimize your user interface.
+ It provides a visual representation of the layout's View hierarchy
+ (the Layout View) and a magnified inspector of the display (the Pixel
+ Perfect View).
+ .
+ This package is required only when you want to run DDMS as a standalone
+ application. For usage from within Eclipse IDE, install eclipse-adt
diff --git a/debian/hierarchyviewer.desktop b/debian/hierarchyviewer.desktop
new file mode 100644
index 0000000..55fd4a6
--- /dev/null
+++ b/debian/hierarchyviewer.desktop
@@ -0,0 +1,7 @@
+[Desktop Entry]
+Type=Application
+Name=Android Hierarchy Viewer
+Icon=hierarchyviewer
+Exec=hierarchyviewer
+Terminal=false
+Categories=Development;Debugger;
diff --git a/debian/javabuild b/debian/javabuild
index f6fc3b7..78c432a 100644
--- a/debian/javabuild
+++ b/debian/javabuild
@@ -5,3 +5,5 @@ androidsdk-swtmenubar.jar swtmenubar/src
 androidsdk-ddmlib.jar ddms/libs/ddmlib/src
 androidsdk-ddmuilib.jar ddms/libs/ddmuilib/src
 androidsdk-ddms.jar ddms/app/src
+androidsdk-hierarchyviewerlib.jar hierarchyviewer2/libs/hierarchyviewerlib/src
+androidsdk-hierarchyviewer.jar hierarchyviewer2/app/src
diff --git a/debian/libandroidsdk-hierarchyviewerlib-java.install b/debian/libandroidsdk-hierarchyviewerlib-java.install
new file mode 100644
index 0000000..c4afa03
--- /dev/null
+++ b/debian/libandroidsdk-hierarchyviewerlib-java.install
@@ -0,0 +1 @@
+androidsdk-hierarchyviewerlib.jar usr/share/java
diff --git a/debian/patches/fix-hierarchyviewer-script-paths.patch b/debian/patches/fix-hierarchyviewer-script-paths.patch
new file mode 100644
index 0000000..2908cb1
--- /dev/null
+++ b/debian/patches/fix-hierarchyviewer-script-paths.patch
@@ -0,0 +1,62 @@
+From 539a85ea22cdd91106b8a669bbc75e7e54c11cdb Mon Sep 17 00:00:00 2001
+From: Jakub Adam <jakub.adam at ktknet.cz>
+Date: Sat, 22 Dec 2012 23:10:49 +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 7ed10e0..da1ed29 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
+-
+ # need to use "java.ext.dirs" because "-jar" causes classpath to be ignored
+ # might need more memory, e.g. -Xmx128M
+ echo "The standalone version of hieararchyviewer is deprecated."
+@@ -108,5 +85,5 @@ echo "Please use Android Device Monitor (tools/monitor) instead."
+ 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
+
diff --git a/debian/rules b/debian/rules
index 333689e..ad0a57e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,7 +2,7 @@
 
 include /usr/share/cdbs/1/class/javahelper.mk
 
-export CLASSPATH := androidsdk-common.jar:androidsdk-ddmlib.jar:androidsdk-ddmuilib.jar:androidsdk-sdkstats.jar:androidsdk-swtmenubar.jar:/usr/share/java/swt.jar:/usr/share/java/jfreechart.jar:/usr/share/java/jfreechart-swt.jar:/usr/share/java/org.eclipse.jface.jar:/usr/share/java/org.eclipse.core.commands.jar:/usr/share/java/org.eclipse.equinox.common.jar:/usr/share/java/guava.jar
+export CLASSPATH := androidsdk-common.jar:androidsdk-ddmlib.jar:androidsdk-ddmuilib.jar:androidsdk-sdkstats.jar:androidsdk-swtmenubar.jar:androidsdk-hierarchyviewerlib.jar:/usr/share/java/swt.jar:/usr/share/java/jfreechart.jar:/usr/share/java/jfreechart-swt.jar:/usr/share/java/org.eclipse.jface.jar:/usr/share/java/org.eclipse.core.commands.jar:/usr/share/java/org.eclipse.equinox.common.jar:/usr/share/java/guava.jar
 
 common-post-build-indep::
 	for BNDFILE in debian/*.bnd; do \
@@ -15,6 +15,19 @@ common-post-build-indep::
 	jar uf androidsdk-ddms.jar -C ddms/app/src images
 	jh_manifest -m com.android.ddms.Main androidsdk-ddms.jar
 
+	jar uf androidsdk-hierarchyviewerlib.jar -C hierarchyviewer2/libs/hierarchyviewerlib/src images
+
+	jh_manifest -m com.android.hierarchyviewer.HierarchyViewerApplication androidsdk-hierarchyviewer.jar
+
 install/androidsdk-ddms::
 	mkdir -p debian/androidsdk-ddms/usr/share/icons/hicolor/128x128/apps
 	cp ddms/app/src/images/ddms-128.png debian/androidsdk-ddms/usr/share/icons/hicolor/128x128/apps/ddms.png
+
+	mkdir -p debian/androidsdk-hierarchyviewer/usr/share/icons/hicolor/128x128/apps
+	cp hierarchyviewer2/libs/hierarchyviewerlib/src/images/sdk-hierarchyviewer-128.png \
+		debian/androidsdk-hierarchyviewer/usr/share/icons/hicolor/128x128/apps/hierarchyviewer.png
+
+	mkdir -p debian/androidsdk-hierarchyviewer/usr/share/icons/hicolor/16x16/apps
+	cp hierarchyviewer2/libs/hierarchyviewerlib/src/images/sdk-hierarchyviewer-16.png \
+		debian/androidsdk-hierarchyviewer/usr/share/icons/hicolor/16x16/apps/hierarchyviewer.png
+	chmod 644 debian/androidsdk-hierarchyviewer/usr/share/icons/hicolor/16x16/apps/hierarchyviewer.png

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/androidsdk-tools.git



More information about the pkg-java-commits mailing list