The blackberry-nativepackager command line must name the BAR file, app descriptor file, and Qt binary. The packaging tool allows you to list other files to include in the package and supports many command-line options for Qt apps.
blackberry-nativepackager [<commands>] [<options>] bar-package app-descriptor binary-file [resource-file]*
The command line shown below packages the Settings app. The app binary, icon file, and several images from installed UI themes are included in the BAR file (QtSettingsApp.bar), which is generated based on the app descriptor file (settings-descriptor.xml):
blackberry-nativepackager.bat -package QtSettingsApp.bar -devMode settings-descriptor.xml -e %1\bin\settingsapp bin/settingsapp settings_icon.png -C %1\ %1\lib\ %1\share\qnxcar2\palettes\ %1\share\qnxcar2\fonts\ %1\share\qnxcar2\qml\main.qml %1\share\settingsapp\ %1\share\qnxcar2\images\themes\720p\default\Settings\ %1\share\qnxcar2\images\themes\720p\midnightblue\Settings\ %1\share\qnxcar2\images\themes\800x480\default\Settings\ %1\share\qnxcar2\images\themes\800x480\midnightblue\Settings\ %1\share\qnxcar2\images\themes\800x480\titanium\Settings\ %1\share\qnxcar2\images\themes\720p\default\CommonResources\ %1\share\qnxcar2\images\themes\720p\midnightblue\CommonResources\ %1\share\qnxcar2\images\themes\800x480\default\CommonResources\ %1\share\qnxcar2\images\themes\800x480\midnightblue\CommonResources\ %1\share\qnxcar2\images\themes\800x480\titanium\CommonResources\
In the actual command line, %1 is replaced with the path of the source directory containing the compiled Qt code. The -e and -C options take arguments, so the command-line tokens following these options refer to the files affected by them. Here, the -e option tells the packaging tool to store the app binary (which is located at %1\bin\settingsapp on the host system) at bin/settingsapp in the output package. The -C option removes the %1 folder from the paths of the subsequently named files. For example, the files in %1\lib on the host system get placed in /lib in the package.