Creating BAR packages for Cordova apps

To create a Cordova BAR package file for your apps:

  1. Navigate to the folder where you installed the your QNX software ($QNX_CAR_DEPLOYMENT, %QNX_CAR_DEPLOYMENT%).
  2. Go to the html5/cordova/tools/gen-cordovapkg/ folder.
  3. Run the following script to generate a BAR package for one or more apps specified:
    gen-cordovapkg.py -o output_path --qnx-sdk html5_sdk_path [appname_1] .. [appname_N]
    where:
    • output_path points to an existing directory to put the generated BAR file
    • html5_sdk_path is a path to the HTML5 SDK. For additional information about the HTML5 SDK, see SDK Overview.
    • appname_1, appname_2, .. appname_N are the applications you want to put in a BAR package

    For example:

    gen-cordovapkg.py -o /tmp/ --qnx-sdk /tmp/html5sdk Home Communication
    Note: If you don't specify any apps, the script will automatically build all the Cordova apps in $QNX_CAR_DEPLOYMENT/html5/apps/ for Linux and %QNX_CAR_DEPLOYMENT%\html5\apps for Windows.

    You can specify an alternative directory by using the --application-path option.

The script generates a BAR package file for each of the apps specified. For the example above, the tmp directory will contain two .bar files:

Note:

For information on packaging, installing, and launching your HTML5 app, see the Application and Window Management guide.