forked from sintaxi/phonegap
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of [email protected]:phonegap/phonegap
- Loading branch information
Showing
22 changed files
with
1,573 additions
and
227 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
PhoneGap BlackBerry | ||
============================================================= | ||
Allows developers to create BlackBerry applications using HTML, | ||
CSS and JavaScript, and bridge into device functionality like | ||
geolocation, SMS, device information, accelerometer, etc. via | ||
a JavaScript API. | ||
|
||
Pre-requisites | ||
------------------------------------------------------------- | ||
Your best bet is to check the PhoneGap wiki for detailed | ||
installation and setup instructions: | ||
http://phonegap.pbworks.com/Getting+Started+with+PhoneGap+(BlackBerry) | ||
|
||
Create a PhoneGap project with Eclipse | ||
------------------------------------------------------------- | ||
1. Launch Eclipse, go to File->Import->Existing BlackBerry project. | ||
2. Navigate over to where you cloned the git repo, and point it to the phonegap.jdp file located in blackberry/framework/. | ||
3. Modify the contents of the "www" directory to add your own HTML, CSS and Javascript. | ||
4. Before running, right-click on project root and make sure 'Activate for BlackBerry' is checked. | ||
5. Run or debug from Eclipse as desired. | ||
6. When you are satisfied with the application, make sure you sign it! (BlackBerry menu -> Request Signatures) | ||
This step needs to be done every time you change your source code. If you are running in simulator, you do not need | ||
to sign your binaries - it is only necessary for deployment to actual devices. | ||
7. A few ways to deploy to device: | ||
a) Right-click on the project root in Eclipse and click on 'Generate ALX file.' You can then use this | ||
file in RIM's Desktop Manager software to load the binaries directly onto the device. | ||
b) Use the javaloader.exe program that comes with the JDE component packs to load directly onto device. Usage: | ||
javaloader -u load path/to/codfile.cod | ||
The -u parameter specifies loading via USB. | ||
c) Over-the-air installation. Set up your application .jad, .jar and .cod files onto a web server. See RIM's documentation | ||
for more details or this succinct PDF for info: http://assets.handango.com/marketing/developerTeam/BlackBerryOTADeployment.pdf | ||
|
||
Building PhoneGap BlackBerry Projects with Apache Ant | ||
------------------------------------------------------------- | ||
You'll need all the prerequisites listed by BB Ant Tools (http://bb-ant-tools.sourceforge.net/). If you want access to building using Ant from Eclipse, | ||
check out http://www.slashdev.ca/2007/05/30/blackberry-development-with-ant-eclipse/ for instructions on how to do it. | ||
|
||
1. Once you have cloned the PhoneGap repository, put your HTML, CSS and JavaScript application files in the phonegap/blackberry/framework/src/www folder. | ||
2. Edit the build.xml file in phonegap/blackberry/framework and set the paths at the top of the file, in the <property> elements, to match | ||
your environment setup. Also be sure to set your signature key password in the password <property>. | ||
3. Open up a command-line and, assuming you have Ant on your system PATH, cd over to phonegap/blackberry/framework directory. | ||
4. Run 'ant' from the command-line. It'll default to the 'build' task, which will build your binaries into the 'build' directory. You can also | ||
explicitly specify other tasks to run: | ||
a) 'ant sign': Runs the 'build' task first, and then runs the signature tool on the compiled binary. Make sure to specify the 'password' | ||
property at the top of the build.xml file, otherwise the signature tool will fail! | ||
b) 'ant load-simulator': Runs the 'sign' task first, then copies the signed binaries over to the simulator directory you specified at the top of the | ||
build.xml and finally runs the simulator. You should see your application under the BB Menu -> Downloads. | ||
c) 'ant load-device': Runs the 'sign' task first, then executes the javaloader tool to load the signed binaries onto an attached (via USB) device. |
Empty file.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
<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="myPassword" /> | ||
<!-- name of the application, as it appears in the BlackBerry menu --> | ||
<property name="application.name" value="PhoneGap BlackBerry Test" /> | ||
|
||
<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="${application.name}" /> | ||
</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,*.csl,*.rapc" /> | ||
</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,*.csl,*.rapc" /> | ||
</copy> | ||
<exec executable="${simulator.home}/defaultSimulator.bat" dir="${simulator.home}" spawn="true"></exec> | ||
</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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.