Qbs

Blog Documentation Get Qbs
  • Qbs Manual
  • QbsConvenienceItems
  • InstallPackage
  • Qbs 2.1.1
  • InstallPackage QML Type

    Archive of an installed project. More...

    Import Statement: import QbsConvenienceItems
    Inherits:

    Product

    Detailed Description

    An InstallPackage item is a product of the type archiver.archive that has a dependency on the archiver module. It is used to produce an archive from a set of installable files.

    Consider the following example project:

    Project {
        CppApplication {
            name: "myapp"
            Depends { name: "mylib" }
            files: ["main.cpp"]
            Group {
                fileTagsFilter: product.type
                qbs.install: true
                qbs.installDir: "bin"
            }
        }
        DynamicLibrary {
            name: "mylib"
            files: ["mylib.cpp"]
            Group {
                name: "public headers"
                files: ["mylib.h"]
                qbs.install: true
                qbs.installDir: "include"
            }
            Group {
                fileTagsFilter: product.type
                qbs.install: true
                qbs.installDir: "lib"
            }
        }
    
        InstallPackage {
            archiver.type: "tar"
            name: "tar-package"
            Depends { name: "myapp" }
            Depends { name: "mylib" }
        }
    }

    Building the product "tar-package" on a Unix system will result in a tar file with these contents:

    include/mylib.h
    lib/libmylib.so
    bin/myapp