Online SDK Workflow
The installable content in your online SDK can contain any kind of applications and tools. What ever your content is, it is important that you build the content before building the online repositories for the content.
The following topics instruct how you can build the Qt related content:
- Building Qt 5 from Git instructs how to build Qt from sources.
- Building Qt Creator from Git instructs how to build Qt Creator from sources.
After you have the content available, you can publish your content to the web server. The following picture illustrates the required steps in a high level:
The following topics describe how you can build the Qt Installer Framework, the online installer, and repositories with scripts that are available in the Qt SDK Git repository. You must clone the repository before you can use the scripts.
You can build the Qt Installer Framework with Build Installer Framework Tools Script by running the following command in a terminal:
python bld_ifw_tools.py --qt_archive_uri=<path of <Qt source package>.tar.gz> --ifw_uri=<Qt Installer Framework source path>
--qt_archive_uri defines a path of Qt sources that are used in the Qt Installer Framework build. The Qt sources must be available as a .tar.gz package.
--ifw_uri defines a path of Qt Installer Framework sources. The path can be a Git repository address or a path of a .tar.gz source package.
If you clone the Qt Installer Framework sources via Git, you need add the related branch as follows:
python bld_ifw_tools.py --qt_archive_uri=<path of <Qt source package>.tar.gz> --ifw_uri=<Qt Installer Framework source path> --ifw_branch=<branch> --openssl_dir =<OpenSSL path in your system>
--ifw_branch defines the Git branch of Qt Installer Framework.
A successful Qt Installer Framework build generates target platform specific .7z files that you need to copy to your local network drive under some base directory (1). For example, Qt Installer Framework build may generate the following files for Linux:
|Generated IFW file||Path where to copy the file in a local server|
As mentioned in Creating Installers, you need to have a configuration file called config.xml that contains information about how to build the online installer binaries and the repositories. See http://code.qt.io/cgit/qtsdk/qtsdk.git/tree/packaging-tools/configurations/linux/config.xml.template.linux-x64.qt5-sdk for an example of the config.xml in the Qt release. You should note that the <Url> element in the config.xml must contain a URL that points to a server that is used in your SDK environment.
You can use Create Installer Script for building the online installer. You should note that the script uses the Qt Installer Framework that you have built and copied under some base directory on your local network drive (1). The script has the following command line arguments:
|A command line argument||Description|
|--online||An online installer is created.|
|-c||A directory of the installer configurations. For example, http://code.qt.io/cgit/qtsdk/qtsdk.git/tree/packaging-tools/configurations.|
|-f||A path of the installer configuration file. For example, http://code.qt.io/cgit/qtsdk/qtsdk.git/tree/packaging-tools/configurations/online_installer_jobs/opensource/linux_x64_online.|
|--ifw-tools||A path of the prebuilt Qt Installer Framework tools (.7z). See Building Qt Installer Framework.|
|-u||A server URL of the archives (.7z).|
|--preferred-installer-name||A full installer name. The name includes a file extension (.run, .exe, .app).|
|--create-repo||Creates a new repository.|
The following code provides an example of how to use create_installer.py for building an online installer:
python create_installer.py --online -c=/user/builder/myinstaller_configs -f=/user/builder/myinstaller_configs/online_installer_main_conf_file --ifw-tools=http://my.local.server/base_directory/tools/ifw/installer-framework-linux.7z -u http://my.local.server/some/basedir --preferred-installer-name=myinstallername
With Create Installer Script, you can also build the online repositories. See Building Online Installer for information about the command line arguments. The following code provides an example of how to use create_installer.py for creating a new repository:
python create_installer.py --create-repo -c=/user/builder/myinstaller_configs -f=/user/builder/myinstaller_configs/online_installer_main_conf_file --ifw-tools=http://my.local.server/some/basedir/tools/ifw/installer-framework-linux.7z -u http://my.local.server/some/basedir
As an output, a new repository is created under a directory called /repository. For example, the repository content can be as follows:
repository/qt.595.gcc_64/<version>meta.7z repository/qt.595.src/<version>meta.7z repository/qt.595.doc/<version>meta.7z repository/qt.595.examples/<version>meta.7z
The <version> (2) is defined in the component's package.xml file (see Package Directory).
Before you update the existing repositories in the web server, you must ensure that you have updated the version number (2) in the component's package.xml file (see Package Directory). This version number is used in the generated file name of the .7z content file. For example, see the <Version> element in http://code.qt.io/cgit/qtsdk/qtsdk.git/tree/packaging-tools/configurations/pkg_templates/pkg_593/qt.593.gcc_64/meta/package.xml.
In case you do not remember to update the version numbers, the online installer gives a checksum failure error for the end user during the installation.
Updating the content to the online server has the following steps:
- Update the new content to the web server. Note that the version number of the content differs from the version of old content. Thus both the old and the new content can exist at the same time in the server.
- Wait until all the new content has been synchronized to the online server.
- Make new repositories available to end users by overwriting the Updates.xml file in the root of the repository directory. All the new content should nwo be available in the server as Updates.xml directly refers to it.
- Wait for example one day and delete the old content (.7z files) from the online server.
© 2020 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.