Alias Definition File | Qt Installer Framework Documentation

- Qt Installer Framework Documentation
- Alias Definition File

Configuration File ◦ Controller Scripting

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

Element | Description
--- | ---
Name | Name of component alias.
DisplayName | Human-readable name of the component alias.
Description | Human-readable description of the component alias.
Version | Version number of the component alias.
Virtual | Set to `true` to hide the component alias from the installer. This also makes the alias unselectable by the user.
RequiredComponents | Comma-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.
RequiredAliases | Comma-separated list of aliases that this component alias requires. The required aliases are selected for installation when this component alias is selected.
OptionalComponents | Comma-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.
OptionalAliases | Comma-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.

Configuration File ◦ Controller Scripting