Build for Blackberry
Contents |
Wizard for PhoneGap
To compile your application for Blackberry, you must first export it as a PhoneGap project. Go to Tools > Wizard for PhoneGap, and follow the steps below:
- In the PhoneGap wizard, choose Blackberry as Target Device and click Next.
- On the Application Setup page:
- Set Index page to the page to be displayed first when users run your application.
- In the Application name field, type your application’s name.
- In the Company name field, type the name of your company.
- Click Next.
- On the Blackberry Graphics page, you can setup icons and splash screens for your application.
- To choose an image file for a field:
- Click ….
- Go to image’s location, and select it.
- Click OK.
- Click Next.
- To choose an image file for a field:
- On the Target Destination page:
Note: The folder you choose will be where all files and folders will be generated. You might want to create a new folder for your build.
- Optionally, change destination folder:
- Click ….
- Go to folders location, and click OK.
- Click Next.
- Optionally, change destination folder:
- On the Export page, your PhoneGap folder will be exported to the destination folder as www, and archived as a Your Application.zip file there too.
- Wait for the process to finish. Next button will become clickable then.
- If you included in your application any external resources, like image files, you must copy them into www. Check this video tutorial (around minute 6:25). Then you have to generate a new Your Application.zip archive with the contents of the www folder (there are several tools you can use for that task).
Warning: You must create the archive from the contents of the www folder, not from the folder itself.
- Click Next.
- On the Compile page, wait for the build process to end, and click Finish.
Now, in your destination folder you will find two additional folders: OTAInstall and StandardInstall. You can now run StandardInstall\YourApplication.cod to test your application. For a release build you can deploy, you must manually build your application.
BlackBerry WebWorks SDK
Note: Make sure you setup your system first.
Build
- Open a terminal: Start > All Programs > Accessories > System Symbol.
Warning: In Windows Vista and Windows 7 your must run it as administrator.
- Run cd SDK_directory, where SDK_directory is:
- In 32-bit systems: C:\Program Files\Research In Motion\BlackBerry WebWorks SDK version
- In 64-bit systems: C:\Program Files (x86)\Research In Motion\BlackBerry WebWorks SDK version
- Run bbwp zip_file -o destination_folder -g password, where:
- zip file is the path to the .zip file with www contents inside.
- destination folder is the folder where you want built application to be moved.
- password is your password.
Note: You can omit the -g password part if you are only building for testing.
You will find your application in destination_folder\StandardInstall\zip_filename.cod. You can now deploy that .cod file to the App World. To do so, check the steps in Blackberry Documentation: us.blackberry.com/developers/appworld/.
Run
- Connect your Blackberry device to your computer through USB, or start the emulator and select Simulate > Usb Cable Connected.
- Open a terminal: Start > All Programs > Accessories > System Symbol.
Warning: In Windows Vista and Windows 7 your must run it as administrator.
- Run cd SDK_bin_directory, where SDK_bin_directory is:
- In 32-bit systems: C:\Program Files\Research In Motion\BlackBerry WebWorks SDK version\bin
- In 64-bit systems: C:\Program Files (x86)\Research In Motion\BlackBerry WebWorks SDK version\bin
- Run .\JavaLoader.exe -u load file.cod, where:
- file.cod is the path to the .cod file you built.
Emulator
You will find emulator launcher, fledgelauncher.exe, in the following folder:
- In 32-bit systems: C:\Program Files\Research In Motion\BlackBerry WebWorks SDK version\simpack\simversion
- In 64-bit systems: C:\Program Files (x86)\Research In Motion\BlackBerry WebWorks SDK version\simpack\simversion
Start the launcher, select the emulator you want to launch, and click Go.