qt_am_create_installable_package

Note: This command is in technology preview and may change in future releases.

Synopsis

qt_am_create_installable_package(
    target
    SOURCE_DIR <dir>
    OUTPUT_PACKAGE <package.ampkg>
)

If versionless commands are disabled, use qt6_am_create_installable_package() instead. It supports the same set of arguments as this command.

Description

Adds a custom target that, when executed, uses the appman-packager tool to create a package for the application found in SOURCE_DIR. The result is written to OUTPUT_PACKAGE.

The complete content of the source directory is packaged, which works out of the box for QML-only applications, but needs installation rules to temporary directories for more sophisticated setups (e.g. QML plugins).

The info.yaml manifest from SOURCE_DIR is added as source file to the target.

Note: This function will serve as an anchor for the application manager's QtCreator integration to discover the available packages in a System UI.

Examples

Here is a snippet from the applicationmanager/package-installation example, showing how this function is used there:

foreach (PKG_NAME red green)
    qt6_am_create_installable_package(package-installation-create-${PKG_NAME}-ampkg
        SOURCE_DIR     ${CMAKE_CURRENT_SOURCE_DIR}/installable-apps/hello-world.${PKG_NAME}/
        OUTPUT_PACKAGE ${CMAKE_CURRENT_BINARY_DIR}/ps-data/upload/hello-${PKG_NAME}.ampkg
    )
    add_dependencies(package-installation package-installation-create-${PKG_NAME}-ampkg)
endforeach()

© 2024 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.