summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/config/ifw.qdocconf2
-rw-r--r--examples/doc/dynamicpage.qdoc75
-rw-r--r--examples/doc/images/qtifw-examples-dynamicpages.pngbin0 -> 29084 bytes
-rw-r--r--examples/dynamicpage/config/config.xml4
-rw-r--r--examples/dynamicpage/packages/org.qtproject.ifw.example.dynamicpage.node2/data/data.node2.txt (renamed from examples/dynamicpage/packages/org.qtproject.ifw.example.dynamicpage.node2/data/data.node2..txt)0
-rw-r--r--examples/dynamicpage/packages/org.qtproject.ifw.example.dynamicpage/meta/installscript.js2
6 files changed, 78 insertions, 5 deletions
diff --git a/doc/config/ifw.qdocconf b/doc/config/ifw.qdocconf
index 65665177d..a767ccc56 100644
--- a/doc/config/ifw.qdocconf
+++ b/doc/config/ifw.qdocconf
@@ -18,7 +18,7 @@ exampledirs = $SRCDIR ../../examples
headers.fileextensions = "*.h"
sources.fileextensions = "*.qdoc *.qdocinc *.cpp"
-examples.fileextensions = "*.js *.qs *.txt *.xml"
+examples.fileextensions = "*.js *.qs *.txt *.xml *.ui"
examples.imageextensions = "*.png"
indexes += $QT_INSTALL_DOCS/qtcore/qtcore.index \
diff --git a/examples/doc/dynamicpage.qdoc b/examples/doc/dynamicpage.qdoc
index 4aba1e743..959e13fa5 100644
--- a/examples/doc/dynamicpage.qdoc
+++ b/examples/doc/dynamicpage.qdoc
@@ -32,9 +32,82 @@
\brief Building an installer by using a script and dynamic pages.
+ \image qtifw-examples-dynamicpages.png
+
+ \e{Dynamic Page Installer} illustrates how to use the
+ \c component.loaded.connect() function to load custom installer pages (.ui)
+ instead of using the default installer pages and how to add functionality to
+ the pages.
+
+ The \uicontrol {Select Installation Type} page contains icons that are added
+ to a Qt resource file (.qrc) for delivery with the installer.
+
\include installerfw-examples-configuring.qdocinc
\quotefile dynamicpage/config/config.xml
- \include installerfw-examples-generating.qdocinc
+ \include installerfw-examples-packaging.qdocinc
+
+ \list
+ \li The \c <Script> section specifies the file name of the JavaScript
+ file that is loaded to perform operations.
+ \li The \c <UserInterfaces> section specifies the file names of the
+ installer pages (.ui files) to use.
+ \li The \c <Name> section provides domain-like identification for the
+ component.
+ \endlist
+
+ \quotefile dynamicpage/packages/org.qtproject.ifw.example.dynamicpage/meta/package.xml
+
+ This installer contains three components that each have their own package
+ information file with slightly different contents.
+
+ \section1 Creating Dynamic Pages
+
+ In installscript.js, we create the installer pages and add functionality to
+ them.
+
+ Qt Installer Framework calls the constructors of all scripts. When all the
+ constructors are finished and all UI files are loaded, a \c loaded signal is
+ emitted for each component.
+
+ To create an installer page, we have to wait for the \c loaded signal that
+ tells us that the UI file has been loaded:
+
+ \quotefromfile dynamicpage/packages/org.qtproject.ifw.example.dynamicpage/meta/installscript.js
+ \skipto component.loaded
+ \printuntil ;
+
+ We hide the default pages by setting their visibility to \c false:
+
+ \skipto setDefaultPageVisible
+ \printuntil ReadyForInstallation
+
+ We use the \c loaded function that we connected earlier to add functionality
+ to the dynamic installer pages:
+
+ \skipto installerLoaded
+ \printuntil defaultInstall.checked
+ \printuntil }
+ \dots
+
+ \section1 Generating the Example Installer
+
+ To create the example installer, switch to the example source directory on
+ the command line and enter the following command:
+
+ \list
+ \li On Windows:
+ \code
+ ..\..\bin\binarycreator.exe -c config\config.xml -r resources/additional.qrc -p packages installer.exe
+ \endcode
+ \li On Linux or OS X:
+ \code
+ ../../bin/binarycreator -c config/config.xml -r resources/additional.qrc -p packages installer
+ \endcode
+ \endlist
+
+ Because the installer uses additional resources, you must give the
+ \c {-r} option and specify the path to the Qt resource file that contains
+ the resources. The installer is created in the current directory.
*/
diff --git a/examples/doc/images/qtifw-examples-dynamicpages.png b/examples/doc/images/qtifw-examples-dynamicpages.png
new file mode 100644
index 000000000..61a0be894
--- /dev/null
+++ b/examples/doc/images/qtifw-examples-dynamicpages.png
Binary files differ
diff --git a/examples/dynamicpage/config/config.xml b/examples/dynamicpage/config/config.xml
index d65946b9b..b91922546 100644
--- a/examples/dynamicpage/config/config.xml
+++ b/examples/dynamicpage/config/config.xml
@@ -4,6 +4,6 @@
<Version>1.0.0</Version>
<Title>Dynamic Page Installer Example</Title>
<Publisher>Qt-Project</Publisher>
- <StartMenuDir>Qt Installer Framework Example</StartMenuDir>
- <TargetDir>@HomeDir@/IFWDynamicPageInstallerExample</TargetDir>
+ <StartMenuDir>Qt IFW Examples</StartMenuDir>
+ <TargetDir>@HomeDir@/IfwExample</TargetDir>
</Installer>
diff --git a/examples/dynamicpage/packages/org.qtproject.ifw.example.dynamicpage.node2/data/data.node2..txt b/examples/dynamicpage/packages/org.qtproject.ifw.example.dynamicpage.node2/data/data.node2.txt
index f40001983..f40001983 100644
--- a/examples/dynamicpage/packages/org.qtproject.ifw.example.dynamicpage.node2/data/data.node2..txt
+++ b/examples/dynamicpage/packages/org.qtproject.ifw.example.dynamicpage.node2/data/data.node2.txt
diff --git a/examples/dynamicpage/packages/org.qtproject.ifw.example.dynamicpage/meta/installscript.js b/examples/dynamicpage/packages/org.qtproject.ifw.example.dynamicpage/meta/installscript.js
index f56bbeaaa..b97e47ce9 100644
--- a/examples/dynamicpage/packages/org.qtproject.ifw.example.dynamicpage/meta/installscript.js
+++ b/examples/dynamicpage/packages/org.qtproject.ifw.example.dynamicpage/meta/installscript.js
@@ -76,7 +76,7 @@ Component.prototype.installerLoaded = function () {
widget.completeInstall.toggled.connect(this, Component.prototype.completeInstallToggled);
widget.defaultInstall.checked = true;
- widget.windowTitle = "Please select a installation type";
+ widget.windowTitle = "Select Installation Type";
}
if (installer.addWizardPage(component, "LicenseWidget", QInstaller.LicenseCheck)) {