Skip to content

Commit

Permalink
Added build.xml to PhoneGap BlackBerry repository. Allows you to buil…
Browse files Browse the repository at this point in the history
…d BlackBerry application binaries from source using Apache Ant and BB Ant Tools (google it).
  • Loading branch information
Fil Maj committed Dec 1, 2009
1 parent 15afec1 commit a828fab
Showing 1 changed file with 68 additions and 0 deletions.
68 changes: 68 additions & 0 deletions blackberry/framework/build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
<project name="PhoneGap BlackBerry Ant Build" default="build">
<taskdef resource="bb-ant-defs.xml" />
<!-- PROPERTY DEFINITION - FILL THESE OUT! -->
<!-- rapc and sigtool require the jde.home property to be set -->
<property name="jde.home" location="C:\eclipse\plugins\net.rim.eide.componentpack4.6.1_4.6.1.27\components\" />
<!-- directory of simulator to copy files to -->
<property name="simulator.home" location="C:\eclipse\plugins\net.rim.eide.componentpack4.6.1_4.6.1.27\components\simulator\" />
<!-- directory of BlackBerry application source code. Should include two directories: a 'com' and a 'www'. -->
<property name="src.dir" location="src" />
<!-- directory where you want the final binaries to be copied to. -->
<property name="build.dir" location="build" />
<!-- name of the binaries to generate (i.e. <blah>.cod, <blah>.jar, etc.) -->
<property name="cod.name" value="AntPGTest" />
<!-- password for the Signature Tool -->
<property name="password" value="some_random_password" />

<target name="build">
<delete dir="www" />
<mkdir dir="www" />
<delete dir="${build.dir}" />
<mkdir dir="${build.dir}" />
<copy todir="www">
<fileset dir="src/www" />
</copy>
<delete dir="src/www" />
<rapc output="${cod.name}">
<src>
<fileset dir="src" />
<fileset dir="www" />
</src>
<jdp title="PhoneGap BlackBerry" />
</rapc>
<mkdir dir="src/www" />
<copy todir="src/www">
<fileset dir="www" />
</copy>
<delete dir="www" />
<copy todir="${build.dir}">
<fileset dir="" includes="*.cod,*.cso,*.debug,*.jad,*.jar" />
</copy>
<delete file="${cod.name}.cod" />
<delete file="${cod.name}.cso" />
<delete file="${cod.name}.debug" />
<delete file="${cod.name}.jad" />
<delete file="${cod.name}.jar" />
</target>

<target name="sign" depends="build">
<sigtool codfile="${build.dir}/${cod.name}.cod" password="${password}" />
</target>

<target name="clean">
<delete dir="${build.dir}" />
</target>

<target name="load-simulator" depends="sign">
<copy todir="${simulator.home}">
<fileset dir="${build.dir}" includes="*.cod,*.cso,*.debug,*.jad,*.jar" />
</copy>
</target>
<target name="load-device" depends="sign">
<exec executable="${jde.home}/bin/JavaLoader.exe" dir="." failonerror="true">
<arg value="-u" />
<arg value="load" />
<arg value="${build.dir}/${cod.name}.cod" />
</exec>
</target>
</project>

0 comments on commit a828fab

Please sign in to comment.