summaryrefslogtreecommitdiffstats
path: root/examples/doc
diff options
context:
space:
mode:
Diffstat (limited to 'examples/doc')
-rw-r--r--examples/doc/changeuserinterface.qdoc2
-rw-r--r--examples/doc/componenterror.qdoc3
-rw-r--r--examples/doc/dynamicpage.qdoc77
-rw-r--r--examples/doc/images/qtifw-examples-dynamicpages.pngbin0 -> 29084 bytes
-rw-r--r--examples/doc/images/qtifw-examples-modifyextract.pngbin0 -> 27489 bytes
-rw-r--r--examples/doc/images/qtifw-examples-openreadme.pngbin0 -> 24131 bytes
-rw-r--r--examples/doc/images/qtifw-examples-quit_installer.pngbin0 -> 19682 bytes
-rw-r--r--examples/doc/images/qtifw-examples-registerfileextension.pngbin0 -> 24599 bytes
-rw-r--r--examples/doc/images/qtifw-examples-startmenu.pngbin0 -> 15605 bytes
-rw-r--r--examples/doc/modifyextract.qdoc32
-rw-r--r--examples/doc/openreadme.qdoc50
-rw-r--r--examples/doc/quit_installer.qdoc40
-rw-r--r--examples/doc/registerfileextension.qdoc72
-rw-r--r--examples/doc/startmenu.qdoc35
-rw-r--r--examples/doc/systeminfo.qdoc3
15 files changed, 303 insertions, 11 deletions
diff --git a/examples/doc/changeuserinterface.qdoc b/examples/doc/changeuserinterface.qdoc
index 25d7d3257..15212756c 100644
--- a/examples/doc/changeuserinterface.qdoc
+++ b/examples/doc/changeuserinterface.qdoc
@@ -30,7 +30,7 @@
\ingroup qtifwexamples
\title Change Installer UI Example
- \brief Changing the installer UI by using a component script.
+ \brief Using a component script to modify the installer UI.
\image qtifw-examples-changeuserinterface.png
diff --git a/examples/doc/componenterror.qdoc b/examples/doc/componenterror.qdoc
index d4e6ef17a..39a0dcb84 100644
--- a/examples/doc/componenterror.qdoc
+++ b/examples/doc/componenterror.qdoc
@@ -30,7 +30,8 @@
\ingroup qtifwexamples
\title Component Error Example
- \brief Stopping the installation if the components cannot be installed.
+ \brief Using a component script to stop the installation if the components
+ cannot be installed.
\image qtifw-examples-componenterror.png
diff --git a/examples/doc/dynamicpage.qdoc b/examples/doc/dynamicpage.qdoc
index 4aba1e743..6c68fe336 100644
--- a/examples/doc/dynamicpage.qdoc
+++ b/examples/doc/dynamicpage.qdoc
@@ -30,11 +30,84 @@
\ingroup qtifwexamples
\title Dynamic Page Installer Example
- \brief Building an installer by using a script and dynamic pages.
+ \brief Using a component script and dynamic pages to build an installer.
+
+ \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/doc/images/qtifw-examples-modifyextract.png b/examples/doc/images/qtifw-examples-modifyextract.png
new file mode 100644
index 000000000..d189d0b3e
--- /dev/null
+++ b/examples/doc/images/qtifw-examples-modifyextract.png
Binary files differ
diff --git a/examples/doc/images/qtifw-examples-openreadme.png b/examples/doc/images/qtifw-examples-openreadme.png
new file mode 100644
index 000000000..4cebedc75
--- /dev/null
+++ b/examples/doc/images/qtifw-examples-openreadme.png
Binary files differ
diff --git a/examples/doc/images/qtifw-examples-quit_installer.png b/examples/doc/images/qtifw-examples-quit_installer.png
new file mode 100644
index 000000000..12e94f0a1
--- /dev/null
+++ b/examples/doc/images/qtifw-examples-quit_installer.png
Binary files differ
diff --git a/examples/doc/images/qtifw-examples-registerfileextension.png b/examples/doc/images/qtifw-examples-registerfileextension.png
new file mode 100644
index 000000000..467c6f603
--- /dev/null
+++ b/examples/doc/images/qtifw-examples-registerfileextension.png
Binary files differ
diff --git a/examples/doc/images/qtifw-examples-startmenu.png b/examples/doc/images/qtifw-examples-startmenu.png
new file mode 100644
index 000000000..f332f2381
--- /dev/null
+++ b/examples/doc/images/qtifw-examples-startmenu.png
Binary files differ
diff --git a/examples/doc/modifyextract.qdoc b/examples/doc/modifyextract.qdoc
index fd5b5ebe5..7dbd455c2 100644
--- a/examples/doc/modifyextract.qdoc
+++ b/examples/doc/modifyextract.qdoc
@@ -30,11 +30,41 @@
\ingroup qtifwexamples
\title Modify Extract Installer Example
- \brief Using the extract archive hook to modify the target path.
+ \brief Using the extract archive hook in a component script to modify the
+ target path.
+
+ \image qtifw-examples-modifyextract.png
+
+ \e{Modify Extract Installer} illustrates how to overwrite the
+ \c{component.createOperationsForArchive()} function to be able to install a
+ component to a modified path.
\include installerfw-examples-configuring.qdocinc
\quotefile modifyextract/config/config.xml
+ \include installerfw-examples-packaging.qdocinc
+
+ \list
+ \li The \c <Default> section is set to \c true to preselect the
+ component in the installer.
+ \li The \c <Script> section specifies the file name of the JavaScript
+ file that is loaded to perform operations.
+ \endlist
+
+ \quotefile modifyextract/packages/org.qtproject.ifw.example.modifyextract/meta/package.xml
+
+ \section1 Modifying Target Path
+
+ In installscript.js, we overwrite the default
+ \c{component.createOperationsForArchive()} implementation to be able to
+ register an \c Extract operation with a custom argument:
+
+ \quotefromfile modifyextract/packages/org.qtproject.ifw.example.modifyextract/meta/installscript.js
+ \skipto createOperationsForArchive
+ \printuntil {
+ \skipto component.addOperation
+ \printuntil }
+
\include installerfw-examples-generating.qdocinc
*/
diff --git a/examples/doc/openreadme.qdoc b/examples/doc/openreadme.qdoc
index 165caf4e2..be24df084 100644
--- a/examples/doc/openreadme.qdoc
+++ b/examples/doc/openreadme.qdoc
@@ -30,12 +30,58 @@
\ingroup qtifwexamples
\title Open ReadMe Example
- \brief Adding a check box for opening the readme file to the final
- installer page.
+ \brief Using a component script to add a check box for opening the readme
+ file to the final installer page.
+
+ \image qtifw-examples-openreadme.png
+
+ \e{Open ReadMe} illustrates how to use the \c Component() function to add a
+ check box to the installation finished page and to open the readme file if
+ end users select the check box.
\include installerfw-examples-configuring.qdocinc
\quotefile openreadme/config/config.xml
+ \include installerfw-examples-packaging.qdocinc
+
+ \list
+ \li The \c <Default> section is set to \c true to preselect the
+ component in the installer.
+ \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 name of the
+ installer page (.ui file) to use.
+ \endlist
+
+ \quotefile openreadme/packages/or.qtproject.ifw.example.openreadme/meta/package.xml
+
+ \section1 Opening Files After Installation
+
+ In installscript.qs, we use the \c Component() function to connect to the
+ \c installationFinishedPageIsShown signal when the installation is complete
+ and to the \c installationFinished signal when the end users click
+ \uicontrol Finish (\uicontrol Done on OS X):
+
+ \quotefromfile openreadme/packages/or.qtproject.ifw.example.openreadme/meta/installscript.qs
+ \skipto Component()
+ \printuntil }
+
+ We call the component::createOperations() function to override the default
+ method for creating operations:
+
+ \printuntil }
+
+ If the installation is successful, we call the installer::addWizardPageItem()
+ function to replace the last installer page with a custom page that contains
+ the \uicontrol {OpenReadMe} check box:
+
+ \printuntil /^\}/
+
+ We set the \c readMeCheckBox to \c checked by default and use the
+ QDesktopServices::openURL() function to open the readme file:
+
+ \printuntil /^\}/
+
\include installerfw-examples-generating.qdocinc
*/
diff --git a/examples/doc/quit_installer.qdoc b/examples/doc/quit_installer.qdoc
index bb1655ad2..c73dddd48 100644
--- a/examples/doc/quit_installer.qdoc
+++ b/examples/doc/quit_installer.qdoc
@@ -30,11 +30,49 @@
\ingroup qtifwexamples
\title Quit Installer Example
- \brief Quitting an installer by using a script.
+ \image qtifw-examples-quit_installer.png
+
+ \brief Using a component script to quit an installer.
+
+ \e{Quit Installer} illustrates how to use the \c Component() function to
+ display a message box to end users for quitting the installation if some
+ requirements for the installation are not met.
\include installerfw-examples-configuring.qdocinc
\quotefile quit_installer/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.
+ \li The \c <Script> element specifies the file name of the JavaScript
+ file that is loaded to perform operations.
+ \endlist
+
+ \quotefile quit_installer/packages/org.qtproject.ifw.example.quitinstaller/meta/package.xml
+
+ \section1 Quitting the Installation
+
+ In installscript.js, we use the \c Component() function to display a
+ message box for quitting the installer to end users:
+
+ \quotefromfile quit_installer/packages/org.qtproject.ifw.example.quitinstaller/meta/installscript.js
+ \skipto Component()
+ \printuntil QMessageBox.Ok
+
+ If end users select \uicontrol OK, we use the \c installer::setValue()
+ function to display a message and the \c installer.setDefaultPageVisible()
+ function to hide the subsequent installer pages:
+
+ \printuntil NextButton
+
+ If end users select \uicontrol Cancel, we display the default installer
+ pages and use the \c installer::setValue() function to display another
+ message on the last installer page:
+
+ \printuntil /^\}/
+
\include installerfw-examples-generating.qdocinc
*/
diff --git a/examples/doc/registerfileextension.qdoc b/examples/doc/registerfileextension.qdoc
index 6b9c41e68..4c1cc5769 100644
--- a/examples/doc/registerfileextension.qdoc
+++ b/examples/doc/registerfileextension.qdoc
@@ -30,11 +30,81 @@
\ingroup qtifwexamples
\title Register File Extension Example
- \brief Registering a filename extension on Windows.
+ \brief Using a component script to register a filename extension on Windows.
+
+ \image qtifw-examples-registerfileextension.png
+
+ \e{Register File Extension} illustrates how to register a file type on
+ Windows. We use the \c component.addOperation() function with the
+ \c RegisterFileType operation to register a randomly generated file type to
+ be opened with Notepad.
\include installerfw-examples-configuring.qdocinc
\quotefile registerfileextension/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.
+ \li The \c <Script> element specifies the file name of the JavaScript
+ file that is loaded to perform operations.
+ \li The \c <UserInterfaces> element specifies the file names of the
+ installer pages (.ui files) to use.
+ \endlist
+
+ \quotefile registerfileextension/packages/org.qtproject.ifw.example.registerfileextension/meta/package.xml
+
+ \section1 Registering File Extensions
+
+ In installscript.qs, we call the \c Component() function to connect to the
+ \c addRegisterFileCheckBox signal as soon as all components have been
+ loaded:
+
+ \quotefromfile registerfileextension/packages/org.qtproject.ifw.example.registerfileextension/meta/installscript.qs
+ \skipto Component()
+ \printuntil addRegisterFileCheckBox
+
+ We use the \c addRegisterFileCheckBox() function to display a check box for
+ registering the generated file type on the last page of the installer.
+ We hide the page when updating and uninstalling:
+
+ \skipto addRegisterFileCheckBox
+ \printuntil )
+ \skipto isInstaller()
+ \printuntil /^\}/
+
+ We connect to the \c openRegisteredFileIfChecked signal when end users
+ select \uicontrol Finish on the last installer page:
+
+ \quotefromfile registerfileextension/packages/org.qtproject.ifw.example.registerfileextension/meta/installscript.qs
+ \skipto openRegisteredFileIfChecked
+ \printuntil ;
+
+ We call the \c openRegisteredFileIfChecked function to check that the
+ file type was successfully registered:
+
+ \skipto openRegisteredFileIfChecked
+ \printuntil /^\}/
+
+ We bind the \c unusualFileType variable to the \c generateUnusualFileType()
+ function that randomly generates a file type with the specified length:
+
+ \quotefromfile registerfileextension/packages/org.qtproject.ifw.example.registerfileextension/meta/installscript.qs
+ \skipto generateUnusualFileType
+ \printuntil randomString
+ \printuntil }
+
+ We use the \c RegisterFileType operation to create a file of the
+ specified type and to specify the application to open the file with:
+
+ \quotefromfile registerfileextension/packages/org.qtproject.ifw.example.registerfileextension/meta/installscript.qs
+ \skipto component.createOperations()
+ \printuntil /^\}/
+
\include installerfw-examples-generating.qdocinc
+
+ After running the installer, double-click the installed file,
+ \c registeredfile.<extension>, to open it in Notepad.
*/
diff --git a/examples/doc/startmenu.qdoc b/examples/doc/startmenu.qdoc
index 1c9c98e49..33ed6d31f 100644
--- a/examples/doc/startmenu.qdoc
+++ b/examples/doc/startmenu.qdoc
@@ -30,11 +30,44 @@
\ingroup qtifwexamples
\title Start Menu Shortcut Example
- \brief Adding an entry to the Windows Start menu.
+ \brief Using a component script to add an entry to the Windows Start menu.
+
+ \image qtifw-examples-startmenu.png
+
+ \e{Start Menu} illustrates how to use the \gui Component function to add an
+ entry for opening a README file to the Windows \uicontrol Start menu.
\include installerfw-examples-configuring.qdocinc
\quotefile startmenu/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.
+ \li The \c <Script> element specifies the file name of the JavaScript
+ file that is loaded to perform operations.
+ \endlist
+
+ \quotefile startmenu/packages/org.qtproject.ifw.example/meta/package.xml
+
+ \section1 Adding Entries to Start Menu
+
+ In installscript.qs, we use the \c createOperations() function to call the
+ component::createOperations() function, which creates the \c Extract
+ operation by default:
+
+ \quotefromfile startmenu/packages/org.qtproject.ifw.example/meta/installscript.qs
+ \skipto createOperations
+ \printuntil {
+ \skipto createOperations
+ \printuntil ;
+
+ On Windows, we use the component::addOperation function to add a shortcut
+ to the \uicontrol Start menu for opening the readme file:
+
+ \printuntil /^\}/
+
\include installerfw-examples-generating.qdocinc
*/
diff --git a/examples/doc/systeminfo.qdoc b/examples/doc/systeminfo.qdoc
index bd5ed2779..da3b99c10 100644
--- a/examples/doc/systeminfo.qdoc
+++ b/examples/doc/systeminfo.qdoc
@@ -30,7 +30,8 @@
\ingroup qtifwexamples
\title System Information Example
- \brief Checking operating system version and bitness in a script.
+ \brief Using the systemInfo API in a component script to check operating
+ system version and bitness.
The \e{System Information Example} demonstrates how to use the \l{systemInfo} API to detect
details about the target operating system.