InstallPackage

Archive of an installed project. More...

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

© 2022 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.