Writing the app descriptor file

To deploy a Qt app on a QNX CAR target, you must package the app in a BAR file. The package must contain an app descriptor file, which is an XML file specifying various configuration and application settings.

Note: These instructions show how to define an app descriptor file using Qt Creator but you can manually write this file using whatever editing tool you want.
To write an app descriptor file in Qt Creator:
  1. Click the Edit icon on left side, right-click the QtApp folder in the Projects view, then choose Add New...
  2. In the New File dialog, select General in the Files and Classes list, then Text file in the list of specific file types (shown in the middle), then click Choose...

    Qt Creator displays the New Text file configuration dialog.

  3. In the Location page, name the file bar-descriptor.xml, then click Next.
  4. In the Summary page, click Finish.

    The bar-descriptor.xml file is opened for editing.

  5. Copy and paste the following content into the new file:
    <?xml version='1.0' encoding='UTF-8' standalone='no'?>
    <qnx xmlns="http://www.qnx.com/schemas/application/1.0">
        <name>Qt App</name>
        <description>The Hello World Qt demo app.</description>
        <icon>
            <image>icon.png</image>
        </icon>
        <id>com.mycompany.QtApp</id>
        <versionNumber>1.0.0</versionNumber>
        <buildId>1</buildId>
        <author>My Company Inc.</author>
        <initialWindow>
            <systemChrome>none</systemChrome>
            <transparent>false</transparent>
        </initialWindow>
        <permission system="true">run_native</permission>
        <action system="true">run_native</action>
        <env var="QQNX_PHYSICAL_SCREEN_SIZE" value="150,90"/>
        <asset type="Qnx/Elf" path="QtApp" 
                  entry="true">QtApp</asset> 
    </qnx>
    

    The app-descriptor file provides the app name, description, icon file, and other fields that contain authoring information and settings for the initial window. It also sets the required QQNX_PHYSICAL_SCREEN_SIZE environment variable, which defines the height and width of the app's display area on the screen. The environment variables are set using <env> tags, as shown. Finally, the app descriptor file must also provide the asset information, which includes the path and format of the binary file.