Using the QNX Software Center Command Line

Updated: September 12, 2023

The qnxsoftwarecenter_clt script lets you run the QNX Software Center from the command line. The script uses the same infrastructure as the QNX Software Center’s GUI.

Syntax

qnxsoftwarecenter_clt options 

Runs on

Microsoft Windows, Linux, macOS

Options

-activateAll
Activate all license keys that require remote activation.
-addLicenseKey key
Add the specified license key and activate the product for which the key is being added.
If you are using the QNX Software Center offline, use this option to specify the desired license key for your installation. If you are using the QNX Software Center online and have multiple license keys, use this option if you wish to add and activate a specific key.
-cleanInstall
Remove the active baseline installation, if one exists.
You can run this option before creating a new installation with the -installBaseline option.
This option performs the same removal operations as the -uninstallBaseline option and the Remove Installation command in the GUI.
CAUTION:
This option deletes all of the files in the active installation.
-clearDropins
Delete the imported package data stored in the dropins directory.
This option can help free up disk space and improve startup performance of the QNX Software Center. See Delete imported package data that you no longer need for more information.
-deactivateAll
Deactivate all activated license keys.
Use this command when you need to release all licenses held by the current machine (for instance, when migrating to another machine).
-destination path
Perform operations on the installation located in the specified path (i.e. make this installation the active installation).
You should invoke this option before invoking any options that install or uninstall packages, or that query packages on disk. You can omit it if you work with only one installation. See the Description for details.
If you omit this option, the QNX Software Center uses the last specified destination. However, if you're writing scripts, we recommend that you always specify the destination.
-exportPatchSet output_file [properties]
-exportPatchSetText output_file [properties]
Export a patch set based on the active installation.
This option comes in two forms: -exportPatchSet creates a non-editable patch set in the form of a QNX Software Center package, while -exportPatchSetText creates an editable, text-based patch set. We recommend -exportPatchSetText for most cases. See Export and import patch sets in this guide for more information.
When naming the output file, add a .qpkg extension if you've specified -exportPatchSet and add a .plist extension if you've specified -exportPatchSetText.
Here are the supported properties:
-authorId author_id
The reverse DNS address of your organization. For example: com.mycompany
-packageId patchset_id
An alphanumeric package ID, prefixed by the author_id. For example: com.mycompany.projectA.patchset
-packageName name
A meaningful description of the patch set. Remember to use quotes if the description includes spaces. For example: "QNX SDP 7.0 Patch Set for Project A"
This argument is optional.
-packageVersion version
The version number of the patch set.

The version number must contain four segments, separated by periods. The first three segments are numeric; the last segment is a string and typically specifies a date.

CAUTION:
The QNX Software Center uses the first three segments for numeric comparison. For instance, it sees 1.0.2 as greater than 1.0.100. However, it uses the last segment for alphanumeric comparison. Thus, it sees 1.0.0.2 as later than 1.0.0.10 because 2 as a string is greater than 10.
-includeHostPackages=false
Don't include host packages in the patchset (only works with -exportPatchSet) .
-status [stable|experimental]
Assign the specified status to the patch set. Default is stable. See Package status.
Note: If you use the -destination option, it should appear before -exportPatchSet on the command line.
-fileInfo path
List the server-defined properties for the file specified by path.
The -fileInfo option searches for the matching file on the myQNX server, which defines the latest properties for files supplied by BlackBerry QNX. If a match is found, -fileInfo generates a report of the file's server-defined properties.
The specified path, which must point to an existing file in the host filesystem, can be either absolute or relative to the current directory. For example:
-fileInfo ~/qnx700/target/qnx7/aarch64le/lib/libcam.so
If -fileInfo can't find a match on the server, it will try to find a match in the active installation. If it succeeds, it will generate a report of the properties defined for the file by the local package data. (You can use -destination to choose the active installation.)
You can use -reportFormat to format the report data, -reportPresentation to apply a template to the report, and -reportSaveAs to save the report to a file.
-fileSearch query
List the server-defined properties for any file that matches the specified properties.
The -fileSearch option searches for matching files on the myQNX server, which defines the latest properties for files supplied by BlackBerry QNX. For every match it finds, -fileSearch generates a report of the file's server-defined properties. If -fileSearch can't connect to the server or find a matching file, it prints an error.

The query argument can specify one or more properties, expressed as field-value pairs:

property_name=value&property_name=value&...

Here are the supported properties:

