Unattended installation on Linux or macOS

Updated: September 12, 2023

The process of setting up an unattended installation on Linux or macOS comprises the following steps:

  1. Install the QNX Software Center
  2. Activate your license
  3. Add a QNX SDP installation
  4. Install packages or updates
  5. Set up the QNX SDP environment

Install the QNX Software Center

Note:

You need to use these installation instructions only if you're creating a deployment script for multiple hosts. If you're installing the QNX Software Center on just one machine, you can use the standard procedure for running the installer, as described in the QNX Software Center Installation Note.

For details, visit http://www.qnx.com/download/group.html?programid=29178 and click the link to the QNX Software Center “Installation/Release notes”.

Issue the following commands to download and run the QNX Software Center installer for Linux or macOS:

  1. Create the ~/.qnx directory, if it doesn’t already exist:
    mkdir ~/.qnx
  2. Set the MYQNX_USER and MYQNX_PASSWORD variables to your myQNX username and password.
  3. Log in to your myQNX account:
    curl -v --cookie-jar ~/.qnx/myqnxcookies.auth --form "userlogin=$MYQNX_USER" 
      --form "password=$MYQNX_PASSWORD" -X POST https://www.qnx.com/account/login.html 
      > login_response.html
  4. Determine the URL of the latest QNX Software Center installer:

    1. In your web browser, go to www.qnx.com
    2. Select the Developers tab, then select QNX Software Center.
    3. Scroll down and click the link labeled QNX Software Center version_number build_number - Linux Hosts or QNX Software Center version_number build_number - macOS Hosts.
    4. Right-click Download Now and copy the link address to your clipboard.
    5. Paste the link address into the curl command described in the next step.
  5. Get the installer.

    For Linux, enter this command:
    curl -v -L --cookie ~/.qnx/myqnxcookies.auth installer_URL > qnx-setup-lin.run
    And for macOS, enter this command:
    curl -v -L --cookie ~/.qnx/myqnxcookies.auth installer_URL > QNX\ Software\ Center.pkg
  6. To ensure you are using the official installer, verify that the checksum of the downloaded file matches the checksum posted on the QNX website.
  7. Make the installer executable.

    For Linux, enter this command:
    chmod a+x ./qnx-setup-lin.run
    And for macOS, enter this command:
    chmod a+x ./QNX\ Software\ Center.pkg
  8. Run the installer.

    CAUTION:

    By running the below command, you automatically accept the EULA presented by installer.

    If the installation is to be deployed on a build server, make sure that the user that runs the installer is the same user that will run the builds. (Note that build server licenses aren't supported on macOS machines.)

    For Linux, enter the following command, which installs the QNX Software Center in ~/qnxinstall/qnxsoftwarecenter/. You can specify a different parent directory, if required:
    ~/qnx-setup-lin.run force-override disable-auto-start agree-to-license-terms ~/qnxinstall
    For macOS, enter the following command, which installs the QNX Software Center in /Applications/QNX Software Center.app. You can specify a different parent directory, if required:
    sudo installer -pkg QNX\ Software\ Center.pkg -target /
  9. Close the QNX Software Center desktop client if it launches after the installer has completed running.

Activate your license

  1. Change your working directory to the directory where you installed the QNX Software Center (see Install the QNX Software Center, above).
  2. Enter the following command to get and activate your assigned license:
    qnxsoftwarecenter_clt -syncLicenseKeys 
      -myqnx.user="$MYQNX_USER" -myqnx.password="$MYQNX_PASSWORD" 
      -addLicenseKey license_key -listLicenseKeys

Note the following:

Note: See the “Command Line” chapter of the QNX Software Center User's Guide for details on -addLicenseKey and on other options used in the examples provided here.

Add a QNX SDP installation

You can install QNX SDP directly from the command line or by using a patch set. We recommend using a patch set if you need to tailor the QNX SDP installation to your project requirements.

Installing from the command line
To add an installation directly from the command line:

  1. Mirror package metadata from the remote myQNX server into the local cache:
    qnxsoftwarecenter_clt -mirror -myqnx.user="$MYQNX_USER" -myqnx.password="$MYQNX_PASSWORD"
  2. Add the QNX SDP installation:
    qnxsoftwarecenter_clt -cleanInstall -destination ~/qnx700 
        -installBaseline com.qnx.sdp/7.0 -myqnx.user="$MYQNX_USER" 
        -myqnx.password="$MYQNX_PASSWORD"

    Note the following:

    • This example installs QNX SDP 7.0 in the ~/qnx700/ directory, but you can specify a different QNX SDP version or directory.
    • Because this command includes the -cleanInstall option, it will remove the current QNX SDP installation, if one exists, before adding the new one.
    • This command installs all available updates. To choose a different update policy, use the QNX Software Center's -setPolicy command-line option. For more information on update policies, see “Edit Installation Properties” in the QNX Software Center User's Guide.

    Installing QNX SDP 7.1 with a build server license?

    If you're installing QNX SDP 7.1 and using a build server license key, add the installation with this command instead:
    qnxsoftwarecenter_clt -destination ~/qnx710 -installBaseline com.qnx.qnx710 
        -useInstallationVariant lic.buildserver=true -listLicenseKeys 
        -myqnx.user="$MYQNX_USER" -myqnx.password="$MYQNX_PASSWORD"

    Note the following:

    • The -useInstallationVariant lic.buildserver=true option automatically adds and activates your build server key. This option works only with QNX SDP 7.1; to add a QNX SDP 7.0 build server installation, use the approach shown at the beginning of step 2.
    • This command should be performed by the same user that will run the builds. Otherwise, the licenses will be installed in wrong home directory and the license check that the compiler performs will fail.
    • This command installs all available updates. To choose a different update policy, use the QNX Software Center's -setPolicy command-line option. For more information on update policies, see “Edit Installation Properties” in the QNX Software Center User's Guide.

Using a patch set

If you wish to use a patch set that specifies the QNX SDP products and patches you want to install, we recommend that you use the QNX Software Center’s GUI to export the patch set. (If your machine is headless, you'll need to run the GUI on a separate host.) You can then copy and import the patch set to your machine to create the actual QNX SDP installation. See “Export and import patch sets” in the QNX Software Center User's Guide for more information.

To add the installation, using a patch set:

  1. Copy the patch set to your machine (to your home directory, for example).
  2. Change your working directory to the directory where you installed the QNX Software Center (see Install the QNX Software Center, above). For example, in Linux, the directory could be ~/qnxinstall/qnxsoftwarecenter/ and in macOS, it could be /Applications/QNX Software Center.app/Contents/Eclipse/.
  3. Mirror package metadata from the remote myQNX server into the local cache:
    qnxsoftwarecenter_clt -mirror -myqnx.user="$MYQNX_USER" -myqnx.password="$MYQNX_PASSWORD"
  4. Import the patch set to add the QNX SDP installation:
    qnxsoftwarecenter_clt -cleanInstall -destination ~/qnx700 
        -myqnx.user="$MYQNX_USER" -myqnx.password="$MYQNX_PASSWORD" 
        -importAndInstall ~/my_patchset.qpkg

    Note the following:

    • This command adds the QNX SDP installation to the ~/qnx700/ directory; it also assumes that you've copied the patch set to your home directory. You can change these settings, if required.
    • Because this command includes the -cleanInstall option, it will remove the current QNX SDP installation, if one exists, before adding the new one.
    • This command installs all available updates. To choose a different update policy, use the QNX Software Center's -setPolicy command-line option. For more information on update policies, see “Edit Installation Properties” in the QNX Software Center User's Guide.

Install desired packages or updates

You can now add any desired addons or patches to the QNX SDP installation. You can also update existing packages, if required.

For instance, to update all packages in the installation to the latest version available, you can issue this command:
qnxsoftwarecenter_clt -myqnx.user="$MYQNX_USER" -myqnx.password="$MYQNX_PASSWORD"
    -destination ~/qnx700 -updateAll
And to install a specific package, you can issue this command:
qnxsoftwarecenter_clt -myqnx.user="$MYQNX_USER" -myqnx.password="$MYQNX_PASSWORD" 
    -destination ~/qnx700 -i package

For instance, to install the fictional package “com.qnx.mkfiles/7.0.0.E201701111049”, you would specify -i com.qnx.mkfiles/7.0.0.E201701111049. Note that -i is simply an alias for the -installPackage option.

CAUTION:
If you wish to install multiple packages, specify all of them with a single -installPackage option. See the “Command Line” chapter of the QNX Software Center User's Guide for details on using -installPackage.

Set up the QNX SDP environment

Once you've created the QNX SDP installation, you need to set up the QNX SDP environment, using the qnxsdp-env.sh script. See the “Compiling and Debugging” chapter of the QNX Neutrino Programmer's Guide for more information.