You can run the blackberry-nativepackager tool from the command line.
Before running the packaging command, ensure that you have:
The command-line process for packaging a Qt app is similar to the process of "Packaging a native C/C++ app for installation" described in the Application and Window Management guide. The key differences are the QNX Qt environment variables you can define in the app descriptor file for a Qt app.
blackberry-nativepackager [<commands>] [<options>] bar-package app-descriptor binary-file [resource-file]*
You must list the BAR file first, followed by the app descriptor file, and then the app files (which must include the binary) to store in the package. The order for other command-line arguments is flexible; you can list the app files in any order and place commands and options at any location in the command line.
The exact name and location of the packaging tool and its command syntax is platform-dependent. On Linux, the tool is called blackberry-nativepackager and is stored in DEFAULT_SDP_PATH/host/linux/x86/usr/bin/. Any filepaths in the command line must use POSIX notation, using a forward slash (/) to indicate directories. On Windows, it's called blackberry-nativepackager.bat and is stored in DEFAULT_SDP_PATH\host\win32\x86\usr\bin. The command-line filepaths must follow the Windows convention, using a backslash (\) to indicate folders.
Consider the following packaging command line for a Windows host:
blackberry-nativepackager.bat -package AngryBirds.bar -devMode birds_bar-descriptor.xml bin/angrybirds a_birds1.png
This command generates a BAR file named AngryBirds.bar based on the birds_bar-descriptor.xml file. The BAR file contains the app's binary file (whose path is bin/angrybirds) and its icon file (a_birds1.png). For details on the -package and -devMode options and all other command options applicable to packaging Qt apps, see "Qt command-line options for blackberry-nativepackager".