Package from the command line

When you package a BlackBerry WebWorks app by using the BlackBerry WebWorks SDK, the app's resources, including a start page (index.html), a config.xml file, icons, and other resources, are used to create a .bar file. You can install the resulting .bar file on the BlackBerry PlayBook Simulator or on the BlackBerry PlayBook tablet.

Although BlackBerry WebWorks apps for BlackBerry 10 and BlackBerry PlayBook tablets are both packaged into .bar files, those .bar files are not compatible across the two operating systems. Please make sure you use the appropriate SDK to package your app for each OS.

When you compile a BlackBerry WebWorks app, the BlackBerry WebWorks Packager performs the following actions:

  1. Validates the contents of the app's archive (.zip) file.
  2. Creates the output target folder and cleans up any old files (if necessary).
  3. Creates the source target folder (if specified) and cleans up any old files (if necessary).
  4. Creates the .bar file.

For some versions of Windows, you may need to be logged into an account with administrator privileges to successfully build your BlackBerry WebWorks app.

Optionally, you can use a build script to run the packaging commands. For an example, see the Ant Build Script in the blackberry/BB10-WebWorks-Community-Samples repo on github. The script was written for BlackBerry 10, but can be adapted for BlackBerry PlayBook.

Last modified: 2013-08-29