summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorArttu Tarkiainen <arttu.tarkiainen@qt.io>2023-05-22 18:46:33 +0300
committerArttu Tarkiainen <arttu.tarkiainen@qt.io>2023-09-14 06:27:48 +0000
commit554aacf002690075872682b03e0bc836cf9cafe8 (patch)
tree5a2cc12d0c488068f3d5a6e2ec1a09a8701c8ffc /doc
parent21e13337359d3d5fe63631127530c18a3191e83d (diff)
Add support for component aliases
Introduce concept of component aliases, which act as an alternative way for referring a set of related components. Component aliases are declared in an alias definition file, which is included to the created installer's binary layout as a resource. The file lists the available aliases, including metadata - such as name, version, and description - and the list of components and other aliases the alias requires. Aliases can be referred only from the CLI for the time being, with the supported commands 'install' and 'search'. Task-number: QTIFW-2978 Change-Id: I281f171cc7d932ce496051d7090ae169a4709eec Reviewed-by: Katja Marttila <katja.marttila@qt.io>
Diffstat (limited to 'doc')
-rw-r--r--doc/examples/aliases.xml29
-rw-r--r--doc/examples/config.xml1
-rw-r--r--doc/includes/IFWDoc1
-rw-r--r--doc/installerfw-reference.qdoc1
-rw-r--r--doc/installerfw-using.qdoc16
-rw-r--r--doc/installerfw.qdoc90
6 files changed, 131 insertions, 7 deletions
diff --git a/doc/examples/aliases.xml b/doc/examples/aliases.xml
new file mode 100644
index 000000000..4b7ef0ebd
--- /dev/null
+++ b/doc/examples/aliases.xml
@@ -0,0 +1,29 @@
+<?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>
+ <RequiresAlias>package-essential,package-optional</RequiresAlias>
+ <RequiresComponent>com.vendor.root.extras</RequiresComponent>
+ </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>
+ <RequiresComponent>com.vendor.root.essential</RequiresComponent>
+ </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>
+ <RequiresComponent>com.vendor.root.optional1,com.vendor.root.optional2</RequiresComponent>
+ </Alias>
+</Aliases>
+
diff --git a/doc/examples/config.xml b/doc/examples/config.xml
index ef4598425..b04a413ec 100644
--- a/doc/examples/config.xml
+++ b/doc/examples/config.xml
@@ -28,4 +28,5 @@
<Url>http://www.your-repo-location/packages/</Url>
</Repository>
</RemoteRepositories>
+ <AliasDefinitionsFile>aliases.xml</AliasDefinitionsFile>
</Installer>
diff --git a/doc/includes/IFWDoc b/doc/includes/IFWDoc
index 6e5b4dbd4..a569a2f9e 100644
--- a/doc/includes/IFWDoc
+++ b/doc/includes/IFWDoc
@@ -14,6 +14,7 @@
#include "commandlineparser.h"
#include "componentchecker.h"
#include "component.h"
+#include "componentalias.h"
#include "componentmodel.h"
#include "concurrentoperationrunner.h"
#include "constants.h"
diff --git a/doc/installerfw-reference.qdoc b/doc/installerfw-reference.qdoc
index 9a57d905e..f129f1218 100644
--- a/doc/installerfw-reference.qdoc
+++ b/doc/installerfw-reference.qdoc
@@ -39,6 +39,7 @@
\li \l{Command Line Interface}
\li \l{Configuration File}
\li \l{Package Directory}
+ \li \l{Alias Definition File}
\li \l{Controller Scripting}
\li \l{Component Scripting}
\li \l{Operations}
diff --git a/doc/installerfw-using.qdoc b/doc/installerfw-using.qdoc
index 5f4674449..c1a57f9ad 100644
--- a/doc/installerfw-using.qdoc
+++ b/doc/installerfw-using.qdoc
@@ -408,6 +408,13 @@
installer.exe --root "C:\Users\MyUser\MyInstallation" install
\endcode
+ The install command can be also used for installing component aliases. If component
+ aliases are specified, the aliased components are selected for installation:
+
+ \code
+ maintenancetool.exe install alias1 alias2
+ \endcode
+
\section1 Checking for Available Updates
To print information about available component updates, run the \c check-updates
@@ -461,7 +468,14 @@
information elements with the option, refer to \l{Summary of Package Information File Elements}.
\code
- installer.exe --filter-packages "DisplayName=MyComponent, Version=1.0" search "expression"
+ installer.exe --type package --filter-packages "DisplayName=MyComponent, Version=1.0" search "expression"
+ \endcode
+
+ When the \c{--type} option is omitted, or the value for the option is set to \c alias, the
+ search command will seach for available component aliases instead:
+
+ \code
+ installer.exe search "expression"
\endcode
\section1 Performing Full Uninstallation
diff --git a/doc/installerfw.qdoc b/doc/installerfw.qdoc
index 3387987a7..8daeff0ed 100644
--- a/doc/installerfw.qdoc
+++ b/doc/installerfw.qdoc
@@ -72,6 +72,7 @@
\li \l{Command Line Interface}
\li \l{Configuration File}
\li \l{Package Directory}
+ \li \l{Alias Definition File}
\li \l{Controller Scripting}
\li \l{Component Scripting}
\li \l{Operations}
@@ -255,6 +256,10 @@
\li --cp, --cache-path <path>
\li Sets the path used for local metadata cache. The path must be writable by the current user.
\row
+ \li --type package|alias
+ \li [CLI] Sets the type of the given arguments for commands supporting multiple argument types,
+ like search. Defaults to alias.
+ \row
\li --am, --accept-messages
\li [CLI] Accepts all message queries without user input.
\row
@@ -313,8 +318,8 @@
\li Command
\li Usage
\row
- \li in, install <pkg ...>
- \li Install packages given as an argument. If no packages are given, install the default package set.
+ \li in, install <pkg|alias ...>
+ \li Install packages and aliases given as an argument. If no arguments are given, install the default package set.
\row
\li ch, check-updates
\li Show information about available updates on the maintenance tool.
@@ -325,14 +330,17 @@
\li rm, remove <pkg ...>
\li Uninstall selected packages and their child components.
\row
- \li li, list <regexp>
+ \li li, list <regexp for pkg>
\li List information about currently installed packages.
\row
- \li se, search <regexp>
- \li Search available packages. If no search pattern is given, show all available packages.
+ \li se, search <regexp for pkg|alias>
+ \li Search available aliases or packages. If no search pattern is given, show all available packages.
\note The \c --filter-packages option can be used to specify additional filters for
the search operation. See \l{Summary of Options}.
+
+ \note The \c --type option can be used to specify the content type to search.
+ See \l{Summary of Options}.
\row
\li co, create-offline <pkg ...>
\li Create offline installer from selected packages.
@@ -564,6 +572,11 @@
\li TargetConfigurationFile
\li Filename for the configuration file on the target. Default is components.xml.
\row
+ \li AliasDefinitionsFile
+ \li Filename for a XML document containing the definitions for component aliases.
+ For more information about how to declare component aliases in the file,
+ see \l{Alias Definition File}.
+ \row
\li Translations
\li List of translation files to be used for translating the user interface. To add
several translation files, specify several \c <Translation> child elements that
@@ -608,6 +621,71 @@
*/
/*!
+ \previouspage ifw-globalconfig.html
+ \page ifw-aliasconfig.html
+ \nextpage noninteractive.html
+
+ \title Alias Definition File
+
+ The alias definition file defines the available component aliases and their
+ properties. The file is typically called \c aliases.xml and located in the
+ \c config directory.
+
+ The component names of the Qt Installer Framework follow a domain-like
+ identifier syntax, for example \c com.vendor.root, \c 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:
+
+ \quotefile examples/aliases.xml
+
+ \section1 Summary of Alias Definition File Elements
+
+ The following table summarizes the elements in the alias definition file.
+
+ \table
+ \header
+ \li Element
+ \li Description
+ \row
+ \li Name
+ \li Name of component alias.
+ \row
+ \li DisplayName
+ \li Human-readable name of the component alias.
+ \row
+ \li Description
+ \li Human-readable description of the component alias.
+ \row
+ \li Version
+ \li Version number of the component alias.
+ \row
+ \li Virtual
+ \li Set to \c true to hide the component alias from the installer. This also
+ makes the alias unselectable by the user.
+ \row
+ \li RequiresComponent
+ \li 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.
+ \row
+ \li RequiresAlias
+ \li Comma-separated list of aliases that this component alias requires. The
+ required aliases are selected for installation when this component alias
+ is selected.
+ \endtable
+*/
+
+/*!
\previouspage ifw-updates.html
\page ifw-customizing-installers.html
\nextpage Qt Installer Framework Examples
@@ -806,7 +884,7 @@
/*!
\previouspage ifw-globalconfig.html
\page ifw-component-description.html
- \nextpage noninteractive.html
+ \nextpage ifw-aliasconfig.html
\title Package Directory