To create a .bar file for a native C/C++ app, you run the
blackberry-nativepackager utility.
The
blackberry-nativepackager utility creates a
.bar file that includes all of
your app's resources as well as the following key components:
To package your app:
-
Open a command prompt.
-
Navigate to the directory where your native project is stored.
-
Run the following command:
blackberry-nativepackager -package -devMode bar-package [app-desc files]
where:
- bar-package is the path to the location where you want the BAR file to be created
- app-desc is the path to the app descriptor file (bar-descriptor.xml)
- files is a sequence of paths to files or directories to include in the package
These paths can be absolute or relative to a current directory.
You run blackberry-nativepackager in developer mode because you don't need to sign your app.
For information on other parameters, run the command:
blackberry-nativepackager -help
The .bar file is created at the path you specified. You can now install and run the app on the target.