Alias Definition File

The alias definition file defines the available component aliases and their properties. The file is typically called aliases.xml and located in the config directory.

The component names of the Qt Installer Framework follow a domain-like identifier syntax, for example com.vendor.root, com.vendor.root.subcomponent, and so on. While this allows an easy way to construct a tree from the components when running the installer in graphical mode, the names can be unintuitive for command line usage, where the components are not displayed in a tree view.

Instead of relying on the domain-like names for CLI usage, the packager can also define component aliases for existing components. An alias is another name for a single component or a collection of components. It can be used to declare alternative names for existing components that are easier to type and combine multiple components under the same alias name, for easier selection.

The following example shows a possible alias definition file:

<?xml version="1.0"?>
<Aliases>
    <Alias>
        <Name>package-full</Name>
        <DisplayName>Full installation package</DisplayName>
        <Description>Complete installation of the product</Description>
        <Version>1.0.0</Version>
        <Virtual>false</Virtual>
        <RequiredAliases>package-essential</RequiredAliases>
        <RequiredComponents>com.vendor.root.extras</RequiredComponents>
        <OptionalAliases>package-optional</OptionalAliases>
    </Alias>
    <Alias>
        <Name>package-essential</Name>
        <DisplayName>Essential components</DisplayName>
        <Description>Essential components for the product</Description>
        <Version>1.0.0</Version>
        <Virtual>false</Virtual>
        <RequiredComponents>com.vendor.root.essential</RequiredComponents>
    </Alias>
    <Alias>
        <Name>package-optional</Name>
        <DisplayName>Optional components</DisplayName>
        <Description>Optional components for the product</Description>
        <Version>1.0.0</Version>
        <Virtual>false</Virtual>
        <OptionalComponents>com.vendor.root.optional1,com.vendor.root.optional2</OptionalComponents>
    </Alias>
</Aliases>

Summary of Alias Definition File Elements

The following table summarizes the elements in the alias definition file.

ElementDescription
NameName of component alias.
DisplayNameHuman-readable name of the component alias.
DescriptionHuman-readable description of the component alias.
VersionVersion number of the component alias.
VirtualSet to true to hide the component alias from the installer. This also makes the alias unselectable by the user.
RequiredComponentsComma-separated list of identifiers of components that this component alias requires. The components are selected for installation when the component alias is selected. Note that the components must be selectable by the user, so virtual or otherwise unselectable components cannot be listed as a requirement.
RequiredAliasesComma-separated list of aliases that this component alias requires. The required aliases are selected for installation when this component alias is selected.
OptionalComponentsComma-separated list of identifiers of components that this component alias optionally depends on. The components are selected for installation when the component alias is selected, if the components exists and are user selectable. Even if the components cannot be found in the installer, this alias is not marked unstable.
OptionalAliasesComma-separated list of aliases that this component alias optionally depends on. The listed aliases are selected for installation when this component alias is selected, if the aliases exist. Even if the aliases don't exists in the installer, this alias is not marked unstable.

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