summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/changeuserinterface/packages/org.qtproject.ifw.example.changeuserinterface/meta/installscript.qs6
-rw-r--r--examples/componentalias/README5
-rw-r--r--examples/componentalias/componentalias.pro (renamed from examples/registervirtualcomponentforuninstall/registercomponentforinstall.pro)0
-rw-r--r--examples/componentalias/config/aliases.xml28
-rw-r--r--examples/componentalias/config/config.xml10
-rw-r--r--examples/componentalias/packages/componentA/data/installcontentA.txt2
-rw-r--r--examples/componentalias/packages/componentA/meta/package.xml8
-rw-r--r--examples/componentalias/packages/componentB/data/installcontentB.txt2
-rw-r--r--examples/componentalias/packages/componentB/meta/package.xml8
-rw-r--r--examples/componentalias/packages/componentC/data/installcontentC.txt2
-rw-r--r--examples/componentalias/packages/componentC/meta/package.xml8
-rw-r--r--examples/componentalias/packages/componentD/data/installcontentD.txt2
-rw-r--r--examples/componentalias/packages/componentD/meta/package.xml8
-rw-r--r--examples/componentalias/packages/componentE/data/installcontentE.txt2
-rw-r--r--examples/componentalias/packages/componentE/meta/package.xml8
-rw-r--r--examples/dependencies/packages/componentG/meta/installscript.js23
-rw-r--r--examples/doc/changeuserinterface.qdoc30
-rw-r--r--examples/doc/componentalias.qdoc162
-rw-r--r--examples/doc/componenterror.qdoc4
-rw-r--r--examples/doc/dependencies.qdoc4
-rw-r--r--examples/doc/dynamicpage.qdoc4
-rw-r--r--examples/doc/hidecheckbox.qdoc4
-rw-r--r--examples/doc/images/qtifw-examples-changeuserinterface.pngbin41473 -> 44627 bytes
-rw-r--r--examples/doc/images/qtifw-examples-componentalias.pngbin0 -> 38827 bytes
-rw-r--r--examples/doc/images/qtifw-examples-productimage.pngbin0 -> 57251 bytes
-rw-r--r--examples/doc/images/qtifw-examples-treename.pngbin0 -> 18152 bytes
-rw-r--r--examples/doc/modifyextract.qdoc4
-rw-r--r--examples/doc/online.qdoc6
-rw-r--r--examples/doc/openreadme.qdoc4
-rw-r--r--examples/doc/productimage.qdoc57
-rw-r--r--examples/doc/quitinstaller.qdoc4
-rw-r--r--examples/doc/registerfileextension.qdoc4
-rw-r--r--examples/doc/repositorycategories.qdoc4
-rw-r--r--examples/doc/startmenu.qdoc4
-rw-r--r--examples/doc/stylesheet.qdoc4
-rw-r--r--examples/doc/systeminfo.qdoc4
-rw-r--r--examples/doc/translations.qdoc4
-rw-r--r--examples/doc/treename.qdoc144
-rw-r--r--examples/examples.pro8
-rw-r--r--examples/productimage/config/Built_with_Qt.pngbin0 -> 13891 bytes
-rw-r--r--examples/productimage/config/Built_with_Qt_logo.pngbin0 -> 11097 bytes
-rw-r--r--examples/productimage/config/config.xml19
-rw-r--r--examples/productimage/packages/com.vendor.product/meta/package.xml8
-rw-r--r--examples/productimage/productimage.pro13
-rw-r--r--examples/registervirtualcomponentforuninstall/registervirtualcomponentforuninstall.pro13
-rw-r--r--examples/stylesheet/packages/org.qtproject.ifw.example.stylesheet/meta/installscript.qs23
-rw-r--r--examples/treename/README5
-rw-r--r--examples/treename/config/config.xml10
-rw-r--r--examples/treename/packages/A.sub1.sub1/data/Asub1sub1.txt2
-rw-r--r--examples/treename/packages/A.sub1.sub1/meta/package.xml7
-rw-r--r--examples/treename/packages/A.sub1/data/Asub1.txt2
-rw-r--r--examples/treename/packages/A.sub1/meta/package.xml8
-rw-r--r--examples/treename/packages/A/data/A.txt2
-rw-r--r--examples/treename/packages/A/meta/package.xml7
-rw-r--r--examples/treename/packages/B.sub1.sub1/data/Bsub1sub1.txt2
-rw-r--r--examples/treename/packages/B.sub1.sub1/meta/package.xml7
-rw-r--r--examples/treename/packages/B.sub1/data/Bsub1.txt2
-rw-r--r--examples/treename/packages/B.sub1/meta/package.xml8
-rw-r--r--examples/treename/packages/B/data/B.txt2
-rw-r--r--examples/treename/packages/B/meta/package.xml7
-rw-r--r--examples/treename/packages/C.sub1/data/Csub1.txt2
-rw-r--r--examples/treename/packages/C.sub1/meta/package.xml7
-rw-r--r--examples/treename/packages/C.sub2/data/Csub2.txt2
-rw-r--r--examples/treename/packages/C.sub2/meta/package.xml7
-rw-r--r--examples/treename/packages/C/data/C.txt2
-rw-r--r--examples/treename/packages/C/meta/package.xml8
-rw-r--r--examples/treename/packages/D.sub1/data/Dsub1.txt2
-rw-r--r--examples/treename/packages/D.sub1/meta/package.xml7
-rw-r--r--examples/treename/packages/E.sub2/data/Esub2.txt2
-rw-r--r--examples/treename/packages/E.sub2/meta/package.xml7
-rw-r--r--examples/treename/packages/E/data/E.txt2
-rw-r--r--examples/treename/packages/E/meta/package.xml8
-rw-r--r--examples/treename/treename.pro13
73 files changed, 715 insertions, 82 deletions
diff --git a/examples/changeuserinterface/packages/org.qtproject.ifw.example.changeuserinterface/meta/installscript.qs b/examples/changeuserinterface/packages/org.qtproject.ifw.example.changeuserinterface/meta/installscript.qs
index b40bcb1fe..b987e1f99 100644
--- a/examples/changeuserinterface/packages/org.qtproject.ifw.example.changeuserinterface/meta/installscript.qs
+++ b/examples/changeuserinterface/packages/org.qtproject.ifw.example.changeuserinterface/meta/installscript.qs
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2017 The Qt Company Ltd.
+** Copyright (C) 2022 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the FOO module of the Qt Toolkit.
@@ -28,12 +28,12 @@
function Component()
{
- gui.pageWidgetByObjectName("LicenseAgreementPage").entered.connect(changeLicenseLabels);
+ if (!installer.isCommandLineInstance())
+ gui.pageWidgetByObjectName("LicenseAgreementPage").entered.connect(changeLicenseLabels);
}
changeLicenseLabels = function()
{
page = gui.pageWidgetByObjectName("LicenseAgreementPage");
page.AcceptLicenseLabel.setText("Yes I do!");
- page.RejectLicenseLabel.setText("No I don't!");
}
diff --git a/examples/componentalias/README b/examples/componentalias/README
new file mode 100644
index 000000000..8253c6701
--- /dev/null
+++ b/examples/componentalias/README
@@ -0,0 +1,5 @@
+Create an installer that shows how component aliases work
+
+Generate installer with:
+
+binarycreator -c config/config.xml -p packages installer
diff --git a/examples/registervirtualcomponentforuninstall/registercomponentforinstall.pro b/examples/componentalias/componentalias.pro
index 415df49d5..415df49d5 100644
--- a/examples/registervirtualcomponentforuninstall/registercomponentforinstall.pro
+++ b/examples/componentalias/componentalias.pro
diff --git a/examples/componentalias/config/aliases.xml b/examples/componentalias/config/aliases.xml
new file mode 100644
index 000000000..baf89f9b1
--- /dev/null
+++ b/examples/componentalias/config/aliases.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+<Aliases>
+ <Alias>
+ <Name>set1</Name>
+ <DisplayName>Component Set 1</DisplayName>
+ <Description>Alias for components A, B, and C</Description>
+ <Version>1.0.0</Version>
+ <Virtual>false</Virtual>
+ <RequiredComponents>componentA,componentB,componentC</RequiredComponents>
+ </Alias>
+ <Alias>
+ <Name>set2</Name>
+ <DisplayName>Component Set 2</DisplayName>
+ <Description>Alias for components D, and E</Description>
+ <Version>1.0.0</Version>
+ <Virtual>false</Virtual>
+ <RequiredComponents>componentD,componentE</RequiredComponents>
+ </Alias>
+ <Alias>
+ <Name>set-full</Name>
+ <DisplayName>Full Component Set</DisplayName>
+ <Description>Alias for full installation</Description>
+ <Version>1.0.0</Version>
+ <Virtual>false</Virtual>
+ <RequiredAliases>set1,set2</RequiredAliases>
+ </Alias>
+</Aliases>
+
diff --git a/examples/componentalias/config/config.xml b/examples/componentalias/config/config.xml
new file mode 100644
index 000000000..440930355
--- /dev/null
+++ b/examples/componentalias/config/config.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Installer>
+ <Name>Component Alias Example</Name>
+ <Version>1.0.0</Version>
+ <Title>Component Alias Example</Title>
+ <Publisher>Qt-Project</Publisher>
+ <StartMenuDir>Qt IFW Examples</StartMenuDir>
+ <TargetDir>@HomeDir@/IfwExamples/componentalias</TargetDir>
+ <AliasDefinitionsFile>aliases.xml</AliasDefinitionsFile>
+</Installer>
diff --git a/examples/componentalias/packages/componentA/data/installcontentA.txt b/examples/componentalias/packages/componentA/data/installcontentA.txt
new file mode 100644
index 000000000..f40001983
--- /dev/null
+++ b/examples/componentalias/packages/componentA/data/installcontentA.txt
@@ -0,0 +1,2 @@
+This file will be installed into the target directory....
+
diff --git a/examples/componentalias/packages/componentA/meta/package.xml b/examples/componentalias/packages/componentA/meta/package.xml
new file mode 100644
index 000000000..729989fd9
--- /dev/null
+++ b/examples/componentalias/packages/componentA/meta/package.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<Package>
+ <DisplayName>Component A</DisplayName>
+ <Description>This component is a part of a component alias.</Description>
+ <Version>1.0.0</Version>
+ <ReleaseDate>2014-08-25</ReleaseDate>
+ <SortingPriority>100</SortingPriority>
+</Package>
diff --git a/examples/componentalias/packages/componentB/data/installcontentB.txt b/examples/componentalias/packages/componentB/data/installcontentB.txt
new file mode 100644
index 000000000..f40001983
--- /dev/null
+++ b/examples/componentalias/packages/componentB/data/installcontentB.txt
@@ -0,0 +1,2 @@
+This file will be installed into the target directory....
+
diff --git a/examples/componentalias/packages/componentB/meta/package.xml b/examples/componentalias/packages/componentB/meta/package.xml
new file mode 100644
index 000000000..c6eba4223
--- /dev/null
+++ b/examples/componentalias/packages/componentB/meta/package.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<Package>
+ <DisplayName>Component B</DisplayName>
+ <Description>This component is a part of a component alias.</Description>
+ <Version>1.0.0</Version>
+ <ReleaseDate>2014-08-25</ReleaseDate>
+ <SortingPriority>90</SortingPriority>
+</Package>
diff --git a/examples/componentalias/packages/componentC/data/installcontentC.txt b/examples/componentalias/packages/componentC/data/installcontentC.txt
new file mode 100644
index 000000000..f40001983
--- /dev/null
+++ b/examples/componentalias/packages/componentC/data/installcontentC.txt
@@ -0,0 +1,2 @@
+This file will be installed into the target directory....
+
diff --git a/examples/componentalias/packages/componentC/meta/package.xml b/examples/componentalias/packages/componentC/meta/package.xml
new file mode 100644
index 000000000..59af43132
--- /dev/null
+++ b/examples/componentalias/packages/componentC/meta/package.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<Package>
+ <DisplayName>Component C</DisplayName>
+ <Description>This component is a part of a component alias.</Description>
+ <Version>1.0.0</Version>
+ <ReleaseDate>2014-08-25</ReleaseDate>
+ <SortingPriority>80</SortingPriority>
+</Package>
diff --git a/examples/componentalias/packages/componentD/data/installcontentD.txt b/examples/componentalias/packages/componentD/data/installcontentD.txt
new file mode 100644
index 000000000..f40001983
--- /dev/null
+++ b/examples/componentalias/packages/componentD/data/installcontentD.txt
@@ -0,0 +1,2 @@
+This file will be installed into the target directory....
+
diff --git a/examples/componentalias/packages/componentD/meta/package.xml b/examples/componentalias/packages/componentD/meta/package.xml
new file mode 100644
index 000000000..eccbd8d4a
--- /dev/null
+++ b/examples/componentalias/packages/componentD/meta/package.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<Package>
+ <DisplayName>Component D</DisplayName>
+ <Description>This component is a part of a component alias.</Description>
+ <Version>1.0.0</Version>
+ <ReleaseDate>2014-08-25</ReleaseDate>
+ <SortingPriority>70</SortingPriority>
+</Package>
diff --git a/examples/componentalias/packages/componentE/data/installcontentE.txt b/examples/componentalias/packages/componentE/data/installcontentE.txt
new file mode 100644
index 000000000..f40001983
--- /dev/null
+++ b/examples/componentalias/packages/componentE/data/installcontentE.txt
@@ -0,0 +1,2 @@
+This file will be installed into the target directory....
+
diff --git a/examples/componentalias/packages/componentE/meta/package.xml b/examples/componentalias/packages/componentE/meta/package.xml
new file mode 100644
index 000000000..95b4ebd72
--- /dev/null
+++ b/examples/componentalias/packages/componentE/meta/package.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<Package>
+ <DisplayName>Component E</DisplayName>
+ <Description>This component is a part of a component alias.</Description>
+ <Version>1.0.0</Version>
+ <ReleaseDate>2014-08-25</ReleaseDate>
+ <SortingPriority>60</SortingPriority>
+</Package>
diff --git a/examples/dependencies/packages/componentG/meta/installscript.js b/examples/dependencies/packages/componentG/meta/installscript.js
index d4cb59b3c..8e4eaf695 100644
--- a/examples/dependencies/packages/componentG/meta/installscript.js
+++ b/examples/dependencies/packages/componentG/meta/installscript.js
@@ -1,11 +1,11 @@
/**************************************************************************
**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2022 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Installer Framework.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
@@ -14,24 +14,13 @@
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/examples/doc/changeuserinterface.qdoc b/examples/doc/changeuserinterface.qdoc
index 970ca5bc8..012f6bf43 100644
--- a/examples/doc/changeuserinterface.qdoc
+++ b/examples/doc/changeuserinterface.qdoc
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2023 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Installer Framework.
**
@@ -30,14 +30,14 @@
\ingroup qtifwexamples
\title Change Installer UI Example
- \brief Using a component script to modify the installer UI.
+ \brief Using a component script to change the installer UI.
\image qtifw-examples-changeuserinterface.png
\e {Change Installer UI} demonstrates how to use the \c Component() function
- to modify the default text for the radio button labels on the
+ to change the default text for the check box label on the
\l{License Agreement Page}{license check page}. This example does not install
- any components, but we specify a dummy component in the package information
+ any components, but it specifies a dummy component in the package information
file, because installers without components are not allowed.
\include installerfw-examples-configuring.qdocinc
@@ -49,27 +49,27 @@
\list
\li The \c <Default> element specifies whether the component is
preselected for installation in the user interface by default.
- \li The \c <Script> element specifies the file name of the JavaScript
- file that is loaded to perform operations.
- \li The \c <Licenses> element specifies the \c name of the license
- agreement to be accepted by the end user and the filename of the
- \c file that contains the license.
+ \li The \c <Script> element sets the file name of the loaded JavaScript
+ file.
+ \li The \c <Licenses> element sets the \c name of the license
+ agreement that the end user accepts, as well as the filename of the
+ \c file that has the license.
\endlist
\quotefile changeuserinterface/packages/org.qtproject.ifw.example.changeuserinterface/meta/package.xml
- \section1 Modifying UI Text
+ \section1 Updating UI Text
- In installscript.qs, we call the \c Component() function to add the license
- check page and to connect to the \c changeLicenseLabels signal when end
+ In installscript.qs, the \c Component() function adds the license
+ check page and connects to the \c changeLicenseLabels signal when end
users enter the page:
\quotefromfile changeuserinterface/packages/org.qtproject.ifw.example.changeuserinterface/meta/installscript.qs
\skipto Component()
\printuntil }
- We use the \c changeLicenseLabels function to change the text labels for the
- accept and reject license radio buttons on the page:
+ The \c changeLicenseLabels function changes the text label for the
+ accept license check box on the page:
\printuntil }
diff --git a/examples/doc/componentalias.qdoc b/examples/doc/componentalias.qdoc
new file mode 100644
index 000000000..9a1e4de43
--- /dev/null
+++ b/examples/doc/componentalias.qdoc
@@ -0,0 +1,162 @@
+/****************************************************************************
+**
+** Copyright (C) 2023 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt Installer Framework.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example componentalias
+ \ingroup qtifwexamples
+ \title Component Alias Example
+
+ \brief Using installer's aliases.xml file to define component aliases and their
+ relations to other aliases and components.
+
+ \image qtifw-examples-componentalias.png
+
+ \e{Component Alias} illustrates how to specify component aliases and how they influence
+ the installation and maintenance processes for command line usage.
+
+ \include installerfw-examples-configuring.qdocinc
+
+ \list
+ \li The \c <AliasDefinitionsFile> element is set to \c aliases.xml to
+ tell the installer the source for the alias definitions.
+ \endlist
+
+ \quotefile componentalias/config/config.xml
+
+ In this example, the aliases.xml file declares three component aliases. Two aliases,
+ \c set1 and \c set2 require a subset of available components, while \c set-full
+ requires the former two aliases, thus all available components.
+
+ \quotefile componentalias/config/aliases.xml
+
+ For full reference of the alias definitions file syntax, see \l{Alias Definition File}.
+
+ \include installerfw-examples-packaging.qdocinc
+
+ \section1 Referring to Component Aliases from Command Line
+
+ The declared component aliases can be used from the installer's command line interface
+ with the \c search and \c install commands.
+
+ \section2 Searching Available Component Aliases
+
+ The \c search command will by default search available aliases first, and then normal
+ components:
+
+ \code
+ $ installer search
+ \endcode
+
+ The command will print a table of aliases that were declared in the alias definition file:
+
+ \code
+ Name: set-full
+ Display name: Full Component Set
+ Description: Alias for full installation
+ Version: 1.0.0
+ Components:
+ Required aliases: set1,set2
+ ========================================
+ Name: set1
+ Display name: Component Set 1
+ Description: Alias for components A, B, and C
+ Version: 1.0.0
+ Components: componentA,componentB,componentC
+ Required aliases:
+ ========================================
+ Name: set2
+ Display name: Component Set 2
+ Description: Alias for components D, and E
+ Version: 1.0.0
+ Components: componentD,componentE
+ Required aliases:
+ \endcode
+
+ \section2 Installing Available Component Aliases
+
+ The \c install command can be used to install the components referred by a component alias:
+
+ \code
+ $ installer install set1
+ \endcode
+
+ This command is practically equivalent to selecting the components explicitly by their names:
+
+ \code
+ $ installer install componentA componentB componentC
+ \endcode
+
+ When selecting aliases for installation, the component changes summary will show
+ separate sections for components selected by a aliases, to differentiate from manual
+ selection:
+
+ \code
+ $ installer install set1 componentD
+ \endcode
+
+ This will output the following component changes summary:
+
+ \code
+ Components selected by alias "set1":
+ componentA
+ componentB
+ componentC
+ Selected components without dependencies:
+ componentD
+ \endcode
+
+ The \c <RequiredComponents> property does not declare a hard dependency for components,
+ and those can be later on updated or uninstalled individually from the alias:
+
+ \code
+ $ maintenancetool remove componentA
+ \endcode
+
+ After this, selecting the \c set1 alias for installation again would also select
+ \c componentA for reinstallation.
+
+ \section1 Virtual Component Aliases
+
+ Component aliases may be declared \c <Virtual>. This works similarly with virtual components,
+ so that they cannot be manually selected by the user and do not show in component search results.
+ Such aliases must be included by other aliases with the \c <RequiredAliases> property.
+
+ \section1 Optional Dependencies for Component Aliases
+
+ In addition to dependencies declared with \c <RequiredComponents> and \c <RequiredAliases> as
+ shown in this example, aliases may have optional dependencies declared with \c <OptionalComponents>
+ and \c <OptionalAliases> properties. The latter properties differ from the requirements in that
+ they do not cause the alias declaring the requirement to become unselectable, in case the referenced
+ components or aliases are not known to the installer.
+
+ This provides the packager some flexibility for declaring the dependencies. For example, an
+ installer may be expected to use an optional repository, which contains components that a
+ component alias optionally depends on, but the alias should be also available for installation
+ when the repository is disabled.
+
+ \include installerfw-examples-generating.qdocinc
+*/
diff --git a/examples/doc/componenterror.qdoc b/examples/doc/componenterror.qdoc
index b2187b9b7..eab6cc9cd 100644
--- a/examples/doc/componenterror.qdoc
+++ b/examples/doc/componenterror.qdoc
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2022 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Installer Framework.
**
diff --git a/examples/doc/dependencies.qdoc b/examples/doc/dependencies.qdoc
index 0c16cdfed..ac1b9afc4 100644
--- a/examples/doc/dependencies.qdoc
+++ b/examples/doc/dependencies.qdoc
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2022 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Installer Framework.
**
diff --git a/examples/doc/dynamicpage.qdoc b/examples/doc/dynamicpage.qdoc
index afddcf7c7..5e37f6241 100644
--- a/examples/doc/dynamicpage.qdoc
+++ b/examples/doc/dynamicpage.qdoc
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2022 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Installer Framework.
**
diff --git a/examples/doc/hidecheckbox.qdoc b/examples/doc/hidecheckbox.qdoc
index 9bf0488af..63af700d7 100644
--- a/examples/doc/hidecheckbox.qdoc
+++ b/examples/doc/hidecheckbox.qdoc
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2022 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Installer Framework.
**
diff --git a/examples/doc/images/qtifw-examples-changeuserinterface.png b/examples/doc/images/qtifw-examples-changeuserinterface.png
index c9bfad983..83d871f3c 100644
--- a/examples/doc/images/qtifw-examples-changeuserinterface.png
+++ b/examples/doc/images/qtifw-examples-changeuserinterface.png
Binary files differ
diff --git a/examples/doc/images/qtifw-examples-componentalias.png b/examples/doc/images/qtifw-examples-componentalias.png
new file mode 100644
index 000000000..8195a241d
--- /dev/null
+++ b/examples/doc/images/qtifw-examples-componentalias.png
Binary files differ
diff --git a/examples/doc/images/qtifw-examples-productimage.png b/examples/doc/images/qtifw-examples-productimage.png
new file mode 100644
index 000000000..8635b99a8
--- /dev/null
+++ b/examples/doc/images/qtifw-examples-productimage.png
Binary files differ
diff --git a/examples/doc/images/qtifw-examples-treename.png b/examples/doc/images/qtifw-examples-treename.png
new file mode 100644
index 000000000..bdfbd8399
--- /dev/null
+++ b/examples/doc/images/qtifw-examples-treename.png
Binary files differ
diff --git a/examples/doc/modifyextract.qdoc b/examples/doc/modifyextract.qdoc
index b540de915..04c4e253e 100644
--- a/examples/doc/modifyextract.qdoc
+++ b/examples/doc/modifyextract.qdoc
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2022 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Installer Framework.
**
diff --git a/examples/doc/online.qdoc b/examples/doc/online.qdoc
index 5533140ff..0c14a8c26 100644
--- a/examples/doc/online.qdoc
+++ b/examples/doc/online.qdoc
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2022 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Installer Framework.
**
@@ -150,7 +150,7 @@
only updates packages that are new, or have a higher version number.
See also the \l{Summary of repogen Parameters}.
- If you then run the maintenance tool from the previous installation and
+ If you then run the \MT from the previous installation and
select \gui {Update Components}, you should see that an update of package
\c A is available.
diff --git a/examples/doc/openreadme.qdoc b/examples/doc/openreadme.qdoc
index 87d4a4a2f..11e27ead4 100644
--- a/examples/doc/openreadme.qdoc
+++ b/examples/doc/openreadme.qdoc
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2022 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Installer Framework.
**
diff --git a/examples/doc/productimage.qdoc b/examples/doc/productimage.qdoc
new file mode 100644
index 000000000..cea128a50
--- /dev/null
+++ b/examples/doc/productimage.qdoc
@@ -0,0 +1,57 @@
+/****************************************************************************
+**
+** Copyright (C) 2022 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt Installer Framework.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example productimage
+ \ingroup qtifwexamples
+ \title Product Image Example
+
+ \brief Using components' config.xml files to show a product image while
+ downloading and installing components.
+
+ \image qtifw-examples-productimage.png
+
+ \e {Product Image} example illustrates how to add product images to the installer and
+ show them while downloading and installing components. Product images can have an
+ optional \c url. When clicking the product image, \c url
+ is opened in a browser. If the \c url is a reference to a file, it will
+ be opened with a suitable application instead of a Web browser.
+
+ \include installerfw-examples-configuring.qdocinc
+
+ \list
+ \li The \c <ProductImages> element can contain one or several \c <ProductImage>
+ child elements, which each contain one \c <Image> element and an
+ optional \c <Url>.
+ \endlist
+
+ \quotefile productimage/config/config.xml
+
+ \include installerfw-examples-packaging.qdocinc
+
+ \include installerfw-examples-generating.qdocinc
+*/
diff --git a/examples/doc/quitinstaller.qdoc b/examples/doc/quitinstaller.qdoc
index 6dfa316ca..b165f97e0 100644
--- a/examples/doc/quitinstaller.qdoc
+++ b/examples/doc/quitinstaller.qdoc
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2022 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Installer Framework.
**
diff --git a/examples/doc/registerfileextension.qdoc b/examples/doc/registerfileextension.qdoc
index 7c292150a..3aa54b66c 100644
--- a/examples/doc/registerfileextension.qdoc
+++ b/examples/doc/registerfileextension.qdoc
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2022 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Installer Framework.
**
diff --git a/examples/doc/repositorycategories.qdoc b/examples/doc/repositorycategories.qdoc
index 1f1cb3f9c..8dfb446da 100644
--- a/examples/doc/repositorycategories.qdoc
+++ b/examples/doc/repositorycategories.qdoc
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2018 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2022 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Installer Framework.
**
diff --git a/examples/doc/startmenu.qdoc b/examples/doc/startmenu.qdoc
index b61998532..fcf942b10 100644
--- a/examples/doc/startmenu.qdoc
+++ b/examples/doc/startmenu.qdoc
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2022 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Installer Framework.
**
diff --git a/examples/doc/stylesheet.qdoc b/examples/doc/stylesheet.qdoc
index 3847464bb..3f599ac51 100644
--- a/examples/doc/stylesheet.qdoc
+++ b/examples/doc/stylesheet.qdoc
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2022 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Installer Framework.
**
diff --git a/examples/doc/systeminfo.qdoc b/examples/doc/systeminfo.qdoc
index 338cb8f77..67bfb878d 100644
--- a/examples/doc/systeminfo.qdoc
+++ b/examples/doc/systeminfo.qdoc
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2021 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2022 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Installer Framework.
**
diff --git a/examples/doc/translations.qdoc b/examples/doc/translations.qdoc
index a79c98948..4dfea9de3 100644
--- a/examples/doc/translations.qdoc
+++ b/examples/doc/translations.qdoc
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2022 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Installer Framework.
**
diff --git a/examples/doc/treename.qdoc b/examples/doc/treename.qdoc
new file mode 100644
index 000000000..774b6e1fa
--- /dev/null
+++ b/examples/doc/treename.qdoc
@@ -0,0 +1,144 @@
+/****************************************************************************
+**
+** Copyright (C) 2022 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt Installer Framework.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example treename
+ \ingroup qtifwexamples
+ \title Tree Name Example
+
+ \brief Using components' package.xml files to define custom locations in the component tree.
+
+ \image qtifw-examples-treename.png
+
+ \e{Tree Name} illustrates how to specify custom locations for components in
+ the component tree view and how that influences the installation and
+ maintenance processes.
+
+ \include installerfw-examples-configuring.qdocinc
+
+ \list
+ \li The \c <WizardShowPageList> element is set to \c false to hide the page
+ list widget on the left side of the installer wizard window.
+ \endlist
+
+ \quotefile treename/config/config.xml
+
+ \include installerfw-examples-packaging.qdocinc
+
+ \list
+ \li The \c <TreeName> element specifies the location of the component in the
+ component tree. The element accepts an optional \c moveChildren attribute
+ with a boolean value. If the value is set to \c true, any child components
+ of this component are also moved to the modified location.
+
+ \note Without this element the identifier of this component decides the location
+ in the component tree.
+ \endlist
+
+ In this example, the package.xml files for the components contain additional
+ elements that specify the component tree locations. The following sections illustrate
+ how the elements are used.
+
+ \section1 Specifying Tree Name to Root Node
+
+ We define a tree name \e ASub1ToRoot for component \e{A subcomponent 1}.
+ Thus, this child component of \e A becomes a new root component.
+ By default the children are not moved to the new location, so
+ \e {A sub-subcomponent1} becomes a new direct child of \e A.
+
+ \quotefile treename/packages/A.sub1/meta/package.xml
+
+ \section1 Specifying Tree Name and Moving Children
+
+ As above, we define a tree name \e BSub1ToRoot for component \e{B subcomponent 1}, but
+ this time we set the \c moveChildren attribute to \c true. The component becomes a new
+ root component and the child component \e {B sub-subcomponent 1} of this
+ component moves to the new location with the parent.
+
+ \quotefile treename/packages/B.sub1/meta/package.xml
+
+ \section1 Specifying Tree Name to Sub Node
+
+ We define a tree name \e{A.subC} for component \e C and set the \c moveChildren attribute
+ to \c true. Thus, this originally root component is moved as a child component of \e A.
+ The child components \e {C subcomponent 1} and \e {C subcomponent 2} move
+ to the new location with the parent.
+
+ \quotefile treename/packages/C/meta/package.xml
+
+ \section1 Specifying Tree Name to Existing Node
+
+ We define a tree name \e D for component \e E. Node \e D is already a part of an existing
+ component identifier for \e {D subcomponent 1} (\e{D.sub1}), but the packages
+ directory does not contain a component for the identifier, so it is possible to declare a
+ tree name \e D. The component \e E becomes a new root component and parent of
+ \e {D subcomponent 1}. As the \c moveChildren attribute is set to \c true, the
+ child component \e {E subcomponent 2} is moved with the parent.
+
+ \quotefile treename/packages/E/meta/package.xml
+
+ \section1 Other Considerations
+
+ \section2 Multiple Tree Names in One Component Branch
+
+ Components in a single branch (\e A, \e{A.sub1}, \e{A.sub1.sub1}, \e{A.sub1.sub1.sub2} and so
+ on) may each declare a separate tree name. The installer or \MT calculates the
+ new locations for components in an ascending order from leaf components to root components, so that
+ \e{A.sub1.sub1.sub2} is moved first and \e A last.
+
+ \section2 Tree Names of Installed and Remote Components
+
+ For online installers, the repositories may declare updated tree names for components,
+ so the following rules apply:
+
+ \list
+ \li The tree names for components become static after being installed. Therefore, if the user
+ of the installer has installed component \e A with tree name \e ANewName1, and the
+ repository is updated with a new version of component \e A that declares tree name
+ \e ANewName2, the new location is only applied when the user updates the component
+ locally with the \MT.
+ \li The automatic tree names of children of components with tree name and \c moveChildren
+ set to \c true are moved with the parent regardless if installed or not. Therefore, if
+ the user has installed component \e{A.sub1} but not component \e A, and \e A is updated
+ in the repository with a new tree name, the \e{A.sub1} uses also the new tree name in
+ \MT's component tree.
+ \endlist
+
+ \section2 Tree Name and Name Conflicts
+
+ The tree names may conflict with existing component names or other tree names. Depending on whether
+ the installer or \MT is configured to allow unstable components with
+ \c <AllowUnstableComponents> configuration file element, the offending components are either
+ registered as unstable components with their original name or not registered at all.
+
+ \note Components from remote repositories can never override already installed
+ components in the tree view. If a conflicting remote component cannot be registered with
+ the original name either in case a local component has reserved it with a tree name, the
+ component is not registered.
+
+ \include installerfw-examples-generating.qdocinc
+*/
diff --git a/examples/examples.pro b/examples/examples.pro
index bfe69a5c8..eca806812 100644
--- a/examples/examples.pro
+++ b/examples/examples.pro
@@ -2,16 +2,22 @@ TEMPLATE = subdirs
SUBDIRS += \
changeuserinterface \
+ componentalias \
componenterror \
dependencies \
dynamicpage \
+ hidecheckbox \
licenseagreement \
modifyextract \
online \
openreadme \
+ productimage \
quitinstaller \
registerfileextension \
+ registervirtualcomponentforuninstall \
repositorycategories \
startmenu \
systeminfo \
- stylesheet
+ stylesheet \
+ treename \
+ unstablecomponent
diff --git a/examples/productimage/config/Built_with_Qt.png b/examples/productimage/config/Built_with_Qt.png
new file mode 100644
index 000000000..e61248151
--- /dev/null
+++ b/examples/productimage/config/Built_with_Qt.png
Binary files differ
diff --git a/examples/productimage/config/Built_with_Qt_logo.png b/examples/productimage/config/Built_with_Qt_logo.png
new file mode 100644
index 000000000..331664c90
--- /dev/null
+++ b/examples/productimage/config/Built_with_Qt_logo.png
Binary files differ
diff --git a/examples/productimage/config/config.xml b/examples/productimage/config/config.xml
new file mode 100644
index 000000000..4d5fe1a05
--- /dev/null
+++ b/examples/productimage/config/config.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Installer>
+ <Name>Product Image</Name>
+ <Version>1.0.0</Version>
+ <Title>Product Image Installer</Title>
+ <Publisher>Your vendor</Publisher>
+ <StartMenuDir>Super App</StartMenuDir>
+ <TargetDir>@HomeDir@/IfwExamples/productimage</TargetDir>
+ <ProductImages>
+ <ProductImage>
+ <Image>Built_with_Qt.png</Image>
+ <Url>https://www.qt.io/blog</Url>
+ </ProductImage>
+ <ProductImage>
+ <Image>Built_with_Qt_logo.png</Image>
+ <Url>https://www.qt.io/</Url>
+ </ProductImage>
+ </ProductImages>
+</Installer>
diff --git a/examples/productimage/packages/com.vendor.product/meta/package.xml b/examples/productimage/packages/com.vendor.product/meta/package.xml
new file mode 100644
index 000000000..1a243da80
--- /dev/null
+++ b/examples/productimage/packages/com.vendor.product/meta/package.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Package>
+ <DisplayName>The root component</DisplayName>
+ <Description>Install this example.</Description>
+ <Version>1.0.0</Version>
+ <ReleaseDate>2021-10-10</ReleaseDate>
+ <Default>true</Default>
+</Package>
diff --git a/examples/productimage/productimage.pro b/examples/productimage/productimage.pro
new file mode 100644
index 000000000..415df49d5
--- /dev/null
+++ b/examples/productimage/productimage.pro
@@ -0,0 +1,13 @@
+TEMPLATE = aux
+
+INSTALLER = installer
+
+INPUT = $$PWD/config/config.xml $$PWD/packages
+example.input = INPUT
+example.output = $$INSTALLER
+example.commands = ../../bin/binarycreator -c $$PWD/config/config.xml -p $$PWD/packages ${QMAKE_FILE_OUT}
+example.CONFIG += target_predeps no_link combine
+
+QMAKE_EXTRA_COMPILERS += example
+
+OTHER_FILES = README
diff --git a/examples/registervirtualcomponentforuninstall/registervirtualcomponentforuninstall.pro b/examples/registervirtualcomponentforuninstall/registervirtualcomponentforuninstall.pro
new file mode 100644
index 000000000..415df49d5
--- /dev/null
+++ b/examples/registervirtualcomponentforuninstall/registervirtualcomponentforuninstall.pro
@@ -0,0 +1,13 @@
+TEMPLATE = aux
+
+INSTALLER = installer
+
+INPUT = $$PWD/config/config.xml $$PWD/packages
+example.input = INPUT
+example.output = $$INSTALLER
+example.commands = ../../bin/binarycreator -c $$PWD/config/config.xml -p $$PWD/packages ${QMAKE_FILE_OUT}
+example.CONFIG += target_predeps no_link combine
+
+QMAKE_EXTRA_COMPILERS += example
+
+OTHER_FILES = README
diff --git a/examples/stylesheet/packages/org.qtproject.ifw.example.stylesheet/meta/installscript.qs b/examples/stylesheet/packages/org.qtproject.ifw.example.stylesheet/meta/installscript.qs
index 3a37bd58a..c7181d2e0 100644
--- a/examples/stylesheet/packages/org.qtproject.ifw.example.stylesheet/meta/installscript.qs
+++ b/examples/stylesheet/packages/org.qtproject.ifw.example.stylesheet/meta/installscript.qs
@@ -1,11 +1,11 @@
/**************************************************************************
**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2022 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Installer Framework.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
@@ -14,24 +14,13 @@
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/examples/treename/README b/examples/treename/README
new file mode 100644
index 000000000..a858c71f1
--- /dev/null
+++ b/examples/treename/README
@@ -0,0 +1,5 @@
+Shows how to change location of components in the component tree.
+
+Generate installer with:
+
+binarycreator -c config/config.xml -p packages installer
diff --git a/examples/treename/config/config.xml b/examples/treename/config/config.xml
new file mode 100644
index 000000000..94e7c31a2
--- /dev/null
+++ b/examples/treename/config/config.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Installer>
+ <Name>Tree Name Example</Name>
+ <Version>1.0.0</Version>
+ <Title>Tree Name Example</Title>
+ <Publisher>The Qt Company</Publisher>
+ <StartMenuDir>Qt IFW Examples</StartMenuDir>
+ <TargetDir>@HomeDir@/IfwExamples/treename</TargetDir>
+ <WizardShowPageList>false</WizardShowPageList>
+</Installer>
diff --git a/examples/treename/packages/A.sub1.sub1/data/Asub1sub1.txt b/examples/treename/packages/A.sub1.sub1/data/Asub1sub1.txt
new file mode 100644
index 000000000..feb6d7f48
--- /dev/null
+++ b/examples/treename/packages/A.sub1.sub1/data/Asub1sub1.txt
@@ -0,0 +1,2 @@
+Example content for package A sub-subcomponent 1.
+
diff --git a/examples/treename/packages/A.sub1.sub1/meta/package.xml b/examples/treename/packages/A.sub1.sub1/meta/package.xml
new file mode 100644
index 000000000..285dda3e3
--- /dev/null
+++ b/examples/treename/packages/A.sub1.sub1/meta/package.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Package>
+ <DisplayName>A sub-subcomponent 1</DisplayName>
+ <Description>Sub-subcomponent of component A</Description>
+ <Version>1.0.0-1</Version>
+ <ReleaseDate>2021-01-01</ReleaseDate>
+</Package>
diff --git a/examples/treename/packages/A.sub1/data/Asub1.txt b/examples/treename/packages/A.sub1/data/Asub1.txt
new file mode 100644
index 000000000..b61d85bd0
--- /dev/null
+++ b/examples/treename/packages/A.sub1/data/Asub1.txt
@@ -0,0 +1,2 @@
+Example content for package A subcomponent 1.
+
diff --git a/examples/treename/packages/A.sub1/meta/package.xml b/examples/treename/packages/A.sub1/meta/package.xml
new file mode 100644
index 000000000..547285ab7
--- /dev/null
+++ b/examples/treename/packages/A.sub1/meta/package.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Package>
+ <DisplayName>A subcomponent 1 (moved to root)</DisplayName>
+ <Description>Subcomponent of component A</Description>
+ <Version>1.0.0-1</Version>
+ <ReleaseDate>2021-01-01</ReleaseDate>
+ <TreeName>ASub1ToRoot</TreeName>
+</Package>
diff --git a/examples/treename/packages/A/data/A.txt b/examples/treename/packages/A/data/A.txt
new file mode 100644
index 000000000..98114dd6e
--- /dev/null
+++ b/examples/treename/packages/A/data/A.txt
@@ -0,0 +1,2 @@
+Example content for package A.
+
diff --git a/examples/treename/packages/A/meta/package.xml b/examples/treename/packages/A/meta/package.xml
new file mode 100644
index 000000000..293323ec6
--- /dev/null
+++ b/examples/treename/packages/A/meta/package.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Package>
+ <DisplayName>A</DisplayName>
+ <Description>Example component A</Description>
+ <Version>1.0.0-1</Version>
+ <ReleaseDate>2021-01-01</ReleaseDate>
+</Package>
diff --git a/examples/treename/packages/B.sub1.sub1/data/Bsub1sub1.txt b/examples/treename/packages/B.sub1.sub1/data/Bsub1sub1.txt
new file mode 100644
index 000000000..63ade576b
--- /dev/null
+++ b/examples/treename/packages/B.sub1.sub1/data/Bsub1sub1.txt
@@ -0,0 +1,2 @@
+Example content for package B sub-subcomponent 1.
+
diff --git a/examples/treename/packages/B.sub1.sub1/meta/package.xml b/examples/treename/packages/B.sub1.sub1/meta/package.xml
new file mode 100644
index 000000000..989b000d9
--- /dev/null
+++ b/examples/treename/packages/B.sub1.sub1/meta/package.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Package>
+ <DisplayName>B sub-subcomponent 1</DisplayName>
+ <Description>Sub-subcomponent of component B</Description>
+ <Version>1.0.0-1</Version>
+ <ReleaseDate>2021-01-01</ReleaseDate>
+</Package>
diff --git a/examples/treename/packages/B.sub1/data/Bsub1.txt b/examples/treename/packages/B.sub1/data/Bsub1.txt
new file mode 100644
index 000000000..62c728762
--- /dev/null
+++ b/examples/treename/packages/B.sub1/data/Bsub1.txt
@@ -0,0 +1,2 @@
+Example content for package B subcomponent 1.
+
diff --git a/examples/treename/packages/B.sub1/meta/package.xml b/examples/treename/packages/B.sub1/meta/package.xml
new file mode 100644
index 000000000..84e4baddd
--- /dev/null
+++ b/examples/treename/packages/B.sub1/meta/package.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Package>
+ <DisplayName>B subcomponent 1 (moved to root with children)</DisplayName>
+ <Description>Subcomponent of component B</Description>
+ <Version>1.0.0-1</Version>
+ <ReleaseDate>2021-01-01</ReleaseDate>
+ <TreeName moveChildren="true">BSub1ToRoot</TreeName>
+</Package>
diff --git a/examples/treename/packages/B/data/B.txt b/examples/treename/packages/B/data/B.txt
new file mode 100644
index 000000000..1ee864074
--- /dev/null
+++ b/examples/treename/packages/B/data/B.txt
@@ -0,0 +1,2 @@
+Example content for package B.
+
diff --git a/examples/treename/packages/B/meta/package.xml b/examples/treename/packages/B/meta/package.xml
new file mode 100644
index 000000000..a867a235b
--- /dev/null
+++ b/examples/treename/packages/B/meta/package.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Package>
+ <DisplayName>B</DisplayName>
+ <Description>Example component B</Description>
+ <Version>1.0.0-1</Version>
+ <ReleaseDate>2021-01-01</ReleaseDate>
+</Package>
diff --git a/examples/treename/packages/C.sub1/data/Csub1.txt b/examples/treename/packages/C.sub1/data/Csub1.txt
new file mode 100644
index 000000000..2cdd26906
--- /dev/null
+++ b/examples/treename/packages/C.sub1/data/Csub1.txt
@@ -0,0 +1,2 @@
+Example content for package C subcomponent 1.
+
diff --git a/examples/treename/packages/C.sub1/meta/package.xml b/examples/treename/packages/C.sub1/meta/package.xml
new file mode 100644
index 000000000..b22db4c14
--- /dev/null
+++ b/examples/treename/packages/C.sub1/meta/package.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Package>
+ <DisplayName>C subcomponent 1</DisplayName>
+ <Description>Subcomponent of component C</Description>
+ <Version>1.0.0-1</Version>
+ <ReleaseDate>2021-01-01</ReleaseDate>
+</Package>
diff --git a/examples/treename/packages/C.sub2/data/Csub2.txt b/examples/treename/packages/C.sub2/data/Csub2.txt
new file mode 100644
index 000000000..7846863d7
--- /dev/null
+++ b/examples/treename/packages/C.sub2/data/Csub2.txt
@@ -0,0 +1,2 @@
+Example content for package C subcomponent 2.
+
diff --git a/examples/treename/packages/C.sub2/meta/package.xml b/examples/treename/packages/C.sub2/meta/package.xml
new file mode 100644
index 000000000..3ec8bcb5b
--- /dev/null
+++ b/examples/treename/packages/C.sub2/meta/package.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Package>
+ <DisplayName>C subcomponent 2</DisplayName>
+ <Description>Subcomponent of component C</Description>
+ <Version>1.0.0-1</Version>
+ <ReleaseDate>2021-01-01</ReleaseDate>
+</Package>
diff --git a/examples/treename/packages/C/data/C.txt b/examples/treename/packages/C/data/C.txt
new file mode 100644
index 000000000..b45c73606
--- /dev/null
+++ b/examples/treename/packages/C/data/C.txt
@@ -0,0 +1,2 @@
+Example content for package C.
+
diff --git a/examples/treename/packages/C/meta/package.xml b/examples/treename/packages/C/meta/package.xml
new file mode 100644
index 000000000..db1a3072e
--- /dev/null
+++ b/examples/treename/packages/C/meta/package.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Package>
+ <DisplayName>C (moved to sub node with children)</DisplayName>
+ <Description>Example component C</Description>
+ <Version>1.0.0-1</Version>
+ <ReleaseDate>2021-01-01</ReleaseDate>
+ <TreeName moveChildren="true">A.subC</TreeName>
+</Package>
diff --git a/examples/treename/packages/D.sub1/data/Dsub1.txt b/examples/treename/packages/D.sub1/data/Dsub1.txt
new file mode 100644
index 000000000..d9a3065fe
--- /dev/null
+++ b/examples/treename/packages/D.sub1/data/Dsub1.txt
@@ -0,0 +1,2 @@
+Example content for package D subcomponent 1.
+
diff --git a/examples/treename/packages/D.sub1/meta/package.xml b/examples/treename/packages/D.sub1/meta/package.xml
new file mode 100644
index 000000000..ca42c47c3
--- /dev/null
+++ b/examples/treename/packages/D.sub1/meta/package.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Package>
+ <DisplayName>D subcomponent 1</DisplayName>
+ <Description>Subcomponent of component D</Description>
+ <Version>1.0.0-1</Version>
+ <ReleaseDate>2021-01-01</ReleaseDate>
+</Package>
diff --git a/examples/treename/packages/E.sub2/data/Esub2.txt b/examples/treename/packages/E.sub2/data/Esub2.txt
new file mode 100644
index 000000000..6ee5101a5
--- /dev/null
+++ b/examples/treename/packages/E.sub2/data/Esub2.txt
@@ -0,0 +1,2 @@
+Example content for package E subcomponent 2.
+
diff --git a/examples/treename/packages/E.sub2/meta/package.xml b/examples/treename/packages/E.sub2/meta/package.xml
new file mode 100644
index 000000000..3672e88c1
--- /dev/null
+++ b/examples/treename/packages/E.sub2/meta/package.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Package>
+ <DisplayName>E subcomponent 2</DisplayName>
+ <Description>Subcomponent of component E</Description>
+ <Version>1.0.0-1</Version>
+ <ReleaseDate>2021-01-01</ReleaseDate>
+</Package>
diff --git a/examples/treename/packages/E/data/E.txt b/examples/treename/packages/E/data/E.txt
new file mode 100644
index 000000000..6c6d27481
--- /dev/null
+++ b/examples/treename/packages/E/data/E.txt
@@ -0,0 +1,2 @@
+Example content for package E.
+
diff --git a/examples/treename/packages/E/meta/package.xml b/examples/treename/packages/E/meta/package.xml
new file mode 100644
index 000000000..61c6948e9
--- /dev/null
+++ b/examples/treename/packages/E/meta/package.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Package>
+ <DisplayName>E (moved to free existing node with children)</DisplayName>
+ <Description>Example component E</Description>
+ <Version>1.0.0-1</Version>
+ <ReleaseDate>2021-01-01</ReleaseDate>
+ <TreeName moveChildren="true">D</TreeName>
+</Package>
diff --git a/examples/treename/treename.pro b/examples/treename/treename.pro
new file mode 100644
index 000000000..415df49d5
--- /dev/null
+++ b/examples/treename/treename.pro
@@ -0,0 +1,13 @@
+TEMPLATE = aux
+
+INSTALLER = installer
+
+INPUT = $$PWD/config/config.xml $$PWD/packages
+example.input = INPUT
+example.output = $$INSTALLER
+example.commands = ../../bin/binarycreator -c $$PWD/config/config.xml -p $$PWD/packages ${QMAKE_FILE_OUT}
+example.CONFIG += target_predeps no_link combine
+
+QMAKE_EXTRA_COMPILERS += example
+
+OTHER_FILES = README