You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by fi...@apache.org on 2012/06/14 22:52:55 UTC
webworks commit: Added debug flag parameter being passed to widget
packager inside ./debug script
Updated Branches:
refs/heads/master 32c892c72 -> 9128f337a
Added debug flag parameter being passed to widget packager inside ./debug script
Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/commit/9128f337
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/tree/9128f337
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/diff/9128f337
Branch: refs/heads/master
Commit: 9128f337a460e3c05aab9662de384c4aa7def727
Parents: 32c892c
Author: Fil Maj <ma...@gmail.com>
Authored: Thu Jun 14 13:53:31 2012 -0700
Committer: Fil Maj <ma...@gmail.com>
Committed: Thu Jun 14 13:53:31 2012 -0700
----------------------------------------------------------------------
bin/templates/project/blackberry.xml | 25 ++++++++++++++++++++++++
bin/templates/project/build.xml | 6 +++++
bin/templates/project/cordova/debug | 4 +-
bin/templates/project/playbook.xml | 30 +++++++++++++++++++++++++++++
4 files changed, 63 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/blob/9128f337/bin/templates/project/blackberry.xml
----------------------------------------------------------------------
diff --git a/bin/templates/project/blackberry.xml b/bin/templates/project/blackberry.xml
index 59c0278..7588b2e 100644
--- a/bin/templates/project/blackberry.xml
+++ b/bin/templates/project/blackberry.xml
@@ -56,7 +56,19 @@
<arg file="${build.dir}/StandardInstall/${cod.name}.cod" />
</exec>
</target>
+
+ <!-- DEBUG-LOAD DEVICE -->
+ <target name="debug-device" depends="package-app">
+ <bbwp code-sign="true" debug="true" />
+ <exec executable="${javaloader}" dir="." failonerror="true">
+ <arg value="-u" />
+ <arg value="-w${properties.blackberry.sim.password}" />
+ <arg value="load" />
+ <arg file="${build.dir}/StandardInstall/${cod.name}.cod" />
+ </exec>
+ </target>
+
<!-- LOAD SIMULATOR -->
<target name="load-simulator" depends="build">
@@ -177,7 +189,18 @@
<macrodef name="bbwp">
<attribute name="code-sign" default="false" />
+ <attribute name="debug" default="false" />
<sequential>
+ <!-- check if debug flag was passed in and set an appropriate flag for CLI exec of bbwp -->
+ <if>
+ <equals arg1="@{debug}" arg2="true" />
+ <then>
+ <property name="debug.flag" value="/d" />
+ </then>
+ <else>
+ <property name="debug.flag" value="" />
+ </else>
+ </if>
<!-- Ensure bbwp executable exists. -->
<property name="properties.blackberry.bbwp.bin" location="${bbwp}" />
@@ -189,6 +212,7 @@
<then>
<exec executable="${properties.blackberry.bbwp.bin}">
<arg file="${build.dir}/${cod.name}.zip" />
+ <arg value="${debug.flag}" />
<arg value="/g" />
<arg value="${properties.blackberry.sigtool.password}" />
<arg value="/o" />
@@ -198,6 +222,7 @@
<else>
<exec executable="${properties.blackberry.bbwp.bin}">
<arg file="${build.dir}/${cod.name}.zip" />
+ <arg value="${debug.flag}" />
<arg value="/o" />
<arg file="${build.dir}" />
</exec>
http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/blob/9128f337/bin/templates/project/build.xml
----------------------------------------------------------------------
diff --git a/bin/templates/project/build.xml b/bin/templates/project/build.xml
index 9cf3e37..bde73c0 100644
--- a/bin/templates/project/build.xml
+++ b/bin/templates/project/build.xml
@@ -51,6 +51,12 @@
<fileset dir="." includes="${subant.file}"/>
</subant>
</target>
+
+ <target name="debug-device">
+ <subant target="debug-device">
+ <fileset dir="." includes="${subant.file}"/>
+ </subant>
+ </target>
<target name="build">
<subant target="build">
http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/blob/9128f337/bin/templates/project/cordova/debug
----------------------------------------------------------------------
diff --git a/bin/templates/project/cordova/debug b/bin/templates/project/cordova/debug
index 3f7f06c..2b10cff 100755
--- a/bin/templates/project/cordova/debug
+++ b/bin/templates/project/cordova/debug
@@ -32,7 +32,7 @@ then
read DEVICE
if [ $DEVICE == "y" ]
then
- $ANT blackberry load-device
+ $ANT blackberry debug-device
else
$ANT blackberry load-simulator
fi
@@ -43,7 +43,7 @@ else
read DEVICE
if [ $DEVICE == "y" ]
then
- $ANT playbook load-device
+ $ANT playbook debug-device
else
$ANT playbook load-simulator
fi
http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/blob/9128f337/bin/templates/project/playbook.xml
----------------------------------------------------------------------
diff --git a/bin/templates/project/playbook.xml b/bin/templates/project/playbook.xml
index 2584f9c..f6619c9 100644
--- a/bin/templates/project/playbook.xml
+++ b/bin/templates/project/playbook.xml
@@ -62,6 +62,23 @@
</exec>
</target>
+ <!-- DEBUG-LOAD DEVICE -->
+
+ <target name="debug-device" depends="package-app">
+ <bbwp code-sign="true" debug="true" />
+
+ <exec executable="${blackberry-deploy}" dir="." failonerror="true">
+ <arg value="-installApp" />
+ <arg value="-launchApp" />
+ <arg value="-device" />
+ <arg value="${properties.playbook.device.ip}" />
+ <arg value="-password" />
+ <arg value="${properties.playbook.device.password}" />
+ <arg value="-package" />
+ <arg file="${build.dir}/${cod.name}.bar" />
+ </exec>
+ </target>
+
<!-- LOAD SIMULATOR -->
<target name="load-simulator" depends="build">
@@ -120,13 +137,25 @@
<macrodef name="bbwp">
<attribute name="code-sign" default="false" />
+ <attribute name="debug" default="false" />
<sequential>
+ <!-- check if debug flag was passed in and set an appropriate flag for CLI exec of bbwp -->
+ <if>
+ <equals arg1="@{debug}" arg2="true" />
+ <then>
+ <property name="debug.flag" value="-d" />
+ </then>
+ <else>
+ <property name="debug.flag" value="" />
+ </else>
+ </if>
<buildnumber file="${build.num.file}" />
<if>
<equals arg1="@{code-sign}" arg2="true" />
<then>
<exec executable="${bbwp}">
<arg file="${build.dir}/${cod.name}.zip" />
+ <arg value="${debug.flag}" />
<arg value="-gcsk" />
<arg value="${properties.playbook.sigtool.csk.password}" />
<arg value="-gp12" />
@@ -140,6 +169,7 @@
<else>
<exec executable="${bbwp}">
<arg file="${build.dir}/${cod.name}.zip" />
+ <arg value="${debug.flag}" />
<arg value="-o" />
<arg file="${build.dir}" />
<arg value="-buildId" />