After applications have been packaged by the
appman-packager tool, they can be installed by the application manager at runtime. There are two interfaces for this functionality:
- a QML interface for use within the application manager process
- a D-Bus interface for use by any process that is allowed to talk to the application manager's
Both interfaces are very similar and are described in the PackageManager.
Note: A prerequisite for dynamically installed application packages is a valid
installationDir configuration for the application manager.
When triggering a package installation, you have to provide a URL to the application manager as the source of the package. Out of the box, the application manager accepts the following schemes:
|A local filesystem path.|
|A remote path that is downloaded via QNetworkAccessManager.|
|A path to a UNIX-domain socket in the local filesystem. This is very useful for streaming in packages, if you do not want to (or can) use the built-in downloader, or if your packages are wrapped inside another customer-specific distribution file format.|
All of the above methods work asynchronously and also support streaming: this means that the actual installation is done while the package is being downloaded. If the package is successfully verified after the download, it only needs a quick finalization step. Otherwise, if an error occurred, the installation process is simply canceled and rolled back.
To use signed packages, you require a Public Key Infrastructure (PKI) to support this, which means that you need two Certificate Authorities (CAs):
- A Developer CA: responsible for creating certificates that are distributed to developers in P12 format. The developers use these certificates to developer-sign their packages, using the Packager, before submitting to an app store.
- An App-Store CA: responsible for creating certificates for use by app store server backends to store-sign packages, before they are downloaded and installed onto devices.
Both these CAs can be the same or they can be derived from a common root CA.
For the device, you need to install one or both of these CA certificates, including any root or intermediary ones. But, this depends on the type of package you want the user to be able to install. Which CA certificates to load is specified via the config file.
The application manager sources has a script,
tests/data/certificates/create-test-certificates.sh, that sets up such a PKI for the internal unit tests. This script is not for use in production, but only for use in developing with signed packages.
© 2019 Luxoft Sweden AB. 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.