Lean how to package an HTML5 application to be installed on to a QNX CAR system.
To package and compile your application, you must run the BlackBerry WebWorks Packager (BBWP), which is included with the BlackBerry 10 WebWorks SDK. The BlackBerry WebWorks Packager takes your application archive file or folder location, compiles it, packages it, and then creates the file needed for deployment.
When you compile an app by using the BlackBerry WebWorks SDK, all of your app's resources, including its start page (index.html), its configuration document file (config.xml), its launch icon (icon.png), and other resources, are used to create a .bar file. You can install the resulting .bar file on a device, such as the Panda device for your "Hello World" app.
When you compile an app, the BlackBerry WebWorks Packager performs the following actions:
If your operating system is Windows 7 or Windows Vista, you may need to ensure that bbwp and Java are running with administrator access. Otherwise, these executables will not have access to run, and you will encounter errors when you try to build your app.
If you're using version control or Mac OS, any hidden files (a filename that begins with a dot) will cause the packaging tool to create a .bar file that will likely fail (silently) upon launch.
Make sure that your configuration document file (config.xml) entry point file (index.html) and JavaScript file for WebWorks (webworks.js) are located in the project root.
The contents of the HelloWorld directory are copied into the .zip archive.
Don't zip the HelloWorld directory folder; open the folder and zip the contents.
When you create the zip archive, make sure that you don't include any hidden files that may have been generated, such as .git, .svn, and .DS_Store. For Linux, you can run zip with the option -x to exclude hidden files. For example, the following example will exclude all .svn files from the ZIP archive:
cd HelloWorld zip -r HelloWorld.zip * -x '*.svn*'
These files are found at the root of the WebWorks archive you downloaded earlier.
For example:
The -d is optional and it enables debug mode, which turns on the Web Inspector. For example, the following output is the typical result from this process:
~/dev/BBWP-1.0.2.9/bbwp -d HelloWorld.zip [INFO] Populating application source [INFO] Parsing config.xml [WARN] Build ID set in config.xml [version], but signing key file was not found: author.p12 [WARN] Build ID set in config.xml [version], but no signing password was provided [-g]. Bar will be unsigned [INFO] Generating output files [WARN] Failed to find debug token [INFO] Info: Package created: /home/mylocation/simulator/HelloWorld/HelloWorld.bar [WARN] Failed to find debug token [INFO] Info: Package created: /home/mylocation/device/HelloWorld/HelloWorld.bar [INFO] BAR packaging complete
At a command prompt, navigate to the installation folder for the BlackBerry 10 WebWorks SDK. For Windows: cd C:\Program Files\Research In Motion\BlackBerry 10 WebWorks SDK <version>, and for Mac OS: cd "/Developer/SDKs/Research In Motion/BlackBerry 10 WebWorks SDK <version>".
If you encounter any problems packaging your apps, please refer to the HTML5 WebWorks Developer site.
After packaging, the generated HelloWorld.zip and HelloWorld.bar files for your app can be found at: device/HelloWorld/