Property Description
buildId A unique ID, encoded in hex, that identifies the binary payload of the file.
digestSHA512 A Secure Hash Algorithm 512-bit checksum, encoded in base64.
path The partial or full path of the file.
packageId The unique alphanumeric ID of the package to which the file belongs.
version The version of the package to which the file belongs.
status The software maturity of the file (either stable or experimental).
To determine the value of any of these attributes, you can run the use -i command on the file that you're interested in (see the use entry in the QNX Neutrino RTOS Utilities Reference for details).

The query argument also accepts parameters to control the sorting and pagination of output:

Attribute Description
sortOrder

Use the specified list of comma-separated properties for sorting.

The list can contain any of the properties in the table above.

You can use the + and - characters to specify ascending and descending order, respectively. For instance: sortOrder=buildId+,path-,version+

pageNo

Return the specified page of results.

If you omit pageSize, pageNo is ignored.

pageSize

Print the specified number of results on each page.

For instance, if you specify 5, each page will contain the results for 5 files.

If you omit pageSize, the page size is unlimited. If you omit pageNo, pageSize is ignored.

details

Print the details for each file on a separate row.

For instance, if you specify details and the same file is found in two packages, the report will include two rows, one for each instance of the file. But if you omit details, the report will use one row for both files and collapse the column data. In that case, if any column value (for instance, packageId) differs between the two files, the report will present both values in the same cell.

Note: If you run the command from a Unix shell, you need to escape any & and * characters in the query argument. For example:
pageSize=100\&path=deva\*
You can use -reportFormat to format the report data, -reportPresentation to apply a template to the report, and -reportSaveAs to save the report to a file.
-help
Display a list of QNX Software Center options.
-[http.|https.]proxy.host host
Connect to the specified HTTP or HTTPS proxy host.
-[http.|https.]proxy.port port
Use the specified HTTP or HTTPS proxy port.
-[http.|https.]proxy.user user
Use the specified HTTP or HTTPS proxy user name.
-[http.|https.]proxy.password password
Use the specified HTTP or HTTPS proxy password.
-importAndInstall package_file
Import the specified package archive or patch set, and install it in the path specified by -destination.
This option lets you modify an existing installation. To add a new installation, use -installBaseline.
-importPatchSetAndUnlock input_patchset_package_file
Import the specified patch-set package, install it in the installation in the path specified by -destination, and unlock it.
This option allows packages specified in the patch set to be updated. If you prefer that the packages stay locked, use -importAndInstall instead.
-installBaseline package_id[/package_version]
Add a new installation and initialize it with the specified baseline package or patch set. The installation will be added in the path specified by -destination.
The package_id argument can simply contain the package ID, or it can include the package version, in which case you separate the ID and version by a slash: package_id/package_version.
This option performs the same function as the Add Installation option in the GUI.
-installPackage package_id[/package_version][,package_id[/package_version]...]
Add the specified package to the active installation.
CAUTION:

Don't include any spaces in the argument.

If you wish to install multiple packages, specify all of them with a single -installPackage option. Don't use a separate -installPackage option for each package.

-list
List the packages available in any remote or local repositories.
The output of this option includes packages that you can't currently install. To see packages that are available to you, use -listAccessible.
-listAccessible
List all accessible packages.
This option lists all of the packages that are available to you, including any that have already been installed.
-listInstalled
List all packages in the active installation.
-listInstalledRoots
List all root packages (i.e. packages explicitly installed by the user) in the active installation.
The list doesn't include packages that the QNX Software Center has installed to satisfy dependency requirements.
-listLicenseKeys
List all license keys deployed to the user and indicate the activation status of each.
-listProfiles
List all installations.
-listQuery query
List all available packages that match the specified query.
You can use this option for listing packages that match specific parameters (for instance, all packages that contain a specific library). The query argument takes arguments specified in the p2ql query language. Visit https://wiki.eclipse.org/Equinox/p2/Query_Language_for_p2 to learn more about p2ql.

Here are some examples:

List only the latest version of each available package:
qnxsoftwarecenter_clt -listQuery 'Q:latest()'
List only the latest version of the com.qnx.sdp.target.screen.base package:
qnxsoftwarecenter_clt -listQuery "Q:latest(x | x.id == 'com.qnx.sdp.target.screen.base')"
List all versions of the com.qnx.sdp.target.screen.base package:
qnxsoftwarecenter_clt -listQuery "Q:select(x | x.id == 'com.qnx.sdp.target.screen.base')"
List the latest package that provides “ifconfig”:
qnxsoftwarecenter_clt  -listQuery "Q:latest(iu | iu.providedCapabilities.exists(p | 
    p.name == 'ifconfig'))"
