summaryrefslogtreecommitdiffstats
path: root/doc/scripting.qdoc
diff options
context:
space:
mode:
Diffstat (limited to 'doc/scripting.qdoc')
-rw-r--r--doc/scripting.qdoc34
1 files changed, 31 insertions, 3 deletions
diff --git a/doc/scripting.qdoc b/doc/scripting.qdoc
index 517eec941..1dde6576a 100644
--- a/doc/scripting.qdoc
+++ b/doc/scripting.qdoc
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2022 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Installer Framework.
**
@@ -94,7 +94,7 @@
\li Reference to the \l QInstaller of the component
\row
\li component
- \li Reference to the \l Component of the component
+ \li Reference to the \l{https://doc.qt.io/qtinstallerframework/qinstaller-component.html}{Component}. of the component
\endtable
\section1 Message Boxes
@@ -147,6 +147,7 @@
CustomOperation()
{
setName( "CustomOperation" );
+ setGroup( Install );
}
void backup()
@@ -317,6 +318,9 @@
For example, \c {C:\ProgramData\Microsoft\Windows\Start Menu\Programs}
Only available on Windows.
+ \row
+ \li UILanguage
+ \li The language that is used in the installer.
\endtable
The variables can be resolved by calls to installer::value(). If embedded
@@ -371,4 +375,28 @@
\li ApplicationsDirX64
\li \c {C:\Program Files}
\endtable
+
+ \section1 Using postLoad in Component Script
+ By default, component scripts are evaluated before the install tree view
+ is shown. This can have performance cost if there is a huge amount of
+ components with component scripts. The \c postLoad attribute introduces a way
+ to evaluate the component script right before installation starts, only for
+ the components that are selected for installation or update:
+ \code
+ <Script postLoad="true">my_install_script.qs</Script>
+ \endcode
+ Whether \c postLoad can be set to \c true must be considered case by case,
+ depending on the contents of the script. For example, if the script contents
+ affect the install tree view, like setting \c <Default> to \c true, setting
+ new dependencies, or adding new wizard pages, \c postLoad must not be used or
+ it must be set to \c false. If the script contains only methods
+ that are run during the installation, \c postLoad can be set to \c true. For
+ example, all overridden \c operation functions are run during installation.
+ For more information, see \l {Adding Operations to Components}. If you are not
+ sure when to use \c postLoad, then don't use it. The performance cost is
+ huge only when there are thousands of scripts to be evaluated.
+
+ Both \c <Script postLoad="true"> and \c <Script> tags can be used at the same time.
+ This means that one component can have one script that is evaluated when the installation
+ starts and another script that is evaluated before the install tree view is shown.
*/