Creating Online Installers
Online installers fetch the repository description (Updates.xml), in addition to the one stored inside of the binary. Create a repository and upload it to a web server. Then specify the location of the repository in the config.xml file that you use to create the installer.
repogen tool to create online repositories of all packages of one package directory:
repogen.exe -p <package_directory> <repository_directory>
For example, to create a repository that contains only org.qt-project.sdk.qt and org.qt-project.sdk.qtcreator, enter the following command:
repogen.exe -p packages -i org.qt-project.sdk.qt,org.qt-project.sdk.qtcreator repository
When the repository has been created, upload it to a web server. You must specify the location of the repository in the installer configuration file.
<RemoteRepositories> element in the installer configuration file (config.xml) can contain a list of several repositories. Each of them can have the following settings:
<Url>, which points to a list of available components.
<Enabled>, with 0 disabling this repository.
<Username>, which is used as user on a protected repository.
<Password>, which sets the password to use on a protected repository.
<DisplayName>, which optionally sets a string to display instead of the URL.
The URL needs to point to the Updates.xml file that lists the available components. For example:
<RemoteRepositories> <Repository> <Url>http://www.example.com/packages</Url> <Enabled>1</Enabled> <Username>user</Username> <Password>password</Password> <DisplayName>Example repository</DisplayName> </Repository> </RemoteRepositories>
The installer works only if it can access the repository. If the repository is accessed after the installation, the maintenance tool rejects installation. However, uninstallation is still possible. A repository can be enabled or disabled by default. For repositories requiring authentication, the details can also be set here, although entering a password here is usually not advisable as it is saved in plain text. Authentication details not set here will be gotten at runtime using a dialog. The user can work around these settings at runtime.
To create an online installer by using the
binarycreator tool, enter the following command:
<location-of-ifw>\binarycreator.exe -t <location-of-ifw>\installerbase.exe -p <package_directory> -c <config_directory>\<config_file> -e <packages> <installer_name>
For example, enter the following command to create an installer binary called SDKInstaller.exe that will not contain data for org.qt-project.sdk.qt and org.qt-project.qtcreator, because those packages are downloaded from a remote repository:
binarycreator.exe -p installer-packages -c installer-config\config.xml -e org.qt-project.sdk.qt,org.qt-project.qtcreator SDKInstaller.exe
Even if the components are fetched from a web server,
binarycreator adds them to the installer binary by default. However, when the installer checks the web server for updates, end users are spared a download if new versions are not available.
Alternatively, you can create online installers that do not contain any data and that fetch all the data from the web server. Use the
-n parameter of the
binarycreator tool and only add the root component to the installer. Usually the root component is empty and hence only adds the XML description of the root.
For more information about the options that you have, see Summary of binarycreator Parameters.
© 2017 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. The Qt Company, Qt and their 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.