Note: If you run this option from a Unix shell, you need to escape any & and * characters in the query argument.
-listUpdates
List available updates.
-mirror
Mirror package metadata from the remote myQNX server into the local cache.
Use this option at least once before performing any remote operations such as -list or -installPackage. See the Description for more information.
-myqnx.user user
Your myQNX username.
See the Description for when to use -myqnx.user and -myqnx.password.
-myqnx.password password
Your myQNX password.
Alert: When you use this option, the QNX Software Center saves your password as cleartext in its log file. To avoid this issue, pass the option through an options file (see @options_file) rather than on the command line.
-offline
Don't synchronize with the remote myQNX server.
If you can't directly connect to the server, you must use -offline with the -mirror option. That will load packages from the dropins directory. You must import the packages there beforehand.
-setDebugSymbolsEnabled=true|false
If true, list or install packages that contain only debug symbols, in addition to any other packages that the user is entitled to. The default is true.
-setExperimentalEnabled=true|false
If true, list or install experimental packages, in addition to any other packages that the user is entitled to. The default is true.
-setPolicy=update_policy
Use the specified installation update policy.
You can specify one of the following policies:
liberal
Install all updates during the initial installation. When subsequently installing a package, install the latest version of each dependent package.
conservative
Install all updates during the initial installation. When subsequently installing a package, apply the following rules to dependent packages:
  • If a dependent package isn’t currently installed, install the latest version.
  • If a dependent package is already installed, use the existing version unless the package being added requires a newer version.
ultraconservative
Don't install updates during the initial installation. When subsequently installing a package, install the earliest version of each dependent package that is not already installed.
If you omit the -setPolicy option, the QNX Software Center command line uses the conservative update policy by default. For more information on update policies, including examples, see Edit installation properties.”
-reportArch target_architecture
Set the target architecture for the report generated by the -reportImportQScan option.
The target_architecture argument specifies one of the architectures supported by the QNX Software Development Platform (SDP):
  • aarch64le
  • armle-v7
  • x86
  • x86_64
-reportFormat format
Format the properties in the manifest report.
You can set the format argument to one of the following values:
  • csv — Format properties as comma-separated values (i.e. in target manifest format).
  • useinfo — Format properties as field-value pairs, with one property per line.
This option lets you format reports generated by -fileInfo, -fileSearch, or -reportImportQScan.
If you omit this option, the QNX Software Center generates the report in target manifest format.
-reportImportQScan qscan_manifest
Import the specified target manifest file and generate a report.
This option lets you create a report for a target manifest generated through a tool like Qscan. See Generate a manifest for more information.
The report compares the scanned properties of each file in the target manifest to the properties defined for that file on the myQNX server. If the QNX Software Center can't connect to the server, the report compares the scanned properties to the properties data for the active installation. (You can use -destination to choose the active installation.) In either case, the Errors field in the report flags any detected mismatches. See Manifest report fields for more information.
You can use -reportArch to specify the target architecture for the report, -reportFormat to format the report data, -reportPresentation to apply a template to the report, and -reportSaveAs to save the report to a file.
-reportPresentation template

Apply the specified report template to the manifest report.

This template: Lets you identify:
subsystem Target subsystems that may require a production licensing agreement
packages Properties (name, ID, version, etc.) of each file's parent package
targetscan Path, size, architecture, build ID, parent package, and other properties of each file
notice Various compliance properties (end-user license, OSS compliance, eligibility for redistribution, etc.) of each file
all All available properties of each file
This option lets you apply a template to reports generated by -fileInfo, -fileSearch, or -reportImportQScan.
If you omit -reportPresentation, the QNX Software Center uses the all template by default.
To see which fields are included in each template, launch the QNX Software Center GUI, click Create Reports, click New Report, and then click the Report Template dropdown menu.
-reportSaveAs path
Save the manifest report to the specified file.
This option lets you save reports generated by -fileInfo, -fileSearch, or -reportImportQScan.
If you omit this option, the QNX Software Center writes the report output to stdout.
-selfUpdate
Update to the latest available version of the QNX Software Center.
The QNX Software Center will attempt to update itself before executing any other specified options. See also the -version option.
-setRootAll
Mark all installed packages as root packages
CAUTION:
The -setRootAll option is deprecated. We recommend that you avoid using it.
-syncLicenseKeys
Retrieve registered license keys from the user's myQNX account.
This option saves you the effort of having to add license keys manually. After you invoke this option, you can invoke -activateAll to activate your products.
This option requires the myQNX authentication options, -myqnx.user and -myqnx.password.
-uninstallBaseline install_path
Remove the installation located in the specified path.
This option performs the same removal operations as the -cleanInstall option and the Remove Installation command in the GUI.
CAUTION:
This option deletes all of the files in the specified installation.
-uninstallPackage package_id[/package_version][,package_id[/package_version]...]
Uninstall the specified package from the active installation.
CAUTION:

