Qbs Manual | Installing Files

Qbs 1.16.0

Running Applications ◦ Target Platforms

# Installing Files

To install your project, specify the necessary information in the project file:

      Application {
          Group {
              name: "Runtime resources"
              files: "*.qml"
              qbs.install: true
              qbs.installDir: "share/myproject"
          }
          Group {
              name: "The App itself"
              fileTagsFilter: "application"
              qbs.install: true
              qbs.installDir: "bin"
          }
      }

In this example, we want to install a couple of QML files and an executable. The actual installation is then done like this (using the default profile):

      qbs --clean-install-root qbs.installRoot:/tmp/myProjectRoot

Here, we want the `installDir` properties from the project file to be interpreted relative to the directory `/tmp/myProjectRoot`, and we want that directory to be removed first.

If the qbs.installRoot property is not given, a default is used, namely `<build root>/install-root`.

For more information about how the installation path is constructed, see Installation Properties.

Running Applications ◦ Target Platforms