diff options
Diffstat (limited to 'examples')
42 files changed, 492 insertions, 0 deletions
diff --git a/examples/doc/images/qtifw-examples-repository-categories.png b/examples/doc/images/qtifw-examples-repository-categories.png Binary files differnew file mode 100644 index 000000000..afed7c1b9 --- /dev/null +++ b/examples/doc/images/qtifw-examples-repository-categories.png diff --git a/examples/doc/repositorycategories.qdoc b/examples/doc/repositorycategories.qdoc new file mode 100644 index 000000000..dca5ada43 --- /dev/null +++ b/examples/doc/repositorycategories.qdoc @@ -0,0 +1,117 @@ +/**************************************************************************** +** +** Copyright (C) 2018 The Qt Company Ltd. +** Contact: http://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 http://www.qt.io/terms-conditions. For further +** information use the contact form at http://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: http://www.gnu.org/copyleft/fdl.html. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \example repositorycategories + \ingroup qtifwexamples + \title Repository Categories Example + + \brief Using the RepositoryCategories element to set up an + online installer where repositories are grouped. + + \image qtifw-examples-repository-categories.png + + \e{Repository Categories} illustrates how to set up an installer + where repositories are grouped into categories. + + \include installerfw-examples-configuring.qdocinc + + \list + \li The \c <RepositoryCategories> element shows how to group repositories into categories. + \c <RepositoryCategories> can contain one or several \c <RemoteRepositories> + child elements that specify a connection to repositories. For more + information about \c <RemoteRepositories> see + \l{Configuring Repositories}. + \endlist + + \quotefile repositorycategories/config/config.xml + + \include installerfw-examples-packaging.qdocinc + + \list + \li The \c <Default> element is set to \c true to preselect the + component in the installer. + \endlist + + \quotefile online/packages/A/meta/package.xml + + \section1 Generating the Online Repository + + This installer contains four packages that each have two components. The \c Packages directory contains two components + that are not grouped categories. They are always visible in tree view in the component selection page. \c Packages_forcategory1 + and \c packages2_forcategory1 both contain two components, which are visible when \c Category 1 is fetched. \c Packages_forcategory2 + contains two components that are visible only when \c Category 2 is fetched. + + The packages need to be converted to a file structure that the installer can + fetch at runtime. To use the \c repogen tool to convert the packages, switch + to the example source directory on the command line and enter the following + command: + + \list + \li On Windows: + \code + ..\..\bin\repogen.exe -p packages repository + ..\..\bin\repogen.exe -p packages_forcategory1 repository1 + ..\..\bin\repogen.exe -p packages2_forcategory1 repository2 + ..\..\bin\repogen.exe -p packages_forcategory2 repository3 + \endcode + \li On Linux or macOS: + \code + ../../bin/repogen -p packages repository + ../../bin/repogen -p packages_forcategory1 repository1 + ../../bin/repogen -p packages2_forcategory1 repository2 + ../../bin/repogen -p packages_forcategory2 repository3 + \endcode + \endlist + + The generated \c repository, \c repository1, \c repository2 and \c repository3 directories will now + contain a full copy of the package data and some additionally generated metadata, such as SHA + checksums. + + The directories now need to be made available at the URL set in + \c config.xml: \c{http://localhost/repository}, \c{http://localhost/repository1}, \c{http://localhost/repository2} and + \c{http://localhost/repository3}. How this is done depends on + the platform and web server used. If you do not have a running web server + yet, but have Python available, you should be able to start a minimal web + server from the command line. Make sure you are in the example directory, + and then enter: + + \code + python -m SimpleHTTPServer 80 + \endcode + + You should now be able to open and explore \l{http://localhost/repository} + in your web browser. + + \note If you do not have enough permissions to set up a web server locally, + you can also specify an absolute \c{file:///} URL as the value of the \c URL + element in \c config.xml. For example, + \c file:///C:/Qt/QtIFW/examples/repositorycategories/repository would be a valid URL on + Windows if \c repository is located in \c C:\Qt\QtIFW\examples\repositorycategories. + + \include installerfw-examples-generating-online.qdocinc +*/ diff --git a/examples/examples.pro b/examples/examples.pro index 377632b9c..bfe69a5c8 100644 --- a/examples/examples.pro +++ b/examples/examples.pro @@ -11,6 +11,7 @@ SUBDIRS += \ openreadme \ quitinstaller \ registerfileextension \ + repositorycategories \ startmenu \ systeminfo \ stylesheet diff --git a/examples/repositorycategories/README b/examples/repositorycategories/README new file mode 100644 index 000000000..4a1f491c6 --- /dev/null +++ b/examples/repositorycategories/README @@ -0,0 +1,30 @@ +Shows how to set up an online installer and how to use categorized repositories. Categorized repositories are not loaded to the tree view by default, instead you can select +to show categorized repositories in a tree view combobox. By default, repositories without categories are always shown in the tree view. + +The example uses a very simple web server shipped with Python. + +Generate the online repositories with + + repogen -p packages repository + repogen -p packages_forcategory1 repository1 + repogen -p packages2_forcategory1 repository2 + repogen -p packages_forcategory2 repository3 + +Generate the installer with + + binarycreator --online-only -c config/config.xml -p packages installer + +Now launch a minimal web server in the example's directory (admin rights may be needed) + + python -m SimpleHTTPServer 80 + +This should make the content of the local directory available under +http://localhost + +You should be able to now launch the installer. + +To deploy an update, run + + repogen --update-new-components -p packages_update repository + +and launch the maintenance tool in your installation. diff --git a/examples/repositorycategories/config/config.xml b/examples/repositorycategories/config/config.xml new file mode 100644 index 000000000..c61e4893d --- /dev/null +++ b/examples/repositorycategories/config/config.xml @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Installer> + <Name>Repository category Installer Example</Name> + <Version>1.0.0</Version> + <Title>Repository category Installer Example</Title> + <Publisher>The Qt Company</Publisher> + <!-- Directory name is used in component.xml --> + <StartMenuDir>Qt IFW Examples</StartMenuDir> + <TargetDir>@HomeDir@/IfwExamples/repositoryCategories</TargetDir> + <RemoteRepositories> + <Repository> + <Url>http://localhost/repository</Url> + </Repository> + </RemoteRepositories> + <RepositoryCategories> + <RepositoryCategoryDisplayname>Releases</RepositoryCategoryDisplayname> + <RemoteRepositories> + <DisplayName>Category 1</DisplayName> + <Repository> + <Url>http://localhost/repository1</Url> + </Repository> + <Repository> + <Url>http://localhost/repository2</Url> + </Repository> + </RemoteRepositories> + <RemoteRepositories> + <DisplayName>Category 2</DisplayName> + <Repository> + <Url>http://localhost/repository3</Url> + </Repository> + </RemoteRepositories> + </RepositoryCategories> +</Installer> diff --git a/examples/repositorycategories/packages/A/data/A.txt b/examples/repositorycategories/packages/A/data/A.txt new file mode 100644 index 000000000..98114dd6e --- /dev/null +++ b/examples/repositorycategories/packages/A/data/A.txt @@ -0,0 +1,2 @@ +Example content for package A. + diff --git a/examples/repositorycategories/packages/A/meta/package.xml b/examples/repositorycategories/packages/A/meta/package.xml new file mode 100644 index 000000000..08cef59c0 --- /dev/null +++ b/examples/repositorycategories/packages/A/meta/package.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Package> + <DisplayName>A</DisplayName> + <Description>Example component A</Description> + <Version>1.0.2-1</Version> + <ReleaseDate>2015-01-01</ReleaseDate> + <Default>true</Default> +</Package> diff --git a/examples/repositorycategories/packages/B/data/B.txt b/examples/repositorycategories/packages/B/data/B.txt new file mode 100644 index 000000000..1ee864074 --- /dev/null +++ b/examples/repositorycategories/packages/B/data/B.txt @@ -0,0 +1,2 @@ +Example content for package B. + diff --git a/examples/repositorycategories/packages/B/meta/package.xml b/examples/repositorycategories/packages/B/meta/package.xml new file mode 100644 index 000000000..44e90b9a2 --- /dev/null +++ b/examples/repositorycategories/packages/B/meta/package.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Package> + <DisplayName>B</DisplayName> + <Description>Example component B</Description> + <Version>1.0.0-1</Version> + <ReleaseDate>2015-01-01</ReleaseDate> + <Default>true</Default> +</Package> diff --git a/examples/repositorycategories/packages2_forcategory1/A2Cagetory1/data/A2_category1.txt b/examples/repositorycategories/packages2_forcategory1/A2Cagetory1/data/A2_category1.txt new file mode 100644 index 000000000..2b328a750 --- /dev/null +++ b/examples/repositorycategories/packages2_forcategory1/A2Cagetory1/data/A2_category1.txt @@ -0,0 +1,2 @@ +Example content for package A2, using category 1. + diff --git a/examples/repositorycategories/packages2_forcategory1/A2Cagetory1/meta/package.xml b/examples/repositorycategories/packages2_forcategory1/A2Cagetory1/meta/package.xml new file mode 100644 index 000000000..02d175868 --- /dev/null +++ b/examples/repositorycategories/packages2_forcategory1/A2Cagetory1/meta/package.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Package> + <DisplayName>A2 (from category 1)</DisplayName> + <Description>Example component A2</Description> + <Version>1.0.3-1</Version> + <ReleaseDate>2015-01-01</ReleaseDate> + <Default>true</Default> +</Package> diff --git a/examples/repositorycategories/packages2_forcategory1/B2Category1/data/B2_category1.txt b/examples/repositorycategories/packages2_forcategory1/B2Category1/data/B2_category1.txt new file mode 100644 index 000000000..56baa1709 --- /dev/null +++ b/examples/repositorycategories/packages2_forcategory1/B2Category1/data/B2_category1.txt @@ -0,0 +1,2 @@ +Example content for package B2, using category 1. + diff --git a/examples/repositorycategories/packages2_forcategory1/B2Category1/meta/package.xml b/examples/repositorycategories/packages2_forcategory1/B2Category1/meta/package.xml new file mode 100644 index 000000000..0c0b0411d --- /dev/null +++ b/examples/repositorycategories/packages2_forcategory1/B2Category1/meta/package.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Package> + <DisplayName>B2 (from category 1)</DisplayName> + <Description>Example component B</Description> + <Version>1.0.0-1</Version> + <ReleaseDate>2015-01-01</ReleaseDate> + <Default>true</Default> +</Package> diff --git a/examples/repositorycategories/packages_forcategory1/ACagetory1/data/A_category1.txt b/examples/repositorycategories/packages_forcategory1/ACagetory1/data/A_category1.txt new file mode 100644 index 000000000..e899cb202 --- /dev/null +++ b/examples/repositorycategories/packages_forcategory1/ACagetory1/data/A_category1.txt @@ -0,0 +1,2 @@ +Example content for package A, using category 1. + diff --git a/examples/repositorycategories/packages_forcategory1/ACagetory1/meta/package.xml b/examples/repositorycategories/packages_forcategory1/ACagetory1/meta/package.xml new file mode 100644 index 000000000..1f0e795e9 --- /dev/null +++ b/examples/repositorycategories/packages_forcategory1/ACagetory1/meta/package.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Package> + <DisplayName>A (from category 1)</DisplayName> + <Description>Example component A</Description> + <Version>1.0.3-1</Version> + <ReleaseDate>2015-01-01</ReleaseDate> + <Default>true</Default> +</Package> diff --git a/examples/repositorycategories/packages_forcategory1/BCategory1/data/B_category1.txt b/examples/repositorycategories/packages_forcategory1/BCategory1/data/B_category1.txt new file mode 100644 index 000000000..d355cb633 --- /dev/null +++ b/examples/repositorycategories/packages_forcategory1/BCategory1/data/B_category1.txt @@ -0,0 +1,2 @@ +Example content for package B, using category 1. + diff --git a/examples/repositorycategories/packages_forcategory1/BCategory1/meta/package.xml b/examples/repositorycategories/packages_forcategory1/BCategory1/meta/package.xml new file mode 100644 index 000000000..98b9776fd --- /dev/null +++ b/examples/repositorycategories/packages_forcategory1/BCategory1/meta/package.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Package> + <DisplayName>B (from category 1)</DisplayName> + <Description>Example component B</Description> + <Version>1.0.0-1</Version> + <ReleaseDate>2015-01-01</ReleaseDate> + <Default>true</Default> +</Package> diff --git a/examples/repositorycategories/packages_forcategory2/ACategory2/data/A_category2.txt b/examples/repositorycategories/packages_forcategory2/ACategory2/data/A_category2.txt new file mode 100644 index 000000000..0a10aa452 --- /dev/null +++ b/examples/repositorycategories/packages_forcategory2/ACategory2/data/A_category2.txt @@ -0,0 +1,2 @@ +Example content for package A, using category 2. + diff --git a/examples/repositorycategories/packages_forcategory2/ACategory2/meta/package.xml b/examples/repositorycategories/packages_forcategory2/ACategory2/meta/package.xml new file mode 100644 index 000000000..25a25f94e --- /dev/null +++ b/examples/repositorycategories/packages_forcategory2/ACategory2/meta/package.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Package> + <DisplayName>A (from category 2)</DisplayName> + <Description>Example component A</Description> + <Version>1.0.3-1</Version> + <ReleaseDate>2015-01-01</ReleaseDate> + <Default>true</Default> +</Package> diff --git a/examples/repositorycategories/packages_forcategory2/BCategory2/data/B_category2.txt b/examples/repositorycategories/packages_forcategory2/BCategory2/data/B_category2.txt new file mode 100644 index 000000000..ebf02b452 --- /dev/null +++ b/examples/repositorycategories/packages_forcategory2/BCategory2/data/B_category2.txt @@ -0,0 +1,2 @@ +Example content for package B, using category 2. + diff --git a/examples/repositorycategories/packages_forcategory2/BCategory2/meta/package.xml b/examples/repositorycategories/packages_forcategory2/BCategory2/meta/package.xml new file mode 100644 index 000000000..fa21c631b --- /dev/null +++ b/examples/repositorycategories/packages_forcategory2/BCategory2/meta/package.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Package> + <DisplayName>B (from category 2)</DisplayName> + <Description>Example component B</Description> + <Version>1.0.0-1</Version> + <ReleaseDate>2015-01-01</ReleaseDate> + <Default>true</Default> +</Package> diff --git a/examples/repositorycategories/repositorycategories.pro b/examples/repositorycategories/repositorycategories.pro new file mode 100644 index 000000000..37a0144b7 --- /dev/null +++ b/examples/repositorycategories/repositorycategories.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 --online-only -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/unstablecomponent/README b/examples/unstablecomponent/README new file mode 100644 index 000000000..6c081844a --- /dev/null +++ b/examples/unstablecomponent/README @@ -0,0 +1,5 @@ +Shows how to setup an installer that allows install even if there are broken components + +Generate installer with: + +binarycreator -c config/config.xml -p packages installer diff --git a/examples/unstablecomponent/config/config.xml b/examples/unstablecomponent/config/config.xml new file mode 100644 index 000000000..fb42ae334 --- /dev/null +++ b/examples/unstablecomponent/config/config.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Installer> + <Name>Unstable components Example</Name> + <Version>1.0.0</Version> + <Title>Unstable components Example</Title> + <Publisher>Qt-Project</Publisher> + <StartMenuDir>Qt IFW Examples</StartMenuDir> + <TargetDir>@HomeDir@/IfwExamples/unstablecomponent</TargetDir> + <AllowUnstableComponents>true</AllowUnstableComponents> + <ControlScript>controller.qs</ControlScript> +</Installer> diff --git a/examples/unstablecomponent/config/controller.qs b/examples/unstablecomponent/config/controller.qs new file mode 100644 index 000000000..ea7f96802 --- /dev/null +++ b/examples/unstablecomponent/config/controller.qs @@ -0,0 +1,10 @@ +function Controller() { + installer.unstableComponentFound.connect(unstableComponentFound) +} + +unstableComponentFound = function(type, message, comp) +{ + console.log("Unstable component, type: " + type) + console.log("Unstable component, message: " + message) + console.log("Unstable component, name: " + comp) +} diff --git a/examples/unstablecomponent/packages/componentB/meta/package.xml b/examples/unstablecomponent/packages/componentB/meta/package.xml new file mode 100644 index 000000000..acf9a3a28 --- /dev/null +++ b/examples/unstablecomponent/packages/componentB/meta/package.xml @@ -0,0 +1,8 @@ +<?xml version="1.0"?> +<Package> + <DisplayName>Component B</DisplayName> + <Description>This component does not depend on any other component.</Description> + <Version>1.0.0</Version> + <ReleaseDate>2018-02-02</ReleaseDate> + <SortingPriority>90</SortingPriority> +</Package> diff --git a/examples/unstablecomponent/packages/componentDependsonComponentMissingDependency/meta/package.xml b/examples/unstablecomponent/packages/componentDependsonComponentMissingDependency/meta/package.xml new file mode 100644 index 000000000..42d7cbb30 --- /dev/null +++ b/examples/unstablecomponent/packages/componentDependsonComponentMissingDependency/meta/package.xml @@ -0,0 +1,9 @@ +<?xml version="1.0"?> +<Package> + <DisplayName>ComponentDependsonComponentMissingDependency</DisplayName> + <Description>This component depends on component which is depending on component with missing dependency. User is not able to select this component for install.</Description> + <Dependencies>componentMissingDependency</Dependencies> + <Version>1.0.0</Version> + <ReleaseDate>2018-02-02</ReleaseDate> + <SortingPriority>70</SortingPriority> +</Package> diff --git a/examples/unstablecomponent/packages/componentDependsonComponentwithInvalidScript/meta/installscript.js b/examples/unstablecomponent/packages/componentDependsonComponentwithInvalidScript/meta/installscript.js new file mode 100644 index 000000000..7ad2f4db3 --- /dev/null +++ b/examples/unstablecomponent/packages/componentDependsonComponentwithInvalidScript/meta/installscript.js @@ -0,0 +1,33 @@ +/************************************************************************** +** +** Copyright (C) 2018 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the Qt Installer Framework. +** +** $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 +** 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 General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** 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-3.0.html. +** +** $QT_END_LICENSE$ +** +**************************************************************************/ + +function Component() +{ + component.addDependency("componentInvalidScipt"); +} + diff --git a/examples/unstablecomponent/packages/componentDependsonComponentwithInvalidScript/meta/package.xml b/examples/unstablecomponent/packages/componentDependsonComponentwithInvalidScript/meta/package.xml new file mode 100644 index 000000000..4df66da40 --- /dev/null +++ b/examples/unstablecomponent/packages/componentDependsonComponentwithInvalidScript/meta/package.xml @@ -0,0 +1,10 @@ +<?xml version="1.0"?> +<Package> + <DisplayName>Component depends on ComponentWithInvalidScript)</DisplayName> + <Description>Depends on component with invalid script. User is not able to select this component for install.</Description> + <Default>true</Default> + <Version>1.0.0</Version> + <ReleaseDate>2018-02-02</ReleaseDate> + <Script>installscript.js</Script> + <SortingPriority>30</SortingPriority> +</Package> diff --git a/examples/unstablecomponent/packages/componentE/meta/package.xml b/examples/unstablecomponent/packages/componentE/meta/package.xml new file mode 100644 index 000000000..a19c4f7a9 --- /dev/null +++ b/examples/unstablecomponent/packages/componentE/meta/package.xml @@ -0,0 +1,9 @@ +<?xml version="1.0"?> +<Package> + <DisplayName>Component E (forced)</DisplayName> + <Description>This is a forced component that is always installed.</Description> + <ForcedInstallation>true</ForcedInstallation> + <Version>1.0.0</Version> + <ReleaseDate>2018-02-02</ReleaseDate> + <SortingPriority>60</SortingPriority> +</Package> diff --git a/examples/unstablecomponent/packages/componentF.subcomponent1.subsubcomponent1/meta/package.xml b/examples/unstablecomponent/packages/componentF.subcomponent1.subsubcomponent1/meta/package.xml new file mode 100644 index 000000000..717eb723f --- /dev/null +++ b/examples/unstablecomponent/packages/componentF.subcomponent1.subsubcomponent1/meta/package.xml @@ -0,0 +1,8 @@ +<?xml version="1.0"?> +<Package> + <DisplayName>Subsubcomponent 1</DisplayName> + <Description>This component does not depend on any other component.</Description> + <Version>1.0.0</Version> + <ReleaseDate>2018-02-02</ReleaseDate> + <SortingPriority>100</SortingPriority> +</Package> diff --git a/examples/unstablecomponent/packages/componentF.subcomponent1.subsubcomponent2/meta/package.xml b/examples/unstablecomponent/packages/componentF.subcomponent1.subsubcomponent2/meta/package.xml new file mode 100644 index 000000000..29bc65ffa --- /dev/null +++ b/examples/unstablecomponent/packages/componentF.subcomponent1.subsubcomponent2/meta/package.xml @@ -0,0 +1,8 @@ +<?xml version="1.0"?> +<Package> + <DisplayName>Subsubcomponent 2</DisplayName> + <Description>This component does not depend on any other component.</Description> + <Version>1.0.0</Version> + <ReleaseDate>2018-02-02</ReleaseDate> + <SortingPriority>50</SortingPriority> +</Package> diff --git a/examples/unstablecomponent/packages/componentF.subcomponent1/meta/package.xml b/examples/unstablecomponent/packages/componentF.subcomponent1/meta/package.xml new file mode 100644 index 000000000..7111a9031 --- /dev/null +++ b/examples/unstablecomponent/packages/componentF.subcomponent1/meta/package.xml @@ -0,0 +1,9 @@ +<?xml version="1.0"?> +<Package> + <DisplayName>Subcomponent 1</DisplayName> + <Description>This component contains 2 leaf components.</Description> + <Version>1.0.0</Version> + <ReleaseDate>2018-02-02</ReleaseDate> + <SortingPriority>100</SortingPriority> + <Dependencies>componentA</Dependencies> +</Package> diff --git a/examples/unstablecomponent/packages/componentF.subcomponent2.subsubcomponent1/meta/package.xml b/examples/unstablecomponent/packages/componentF.subcomponent2.subsubcomponent1/meta/package.xml new file mode 100644 index 000000000..717eb723f --- /dev/null +++ b/examples/unstablecomponent/packages/componentF.subcomponent2.subsubcomponent1/meta/package.xml @@ -0,0 +1,8 @@ +<?xml version="1.0"?> +<Package> + <DisplayName>Subsubcomponent 1</DisplayName> + <Description>This component does not depend on any other component.</Description> + <Version>1.0.0</Version> + <ReleaseDate>2018-02-02</ReleaseDate> + <SortingPriority>100</SortingPriority> +</Package> diff --git a/examples/unstablecomponent/packages/componentF.subcomponent2.subsubcomponent2/meta/package.xml b/examples/unstablecomponent/packages/componentF.subcomponent2.subsubcomponent2/meta/package.xml new file mode 100644 index 000000000..29bc65ffa --- /dev/null +++ b/examples/unstablecomponent/packages/componentF.subcomponent2.subsubcomponent2/meta/package.xml @@ -0,0 +1,8 @@ +<?xml version="1.0"?> +<Package> + <DisplayName>Subsubcomponent 2</DisplayName> + <Description>This component does not depend on any other component.</Description> + <Version>1.0.0</Version> + <ReleaseDate>2018-02-02</ReleaseDate> + <SortingPriority>50</SortingPriority> +</Package> diff --git a/examples/unstablecomponent/packages/componentF.subcomponent2/meta/package.xml b/examples/unstablecomponent/packages/componentF.subcomponent2/meta/package.xml new file mode 100644 index 000000000..131f4799e --- /dev/null +++ b/examples/unstablecomponent/packages/componentF.subcomponent2/meta/package.xml @@ -0,0 +1,8 @@ +<?xml version="1.0"?> +<Package> + <DisplayName>Subcomponent 2</DisplayName> + <Description>This component contains 2 leaf components.</Description> + <Version>1.0.0</Version> + <ReleaseDate>2018-02-02</ReleaseDate> + <SortingPriority>50</SortingPriority> +</Package> diff --git a/examples/unstablecomponent/packages/componentF/meta/package.xml b/examples/unstablecomponent/packages/componentF/meta/package.xml new file mode 100644 index 000000000..7f24c4f35 --- /dev/null +++ b/examples/unstablecomponent/packages/componentF/meta/package.xml @@ -0,0 +1,8 @@ +<?xml version="1.0"?> +<Package> + <DisplayName>Component F</DisplayName> + <Description>This component contains 2 subcomponents.</Description> + <Version>1.0.0</Version> + <ReleaseDate>2018-02-02</ReleaseDate> + <SortingPriority>40</SortingPriority> +</Package> diff --git a/examples/unstablecomponent/packages/componentMissingDependency/meta/package.xml b/examples/unstablecomponent/packages/componentMissingDependency/meta/package.xml new file mode 100644 index 000000000..52cb99c1a --- /dev/null +++ b/examples/unstablecomponent/packages/componentMissingDependency/meta/package.xml @@ -0,0 +1,9 @@ +<?xml version="1.0"?> +<Package> + <DisplayName>ComponentMissingDependency</DisplayName> + <Description>This component depends on component which does not exists. User is not able to select this component for install.</Description> + <Dependencies>componentDoesnotExists</Dependencies> + <Version>1.0.0</Version> + <ReleaseDate>2018-02-02</ReleaseDate> + <SortingPriority>80</SortingPriority> +</Package> diff --git a/examples/unstablecomponent/packages/componentWithInvalidScipt/data/installcontent.txt b/examples/unstablecomponent/packages/componentWithInvalidScipt/data/installcontent.txt new file mode 100644 index 000000000..f40001983 --- /dev/null +++ b/examples/unstablecomponent/packages/componentWithInvalidScipt/data/installcontent.txt @@ -0,0 +1,2 @@ +This file will be installed into the target directory.... + diff --git a/examples/unstablecomponent/packages/componentWithInvalidScipt/meta/installscript.js b/examples/unstablecomponent/packages/componentWithInvalidScipt/meta/installscript.js new file mode 100644 index 000000000..4ca6a8816 --- /dev/null +++ b/examples/unstablecomponent/packages/componentWithInvalidScipt/meta/installscript.js @@ -0,0 +1,33 @@ +/************************************************************************** +** +** Copyright (C) 2018 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the Qt Installer Framework. +** +** $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 +** 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 General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** 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-3.0.html. +** +** $QT_END_LICENSE$ +** +**************************************************************************/ + +function Component() +{ + component.invalidScriptCall() +} + diff --git a/examples/unstablecomponent/packages/componentWithInvalidScipt/meta/package.xml b/examples/unstablecomponent/packages/componentWithInvalidScipt/meta/package.xml new file mode 100644 index 000000000..7bf69ccc4 --- /dev/null +++ b/examples/unstablecomponent/packages/componentWithInvalidScipt/meta/package.xml @@ -0,0 +1,9 @@ +<?xml version="1.0"?> +<Package> + <DisplayName>ComponentWithInvalidScript</DisplayName> + <Description>This component has an invalid script. User is not able to select this component for install.</Description> + <Version>1.0.0</Version> + <ReleaseDate>2018-02-02</ReleaseDate> + <SortingPriority>100</SortingPriority> + <Script>installscript.js</Script> +</Package> diff --git a/examples/unstablecomponent/unstablecomponent.pro b/examples/unstablecomponent/unstablecomponent.pro new file mode 100644 index 000000000..415df49d5 --- /dev/null +++ b/examples/unstablecomponent/unstablecomponent.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 |