Don't include any spaces in the argument.

If you wish to uninstall multiple packages, specify all of them with a single -uninstallPackage option. Don't use a separate -uninstallPackage option for each package.

-unlockPatchSet patchset_id
Unlock the specified patch set.
This option allows packages specified in the patch set to be updated. It affects the installation in the path specified by -destination.
-updateAll
Update all packages to the latest version available.
This option affects the installation in the path specified by -destination.
-updatePackage package_id[/package_version]
Update the specified package to the specified version.
If you omit package_version, the package will be updated to the latest version available.
This option affects the active installation.
-useInstallationVariant key=value
Set the installation variant according to the specified license type.
For example, if you have a build server license key and are installing QNX SDP 7.1 or later, specifying -useInstallationVariant lic.buildserver=true will automatically add and activate that key for your installation; you don't need to use -addLicenseKey.
-verifyInstallation
Verify the active installation.
If the verification fails (for instance, the installation contains missing or modified files), the QNX Software Center sets an exit code of 4. Otherwise, it sets an exit code of 0.
-version
Display the version of the QNX Software Center installed on this machine. See also the -selfUpdate option.
@options_file
Read command-line arguments from the specified file. The file must contain one argument per line.

Description

The qnxsoftwarecenter_clt script lets you run the QNX Software Center from the command line. The script uses the same infrastructure as the QNX Software Center’s GUI: everything you do at the command line is reflected in the GUI, and vice versa. The script is located under the root of your hard drive in the \QNX\QNX Software Center directory (for instance, C:\QNX\QNX Software Center in Microsoft Windows).

myQNX authentication and cache synchronization

Several command-line options need to communicate with the remote myQNX server, including those that install or update packages, add or synchronize license keys, or activate products. When using any of these options, include the myQNX authentication options, -myqnx.user and -myqnx.password.

The -mirror option, which synchronizes the contents of your local cache with package metadata on the remote myQNX server, also requires the myQNX authentication options. You should use -mirror at least once before using options that need to communicate with the remote myQNX server. If you are writing installation scripts, avoid invoking -mirror multiple times as it can reduce performance significantly.

Installation directory

The -destination option lets you specify the installation directory for any commands that install, uninstall, or query packages on disk. You must include it when using the -installBaseline option. In most cases, you need to use it only once, before calling -installBaseline. All subsequent commands will assume the same destination. You can omit -destination altogether if you work with only one installation. That said, we recommend that you always use it if you are writing scripts.

License keys

Before installing a licensed product, you must add the license key for that product. To add a license key manually, you can use -addLicenseKey, which also attempts to activate the product. Alternatively, you can use -syncLicenseKeys, which automatically synchronizes the license keys on your workstation with those deployed to you on the remote server. After using -syncLicenseKeys, use -activateAll to activate your products.

Note: If you are using the QNX Software Center offline, you must use the GUI to activate your products. See Perform manual product activation for instructions.
Patch sets

The qnxsoftwarecenter_clt script supports several options for working with patch sets, which allow you to install a specific set of products, patches, and updates. See Export and import patch sets for more information.

Proxies

In most cases, you can ignore the proxy options. You need them only if your workstation sits behind a proxy server. If your proxy server supports HTTP and HTTPS, you can omit the http and https prefixes and issue a single set of proxy commands for both HTTP and HTTPS. Otherwise, issue a set of -http commands for HTTP and a separate set of -https commands for HTTPS.

If you encounter proxy connection issues, see the QNX Software Center Technotes: http://www.qnx.com/qsc_technotes.

Reports

The qnxsoftwarecenter_clt script supports several options (-fileInfo, -fileSearch, -reportImportQScan, etc.) for creating manifest reports. These reports can help you perform compliance audits by indicating, for example, which subsystem a file belongs to, whether you can redistribute the file at runtime, or whether the file contains open source software. For information on using these options, see the individual option descriptions and the Using the command line section of the Manifest Reports & File Lookup chapter.

Directory structure

The QNX Software Center writes data to the following directories in your home directory:

This directory: Contains:
.qnx/swupdate/ User settings and cache.
.qnx/swupdate/swupdate_profiles

Package installation metadata.

The QNX Software Center needs this directory to see your installations and installed packages.

.qnx/license/

Licenses for the QNX Software Development Platform (SDP) and other products.

The QNX Software Center uses this directory to store information about your product activations; if anything happens to the directory, you’ll no longer be able to use the products. If this occurs, contact your license administrator, who can issue a special request to have your products deactivated (which will then allow you to reactivate them).

.qnx/qconfig/ Metadata that the QNX Momentics IDE and other tools use to find the list of installed baseline packages.