Planning Repository Structure

You should carefully plan an online repository structure before building the repositories. Consider the following items when you implement your SDK:

Amount of Updated Content

A full update of a very large repository might not be optimal, because uploading the repository content would take a long time. See Partially Updating Repositories for practical tips how to update repositories partially.

Flexible Repository Structure

You can keep the online repository structure flexible if you do not hard code the repository addresses into the online installer. Instead of hard coding the addresses, you can make the online installer point to a single repository.

For example, define a remote repository in your config.xml as follows:

<RemoteRepositories>
<Repository>
    <Url>https://mycompany.com/myonlinerepository/linux-x86_64/root</Url>
    <Enabled>1</Enabled>
    <DisplayName>MyCompany Linux-x64 root online repository</DisplayName>
</Repository>
</RemoteRepositories>

In the configuration file structure demonstrated in Building Online Installer, the remote repository is defined in http://code.qt.io/cgit/qtsdk/qtsdk.git/tree/packaging-tools/configurations/linux/config.xml.template.linux-x64.qt5-sdk.

For more information about the configuration file elements, see Configuration File.

In https://mycompany.com/myonlinerepository/linux-x86_64/root/Updates.xml under your root directory, define a list of updated repositories as follows:

<Updates>
<ApplicationName>{AnyApplication}</ApplicationName>
<ApplicationVersion>IFW_REPOSITORY_FORMAT_VERSION</ApplicationVersion>
<Checksum>true</Checksum>
<RepositoryUpdate>
    <Repository action="add" url="https://mycompany.com/myonlinerepository/linux-x86_64/desktop/qtcreator" displayname="description..."/>
    <Repository action="add" url="https://mycompany.com/myonlinerepository/linux-x86_64/desktop/another_cool_tool" displayname="description..."/>
    <Repository action="add" url="https://mycompany.com/myonlinerepository/linux-x86_64/desktop/qt58" displayname="description..."/>
    ...
</RepositoryUpdate>
</Updates>

Now you can make new repositories available to end users simply by adding a new line into the root repository Updates.xml. You can add repositories to any Updates.xml using the same syntax.

For general information about online repositories, see Creating Online Installers.

File Structure in Qt Releases

A Qt release provides a concrete example of a tree structure of an online repository. The tree structure corresponds to the structure that an end user sees in the Qt installer wizard's Select component page.

For example, the online installer contains the following tree structure:

qt
  57
    msvc2013 32-bit
    msvc2013 64-bit
    ...
    Android x86
  58
    msvc2015 32-bit
    msvc2015 64-bit
    ...
  ...
  Tools
  Qt Creator 4.1.0
  MinGW 5.3.0
  ...

You find a similar structure under the Qt release configuration directories in the Qt SDK Git repository. For example, see pkg_<Qt version> directories under http://code.qt.io/cgit/qtsdk/qtsdk.git/tree/packaging-tools/configurations/pkg_templates.

A particular package is included into an online repository via configuration files. For example, see http://code.qt.io/cgit/qtsdk/qtsdk.git/tree/packaging-tools/configurations/linux/x64/58/x86_64-qt58-gcc-conf.

Qt Configuration Files

The following syntax is used in the Qt configuration files:

Property nameDescriptionExample
archivesA comma-separated list of values that will be specified in a detailed level later in the file.archives: 58.gcc_64.qtbase, 58.gcc_64.qtconnectivity
target_install_baseA common base directory for all archives in a componenttarget_install_base: /%QT_VERSION_MINOR%/gcc_64
archive_urlThe location from where an archived content is fetched. The location can be an absolute file system path or a URL. By default, the path or the URL is appended to a base directory defined in target_install_base.archive_uri: /qt/%QT_VERSION_MINOR%/latest/qtbase/qtbase-Linux-RHEL_6_6-GCC-Linux-RHEL_6_6-X86_64.7z
package_strip_dirsCan get numerical values, for example 0, 1 or 3. The value defines the number of unnecessary directories that are stripped away from the path.package_strip_dirs is set as 3 and an archive path is /home/qtbuilder/build/<actual content>. After you have run build_wrapper.py, the archive is repackaged so that it has only <actual content> in the repository root directory. If the path is not stripped, an unnecessary directory structure is created in the end user host when they install the component.
target_install_dirDefines a subdirectory for archive installation.target_install_dir: /lib

A configuration file can refer to other configuration files. For example, see the [PackageConfigurationFiles] section in http://code.qt.io/cgit/qtsdk/qtsdk.git/tree/packaging-tools/configurations/offline_installer_jobs/5.8/linux_x64. It lists the included configuration files:

[PackageConfigurationFiles]
file_list:  qt-conf,
            qt-license-conf,
            qt-installer-changelog,
            qt58-src-conf,
            qt58-doc-examples-conf,
            x86_64-qt58-gcc-conf,
            x86_64-tools-qtcreator-qt58x-conf

See Package Directory for general information about the package directory structure.

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