Compilation parameters for the BlackBerry WebWorks SDK

The following table lists the available compilation parameters for the BlackBerry WebWorks SDK.

Parameter Description
archive

This parameter specifies the name of the application archive file (.zip) to compile.

With BlackBerry 10 WebWorks SDK, you can choose to use an archive file or just specify your application's folder location. For more information, see Package your BlackBerry 10 app with the BlackBerry 10 WebWorks SDK.

-g
For BlackBerry 7 or earlier applications:
  • This parameter signs the resulting .cod file by using a password. The default setting is -g for an unsigned application.
  • The application is signed only if you specify -g and a password.

For BlackBerry PlayBook OS or BlackBerry 10 applications:

This parameter signs your application by using the keystore password.

-o

This parameter saves the output files to the specified folder. If you do not use this parameter with a folder, or if this parameter is not specified at all, the output files are saved to the simulator and device subfolders in the current working directory.

-s

This parameter saves the source files. By default, if you specify this parameter without a folder, the source files are saved to the src folder within the same path as the application archive. If you specify a folder, the source files are saved in the src folder within the folder that you specify.

-v

This parameter displays verbose messages during compilation, and is optional.

-h

This parameter displays command line help, and is optional.

-d

This parameter sets the developer mode, which is used by the Web Inspector and the debug token.

The -d option will always enable the Web Inspector, which allows you to open your app in the Google Chrome browser and use the Web Inspector to debug your code.

-buildId

For BlackBerry PlayBook OS applications :

For signed applications, this parameter specifies the build number. Typically, this number should be incremented from the previous signed application.

If you specified a version number in the config.xml file, the build number you specify becomes the fourth digit of the version number. For example, either 1.2.0 or 1.2.0.1 (in config.xml) become 1.2.0.7 if you specify a build number of 7.

If you do not specify a build number, the version number stays the same (if it is four digits long) or a fourth digit of 0 is added (if it is three digits long). For example, 1.2.0.1 remains the same, and 1.2.0 becomes 1.2.0.0.

--buildId or -b

For BlackBerry 10 applications:

For signed applications, this parameter specifies the build number. Typically, this number should be incremented from the previous signed application.

If you specified a version number in the config.xml file, the build number you specify becomes the fourth digit of the version number. For example, either 1.2.0 or 1.2.0.1 (in config.xml) become 1.2.0.7 if you specify a build number of 7.

If you do not specify a build number, the version number stays the same (if it is four digits long) or a fourth digit of 0 is added (if it is three digits long). For example, 1.2.0.1 remains the same, and 1.2.0 becomes 1.2.0.0.

--params or -p

For BlackBerry 10 applications:

This parameter specifies the path to a JSON file, which can contain additional parameters to pass to downstream command line tools (blackberry-nativepackager and blackberry-signer). For an example of a parameters file, see the params-example.json file, which is stored in the root of the BlackBerry WebWorks Packager.

Sample usage:

If you use the BlackBerry WebWorks Packager behind a firewall, you might have to specify the proxy settings so that you are able to successfully sign your application. You can include a params.json file, which is stored in the root of the BlackBerry WebWorks Packager that looks like the following:

{
    "blackberry-signer": {
        "-proxyhost": "host",
        "-proxyport": "port",
        "-proxyusername": "user name",
        "-proxypassword": "password"
    }
}

When you package your application with the bbwp command and the --params params.json option, the proxy settings are passed to blackberry-signer.