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 one or more .cod files. You can install the resulting .cod files on the BlackBerry Smartphone Simulator or on a BlackBerry smartphone, just as you would install any other BlackBerry smartphone app.

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 following files:
    • .cod file for wireless distribution or distribution from a web page
    • .alx file for distribution using BlackBerry Desktop Manager
    • .jad file for distribution from a web page
    • .cso file for app signing
    • .csl file for app signing
  5. For a signed app, it updates the .cod file with a signed version.

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 7 and earlier.

Last modified: 2013-10-02