summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/dependencies/config/config.xml1
-rw-r--r--examples/dependencies/packages/componentG/meta/installscript.js39
-rw-r--r--examples/dependencies/packages/componentG/meta/package.xml6
-rw-r--r--examples/doc/hidecheckbox.qdoc60
-rw-r--r--examples/doc/images/qtifw-examples-hidecheckbox.pngbin0 -> 24807 bytes
-rw-r--r--examples/doc/images/qtifw-examples-stylesheet.pngbin0 -> 14796 bytes
-rw-r--r--examples/doc/stylesheet.qdoc51
-rw-r--r--examples/examples.pro3
-rw-r--r--examples/hidecheckbox/README6
-rw-r--r--examples/hidecheckbox/config/config.xml9
-rw-r--r--examples/hidecheckbox/hidecheckbox.pro13
-rw-r--r--examples/hidecheckbox/packages/componentF.subcomponent1.subsubcomponent1/data/testF_sub1_sub1.txt1
-rw-r--r--examples/hidecheckbox/packages/componentF.subcomponent1.subsubcomponent1/meta/package.xml7
-rw-r--r--examples/hidecheckbox/packages/componentF.subcomponent1/data/testF_sub1.txt1
-rw-r--r--examples/hidecheckbox/packages/componentF.subcomponent1/meta/package.xml9
-rw-r--r--examples/hidecheckbox/packages/componentF/data/testF.txt1
-rw-r--r--examples/hidecheckbox/packages/componentF/meta/package.xml9
-rw-r--r--examples/startmenu/packages/org.qtproject.ifw.example/meta/installscript.qs2
-rw-r--r--examples/stylesheet/README6
-rw-r--r--examples/stylesheet/config/config.xml12
-rw-r--r--examples/stylesheet/config/style.qss25
-rw-r--r--examples/stylesheet/packages/org.qtproject.ifw.example.stylesheet/meta/installscript.qs39
-rw-r--r--examples/stylesheet/packages/org.qtproject.ifw.example.stylesheet/meta/package.xml8
-rw-r--r--examples/stylesheet/stylesheet.pro13
-rw-r--r--examples/translations/README9
25 files changed, 318 insertions, 12 deletions
diff --git a/examples/dependencies/config/config.xml b/examples/dependencies/config/config.xml
index 72a127f19..d7a0723dd 100644
--- a/examples/dependencies/config/config.xml
+++ b/examples/dependencies/config/config.xml
@@ -7,4 +7,5 @@
<StartMenuDir>Qt IFW Examples</StartMenuDir>
<TargetDir>@HomeDir@/IfwExamples/dependencies</TargetDir>
<CreateLocalRepository>true</CreateLocalRepository>
+ <InstallActionColumnVisible>true</InstallActionColumnVisible>
</Installer>
diff --git a/examples/dependencies/packages/componentG/meta/installscript.js b/examples/dependencies/packages/componentG/meta/installscript.js
new file mode 100644
index 000000000..ea89a4162
--- /dev/null
+++ b/examples/dependencies/packages/componentG/meta/installscript.js
@@ -0,0 +1,39 @@
+/**************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Installer Framework.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** 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://qt.io/terms-conditions. For further
+** information use the contact form at http://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 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+**
+** $QT_END_LICENSE$
+**
+**************************************************************************/
+
+function Component()
+{
+ component.addDependency("componentA");
+}
+
diff --git a/examples/dependencies/packages/componentG/meta/package.xml b/examples/dependencies/packages/componentG/meta/package.xml
index 3e14256b4..1cff56d48 100644
--- a/examples/dependencies/packages/componentG/meta/package.xml
+++ b/examples/dependencies/packages/componentG/meta/package.xml
@@ -1,10 +1,10 @@
<?xml version="1.0"?>
<Package>
- <DisplayName>Component G (default, depends on A)</DisplayName>
- <Description>By default, this component is selected for installation. It depends on component A.</Description>
+ <DisplayName>Component G (default, depends on A, dependency added dynamically)</DisplayName>
+ <Description>By default, this component is selected for installation. It depends on component A. Dependency is added from inside component script.</Description>
<Default>true</Default>
<Version>1.0.0</Version>
<ReleaseDate>2014-08-25</ReleaseDate>
- <Dependencies>componentA</Dependencies>
+ <Script>installscript.js</Script>
<SortingPriority>30</SortingPriority>
</Package>
diff --git a/examples/doc/hidecheckbox.qdoc b/examples/doc/hidecheckbox.qdoc
new file mode 100644
index 000000000..cdcc506c1
--- /dev/null
+++ b/examples/doc/hidecheckbox.qdoc
@@ -0,0 +1,60 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 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://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 hidecheckbox
+ \ingroup qtifwexamples
+ \title Hide Checkbox Example
+
+ \brief Using components' package.xml files to hide checkboxes for items.
+
+ \image qtifw-examples-hidecheckbox.png
+
+ \e{Hide Checkbox} illustrates how to hide the checkbox for an item.
+
+ \include installerfw-examples-configuring.qdocinc
+
+ \quotefile hidecheckbox/config/config.xml
+
+ \include installerfw-examples-packaging.qdocinc
+
+ \list
+ \li The \c <Checkable> element specifies whether a checkbox is displayed next to an item.
+ Set to \c false to hide the checkbox for the item.
+ \endlist
+
+ This example attempts to install three components, so we create a package.xml file in each
+ component directory: componentF, componentF.subcomponent1, and
+ componentF.subcomponent1.subcomponent1. We also specify the component name and description
+ in each of them. The top level item, componentF, has \c <Checkable> set to \c false,
+ so it cannot be selected. It also does not install the package, for that
+ you will need to set \c <ForceInstallation> to \c true.
+
+ \quotefile hidecheckbox/packages/componentF/meta/package.xml
+
+ \include installerfw-examples-generating.qdocinc
+*/
diff --git a/examples/doc/images/qtifw-examples-hidecheckbox.png b/examples/doc/images/qtifw-examples-hidecheckbox.png
new file mode 100644
index 000000000..58b0a1848
--- /dev/null
+++ b/examples/doc/images/qtifw-examples-hidecheckbox.png
Binary files differ
diff --git a/examples/doc/images/qtifw-examples-stylesheet.png b/examples/doc/images/qtifw-examples-stylesheet.png
new file mode 100644
index 000000000..eaa42b8b8
--- /dev/null
+++ b/examples/doc/images/qtifw-examples-stylesheet.png
Binary files differ
diff --git a/examples/doc/stylesheet.qdoc b/examples/doc/stylesheet.qdoc
new file mode 100644
index 000000000..cc408df33
--- /dev/null
+++ b/examples/doc/stylesheet.qdoc
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 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://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 stylesheet
+ \ingroup qtifwexamples
+ \title Stylesheet Example
+
+ \brief Using a stylesheet to customize a UI.
+
+ \image qtifw-examples-stylesheet.png
+
+ \e {Stylesheet} demonstrates how to use a stylesheet to customize
+ a wizard UI.
+
+ \include installerfw-examples-configuring.qdocinc
+
+ \list
+ \li The \c <WizardStyle> element sets the wizard style to be used.
+ \li The \c <StyleSheet> element sets the stylesheet file.
+ \li The \c <TitleColor> element sets the color of the titles and subtitles.
+ \endlist
+
+ \quotefile stylesheet/config/config.xml
+
+ \include installerfw-examples-generating.qdocinc
+*/
diff --git a/examples/examples.pro b/examples/examples.pro
index 92a976ff2..377632b9c 100644
--- a/examples/examples.pro
+++ b/examples/examples.pro
@@ -12,4 +12,5 @@ SUBDIRS += \
quitinstaller \
registerfileextension \
startmenu \
- systeminfo
+ systeminfo \
+ stylesheet
diff --git a/examples/hidecheckbox/README b/examples/hidecheckbox/README
new file mode 100644
index 000000000..22619bf9c
--- /dev/null
+++ b/examples/hidecheckbox/README
@@ -0,0 +1,6 @@
+Shows how to disable top level item, allowing the installation of child items.
+
+Generate installer with
+
+binarycreator --offline-only -c config/config.xml -p packages installer
+
diff --git a/examples/hidecheckbox/config/config.xml b/examples/hidecheckbox/config/config.xml
new file mode 100644
index 000000000..8d695ecdb
--- /dev/null
+++ b/examples/hidecheckbox/config/config.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Installer>
+ <Name>Hide item checkbox</Name>
+ <Version>1.0.0</Version>
+ <Title>Hide checkbox</Title>
+ <Publisher>The Qt Company</Publisher>
+ <StartMenuDir>Qt IFW Examples</StartMenuDir>
+ <TargetDir>@HomeDir@/IfwExamples/hidecheckbox</TargetDir>
+</Installer>
diff --git a/examples/hidecheckbox/hidecheckbox.pro b/examples/hidecheckbox/hidecheckbox.pro
new file mode 100644
index 000000000..415df49d5
--- /dev/null
+++ b/examples/hidecheckbox/hidecheckbox.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/hidecheckbox/packages/componentF.subcomponent1.subsubcomponent1/data/testF_sub1_sub1.txt b/examples/hidecheckbox/packages/componentF.subcomponent1.subsubcomponent1/data/testF_sub1_sub1.txt
new file mode 100644
index 000000000..0478bd970
--- /dev/null
+++ b/examples/hidecheckbox/packages/componentF.subcomponent1.subsubcomponent1/data/testF_sub1_sub1.txt
@@ -0,0 +1 @@
+test sub sub versio3
diff --git a/examples/hidecheckbox/packages/componentF.subcomponent1.subsubcomponent1/meta/package.xml b/examples/hidecheckbox/packages/componentF.subcomponent1.subsubcomponent1/meta/package.xml
new file mode 100644
index 000000000..b613022a0
--- /dev/null
+++ b/examples/hidecheckbox/packages/componentF.subcomponent1.subsubcomponent1/meta/package.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<Package>
+ <DisplayName>Subsubcomponent 1</DisplayName>
+ <Description>This component does not depend on any other component.</Description>
+ <Version>1.0.2</Version>
+ <ReleaseDate>2015-12-01</ReleaseDate>
+</Package>
diff --git a/examples/hidecheckbox/packages/componentF.subcomponent1/data/testF_sub1.txt b/examples/hidecheckbox/packages/componentF.subcomponent1/data/testF_sub1.txt
new file mode 100644
index 000000000..c34214bb9
--- /dev/null
+++ b/examples/hidecheckbox/packages/componentF.subcomponent1/data/testF_sub1.txt
@@ -0,0 +1 @@
+test sub1 versio3
diff --git a/examples/hidecheckbox/packages/componentF.subcomponent1/meta/package.xml b/examples/hidecheckbox/packages/componentF.subcomponent1/meta/package.xml
new file mode 100644
index 000000000..58bbab370
--- /dev/null
+++ b/examples/hidecheckbox/packages/componentF.subcomponent1/meta/package.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<Package>
+ <DisplayName>Subcomponent 1</DisplayName>
+ <Description>This component contains sub component.</Description>
+ <Version>1.0.2</Version>
+ <ReleaseDate>2015-12-01</ReleaseDate>
+ <SortingPriority>100</SortingPriority>
+ <Checkable>true</Checkable>
+</Package>
diff --git a/examples/hidecheckbox/packages/componentF/data/testF.txt b/examples/hidecheckbox/packages/componentF/data/testF.txt
new file mode 100644
index 000000000..c34214bb9
--- /dev/null
+++ b/examples/hidecheckbox/packages/componentF/data/testF.txt
@@ -0,0 +1 @@
+test sub1 versio3
diff --git a/examples/hidecheckbox/packages/componentF/meta/package.xml b/examples/hidecheckbox/packages/componentF/meta/package.xml
new file mode 100644
index 000000000..96d7cbc21
--- /dev/null
+++ b/examples/hidecheckbox/packages/componentF/meta/package.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<Package>
+ <DisplayName>Uncheckable component</DisplayName>
+ <Description>This component is uncheckable.</Description>
+ <Version>1.0.0</Version>
+ <ReleaseDate>2015-12-01</ReleaseDate>
+ <SortingPriority>40</SortingPriority>
+ <Checkable>false</Checkable>
+</Package>
diff --git a/examples/startmenu/packages/org.qtproject.ifw.example/meta/installscript.qs b/examples/startmenu/packages/org.qtproject.ifw.example/meta/installscript.qs
index 6384a3d99..161a0df36 100644
--- a/examples/startmenu/packages/org.qtproject.ifw.example/meta/installscript.qs
+++ b/examples/startmenu/packages/org.qtproject.ifw.example/meta/installscript.qs
@@ -44,6 +44,6 @@ Component.prototype.createOperations = function()
if (systemInfo.productType === "windows") {
component.addOperation("CreateShortcut", "@TargetDir@/README.txt", "@StartMenuDir@/README.lnk",
"workingDirectory=@TargetDir@", "iconPath=%SystemRoot%/system32/SHELL32.dll",
- "iconId=2");
+ "iconId=2", "description=Open README file");
}
}
diff --git a/examples/stylesheet/README b/examples/stylesheet/README
new file mode 100644
index 000000000..ee0d445db
--- /dev/null
+++ b/examples/stylesheet/README
@@ -0,0 +1,6 @@
+Shows how to customize a UI using stylesheet.
+
+Generate installer with
+
+binarycreator --offline-only -c config/config.xml -p packages installer
+
diff --git a/examples/stylesheet/config/config.xml b/examples/stylesheet/config/config.xml
new file mode 100644
index 000000000..3cd8e6060
--- /dev/null
+++ b/examples/stylesheet/config/config.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Installer>
+ <Name>Stylesheet Example</Name>
+ <Version>1.0.0</Version>
+ <Title>Stylesheet Example</Title>
+ <Publisher>Qt-Project</Publisher>
+ <StartMenuDir>Qt IFW Examples</StartMenuDir>
+ <TargetDir>@HomeDir@/IfwExamples/stylesheet</TargetDir>
+ <WizardStyle>Classic</WizardStyle>
+ <StyleSheet>style.qss</StyleSheet>
+ <TitleColor>#FFFFFF</TitleColor>
+</Installer>
diff --git a/examples/stylesheet/config/style.qss b/examples/stylesheet/config/style.qss
new file mode 100644
index 000000000..8d4f75d65
--- /dev/null
+++ b/examples/stylesheet/config/style.qss
@@ -0,0 +1,25 @@
+QWidget
+{
+ color: white;
+ background-color: rgb(65, 65, 65);
+}
+
+QPushButton
+{
+ background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 rgba(150, 150, 150, 60%), stop:1 rgba(50, 50, 50, 60%));
+ border-color: rgb(60, 60, 60);
+ border-style: solid;
+ border-width: 2px;
+ border-radius: 9px;
+ min-height: 20px;
+ max-height: 20px;
+ min-width: 60px;
+ max-width: 60px;
+ padding-left: 15px;
+ padding-right: 15px;
+}
+
+QPushButton:pressed, QPushButton:checked
+{
+ background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 rgba(50, 50, 50, 60%), stop:1 rgba(150, 150, 150, 60%));
+}
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
new file mode 100644
index 000000000..e99733ff3
--- /dev/null
+++ b/examples/stylesheet/packages/org.qtproject.ifw.example.stylesheet/meta/installscript.qs
@@ -0,0 +1,39 @@
+/**************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Installer Framework.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** 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://qt.io/terms-conditions. For further
+** information use the contact form at http://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 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+**
+** $QT_END_LICENSE$
+**
+**************************************************************************/
+
+function Component()
+{
+ // constructor
+ installer.setDefaultPageVisible(QInstaller.ComponentSelection, false);
+}
diff --git a/examples/stylesheet/packages/org.qtproject.ifw.example.stylesheet/meta/package.xml b/examples/stylesheet/packages/org.qtproject.ifw.example.stylesheet/meta/package.xml
new file mode 100644
index 000000000..c0698a4e4
--- /dev/null
+++ b/examples/stylesheet/packages/org.qtproject.ifw.example.stylesheet/meta/package.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Package>
+ <DisplayName>Dummy</DisplayName>
+ <ReleaseDate>2015-09-09</ReleaseDate>
+ <Version>1.0.1</Version>
+ <Default>true</Default>
+ <Script>installscript.qs</Script>
+</Package>
diff --git a/examples/stylesheet/stylesheet.pro b/examples/stylesheet/stylesheet.pro
new file mode 100644
index 000000000..415df49d5
--- /dev/null
+++ b/examples/stylesheet/stylesheet.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/translations/README b/examples/translations/README
index 13fb2b685..b3c20e3d7 100644
--- a/examples/translations/README
+++ b/examples/translations/README
@@ -10,11 +10,6 @@ You can now run the installer in German.
Linux:
-LANG=de ./installer
+LANGUAGE=de ./installer
-Windows:
-
-set LANG=de
-installer.exe
-
-On OS X you need to adapt the system settings to set German as preferred language, and then start the installer.
+On OS X and Windows you need to adapt the system settings to set German as preferred language, and then start the installer.