[androidsdk-tools] 29/51: Build uiautomatorviewer app
Tony Mancill
tmancill at moszumanska.debian.org
Sun Nov 23 23:37:55 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 b27b505072a2a0db7a4d769c8770e4fd69dcf446
Author: Jakub Adam <jakub.adam at ktknet.cz>
Date: Mon Dec 31 19:31:03 2012 +0100
Build uiautomatorviewer app
---
debian/androidsdk-uiautomatorviewer.bnd | 5 ++
debian/androidsdk-uiautomatorviewer.install | 2 +
debian/androidsdk-uiautomatorviewer.links | 1 +
debian/classpath | 1 +
debian/control | 11 +++++
debian/javabuild | 1 +
.../fix-uiautomatorviewer-script-paths.patch | 56 ++++++++++++++++++++++
debian/patches/series | 1 +
debian/rules | 3 ++
9 files changed, 81 insertions(+)
diff --git a/debian/androidsdk-uiautomatorviewer.bnd b/debian/androidsdk-uiautomatorviewer.bnd
new file mode 100644
index 0000000..e03e41a
--- /dev/null
+++ b/debian/androidsdk-uiautomatorviewer.bnd
@@ -0,0 +1,5 @@
+Bundle-Name: Android UI Automator Viewer
+Bundle-SymbolicName: com.android.uiautomator
+Bundle-Version: 1.0.0
+Bundle-Vendor: Debian.org
+Import-Package: *
diff --git a/debian/androidsdk-uiautomatorviewer.install b/debian/androidsdk-uiautomatorviewer.install
new file mode 100644
index 0000000..9629986
--- /dev/null
+++ b/debian/androidsdk-uiautomatorviewer.install
@@ -0,0 +1,2 @@
+androidsdk-uiautomatorviewer.jar usr/share/java
+uiautomatorviewer/etc/uiautomatorviewer usr/bin
diff --git a/debian/androidsdk-uiautomatorviewer.links b/debian/androidsdk-uiautomatorviewer.links
new file mode 100644
index 0000000..260d36c
--- /dev/null
+++ b/debian/androidsdk-uiautomatorviewer.links
@@ -0,0 +1 @@
+usr/share/java/androidsdk-uiautomatorviewer.jar usr/share/java/uiautomatorviewer.jar
diff --git a/debian/classpath b/debian/classpath
index da57d90..3574035 100644
--- a/debian/classpath
+++ b/debian/classpath
@@ -8,3 +8,4 @@ androidsdk-ddms.jar androidsdk-ddmlib.jar androidsdk-ddmuilib.jar androidsdk-sdk
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
androidsdk-traceview.jar org.eclipse.jface.jar swt.jar
+androidsdk-uiautomatorviewer.jar org.eclipse.jface.jar swt.jar
diff --git a/debian/control b/debian/control
index 3cf06f9..b54a50d 100644
--- a/debian/control
+++ b/debian/control
@@ -118,3 +118,14 @@ Description: Tool to profile performance of Android applications
Traceview is a graphical viewer for execution logs saved by your application.
It can help you debug your application and profile its performance.
+Package: androidsdk-uiautomatorviewer
+Section: java
+Architecture: all
+Depends: ${java:Depends}, ${misc:Depends}
+Description: Tool to scan and analyze the UI components of an Android application
+ The uiautomatorviewer tool provides a convenient visual interface to inspect
+ the layout hierarchy and view the properties of the individual UI components
+ that are displayed on the test device. Using this information, you can later
+ create uiautomator tests with selector objects that target specific UI
+ components to test.
+
diff --git a/debian/javabuild b/debian/javabuild
index ca2f567..b7cb83b 100644
--- a/debian/javabuild
+++ b/debian/javabuild
@@ -8,3 +8,4 @@ androidsdk-ddms.jar ddms/app/src
androidsdk-hierarchyviewerlib.jar hierarchyviewer2/libs/hierarchyviewerlib/src
androidsdk-hierarchyviewer.jar hierarchyviewer2/app/src
androidsdk-traceview.jar traceview/src
+androidsdk-uiautomatorviewer.jar uiautomatorviewer/src
diff --git a/debian/patches/fix-uiautomatorviewer-script-paths.patch b/debian/patches/fix-uiautomatorviewer-script-paths.patch
new file mode 100644
index 0000000..bec2463
--- /dev/null
+++ b/debian/patches/fix-uiautomatorviewer-script-paths.patch
@@ -0,0 +1,56 @@
+From d44f46d96c291a106823c73164719c710ea3ab07 Mon Sep 17 00:00:00 2001
+From: Jakub Adam <jakub.adam at ktknet.cz>
+Date: Mon, 31 Dec 2012 19:35:47 +0100
+Subject: [PATCH] fix-uiautomatorviewer-script-paths.patch
+
+---
+ uiautomatorviewer/etc/uiautomatorviewer | 28 +---------------------------
+ 1 file changed, 1 insertion(+), 27 deletions(-)
+
+diff --git a/uiautomatorviewer/etc/uiautomatorviewer b/uiautomatorviewer/etc/uiautomatorviewer
+index 79faf5a..43198a8 100755
+--- a/uiautomatorviewer/etc/uiautomatorviewer
++++ b/uiautomatorviewer/etc/uiautomatorviewer
+@@ -36,7 +36,7 @@ prog="${progdir}"/"${progname}"
+ cd "${oldwd}"
+
+ jarfile=uiautomatorviewer.jar
+-frameworkdir="$progdir"
++frameworkdir="/usr/share/java"
+ libdir="$progdir"
+ if [ ! -r "$frameworkdir/$jarfile" ]
+ then
+@@ -75,30 +75,4 @@ done
+
+ jarpath="$frameworkdir/$jarfile"
+
+-# 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
+-
+-# 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" -Dcom.android.uiautomator.bindir="$progdir" -jar "$jarpath" "$@"
+--
+1.7.10.4
+
diff --git a/debian/patches/series b/debian/patches/series
index bf05091..b8b90ef 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
fix-ddms-script-paths.patch
fix-hierarchyviewer-script-paths.patch
fix-traceview-script-paths.patch
+fix-uiautomatorviewer-script-paths.patch
diff --git a/debian/rules b/debian/rules
index c9b27b2..d809383 100755
--- a/debian/rules
+++ b/debian/rules
@@ -22,6 +22,9 @@ common-post-build-indep::
jar uf androidsdk-traceview.jar -C traceview/src/resources icons
jh_manifest -m com.android.traceview.MainWindow androidsdk-traceview.jar
+ jar uf androidsdk-uiautomatorviewer.jar -C uiautomatorviewer/src images
+ jh_manifest -m com.android.uiautomator.UiAutomatorViewer androidsdk-uiautomatorviewer.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
--
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