summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/doc/images/qtifw-examples-productimage.pngbin0 -> 57251 bytes
-rw-r--r--examples/doc/productimage.qdoc57
-rw-r--r--examples/examples.pro1
-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
8 files changed, 98 insertions, 0 deletions
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/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/examples.pro b/examples/examples.pro
index 45b065d4a..283f81abe 100644
--- a/examples/examples.pro
+++ b/examples/examples.pro
@@ -10,6 +10,7 @@ SUBDIRS += \
modifyextract \
online \
openreadme \
+ productimage \
quitinstaller \
registerfileextension \
registervirtualcomponentforuninstall \
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