Tools

The Qt Installer Framework contains the following tools:

installerbase

The installerbase tool describes the core installer itself. All data and meta information will be packed to this binary. For the installer creation process you will not need to call it directly.

binarycreator

Use the binarycreator tool to create offline and online installers. Component information and data are appended to the offline installer binary, which enables the file extraction and post installation scripts to work without an Internet connection.

Online installers store the location of the repository that contains the data. On startup, they load the component information, not the data.

You can also create hybrid installers that store some components locally and receive others via a network connection. For more information, see ###TODO insert link here.

For information about how to implement data integration into the installer binary, see QInstaller::BinaryContent.

Note: If you change this configuration, you must recompile the installerbase tool.

Using binarycreator

You can use the binarycreator tool to create offline and online installers. Some options have default values, and therefore, you can omit them.

To create an offline installer (in Windows), enter the following command:

  • On Windows:
    <location-of-ifw>\binarycreator.exe -t <location-of-ifw>\installerbase.exe -p <package_directory> -c <config_directory>\<config_file> <installer_name>
  • On Linux and OS X
    <location-of-ifw>/binarycreator -t <location-of-ifw>/installerbase -p <package_directory> -c <config_directory>/<config_file> <installer_name>

To create an online only installer, you can use the --online-only which defines all packages to install from an online repository on a web server:

  • On Windows:
    <location-of-ifw>\binarycreator.exe -t <location-of-ifw>\installerbase.exe -p <package_directory> -c <config_directory>\<config_file> -e <packages> <installer_name>
  • On Linux and OS X
    <location-of-ifw>/binarycreator -t <location-of-ifw>/installerbase -p <package_directory> -c <config_directory>/<config_file> -e <packages> <installer_name>

Summary of binarycreator Parameters

The binarycreator tool accepts the following parameters:

ParameterUse
-t or --template fileUse file as an installer template binary to which the component information is appended. If you omit this parameter, the installerbase template is used.
-p or --packages directoryUse directory as the package directory. Defaults to the current working directory.
-n or --online-onlyCompile without any component in the installer binary.
-f or --offline-onlyCreate an offline installer that never accesses online repositories.
-c or --config fileUse file as the config file.
-e or --exclude p1,...,pnComma-separated list of packages to retrieve from an online repository. The packages are not included in the installer binary.
-i or --include p1,...,pnComma-separated list of packages to retrieve from the installer binary. You cannot combine or merge --include and --exclude.
-r or --resourcesComma-separated list of resources to include in the installer binary.
--ignore-translationsDisable the use of translation files to make testing faster.
--ignore-invalid-packagesIgnore component or package directories that do not have valid metadata information (package.xml) to make testing faster.
-v or --verboseDisplay debug output.

These parameters are followed by the name of the target binary and a list of packages to be available for installation.

Note: The listed packages are included in the installer, as well as all their dependencies and all packages that share the same prefix, unless you specify the --nodeps parameter.

On Windows, the name of the target binary is automatically extended with .exe, if you do not specify the extension. On Mac, the target is created as an application bundle with the extension .app, which is automatically added, if not supplied. Additionally, you can specify the .dmg extension, which creates a DMG disk image that contains an .app bundle.

Using Icons

On OS X, if the target binary is suffixed with .app, a OS X application bundle is created. The icon that you specify in config.xml is extended with .icns and used as the icon for the created bundle.

On Windows, the icon that you specify in config.xml is extended with .ico and used as the application icon for the .exe file.

On Linux, the icon that you specify in config.xml is extended with .png and used as the window icon.

repogen

Use the repogen tool to generate online repositories.

The repogen tool expects the following parameters in the following order:

repogen.exe -p <package_directory> <repository_directory>

When the repository has been created, you can upload it anywhere. You must specify the location in the installer configuration file when creating an installer for it.

Summary of repogen Parameters

ParameterUse
-p or --packages directoryUse directory as the package directory. This is mandatory.
repository directoryTarget directory for the repository. During an initial installation, the directory must not yet exist. When updating, the directory may exist and its contents may be overwritten or removed. This is mandatory.
-e or --exclude p1,...,pnComma-separated list of packages to be ignored from the set of all packages in the packages directory.
-i or --include p1,...,pnComma-separated list of packages to be used from the set of all packages in the packages directory.
--updateUpdate all packages in the packages directory. The list can be further filtered with the -i, -e parameters.
--update-new-packagesUpdate only packages that are new or have a newer version. The list can be further filtered with the -i, -e parameters.
-r or --removeForce removal of existing target directory before generating it again.
-v or --verboseDisplay debug output.

Note: We recommend that you use the --update-new-packages parameter to update an existing repository, especially if you have a content delivery system. This helps you avoid updating components that have not changed and this makes it much easier for a content delivery system to distribute only new files, because only the updated components are assigned new SHA checksums.

archivegen

You can use archivegen to package files and directories into 7zip (.7z) archives.

The archivegen tool expects the following parameters in the following order:

archivegen <name.7z> <data>

Where <name.7z> is the path and file name of the archive to create and <data> contains the paths and names of the files or directories to package into the archive, separated by spaces.

devtool

You can use devtool to update an existing installer or maintenance tool with a new installer base, to dump binary content from an installer or maintenance tool to a target, and to execute operations. For a summary of available operations, see Operations.

devtool expects the following parameters in the following order:

devtool [options] binary

Where binary is the path and name of an existing installer or maintenance tool.

Summary of devtool Parameters

ParameterUse
-?, -h, --helpDisplay help.
-v, --versionDisplay version information.
--verboseDisplay additional information.
--update <file>Update an existing installer or maintenance tool with a new installer base.
--dump <folder>Dump the binary content that belongs to an installer or maintenance tool into the target.
--operation <mode,name,args,...>Execute an operation with a list of arguments.

mode can be DO or UNDO, depending on whether the step contains instructions for the installer or uninstaller.

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