Package from the command line

When you package a BlackBerry WebWorks app by using the BlackBerry 10 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 10 Device Simulator or on a BlackBerry 10 device.

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 or app's folder location.
  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.

Last modified: 2014-03-10

Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus