installer QML Type
Provides access to core functionality of the Qt Installer Framework. More...
Import Statement: | import scripting . |
Signals
- aboutCalculateComponentsToInstall()
- aboutCalculateComponentsToUninstall()
- componentAdded(Component component)
- coreNetworkSettingsChanged()
- currentPageChanged(int page)
- finishAllComponentsReset(list<Component> rootComponents)
- finishButtonClicked()
- finishUpdaterComponentsReset(list<Component> componentsWithUpdates)
- finishedCalculateComponentsToInstall()
- finishedCalculateComponentsToUninstall()
- installationFinished()
- installationInterrupted()
- installationStarted()
- metaJobInfoMessage(string message)
- metaJobProgress(int progress)
- metaJobTotalProgress(int progress)
- offlineGenerationFinished()
- offlineGenerationStarted()
- rootComponentsAdded(list<Component> components)
- setAutomatedPageSwitchEnabled(bool request)
- setValidatorForCustomPageRequested(Component component, string name, string callbackName)
- startAllComponentsReset()
- startUpdaterComponentsReset()
- statusChanged(Status status)
- titleMessageChanged(string title)
- uninstallationFinished()
- uninstallationStarted()
- updateFinished()
- updaterComponentsAdded(list<Component> components)
- valueChanged(string key, string value)
- wizardPageInsertionRequested(Widget widget, WizardPage page)
- wizardPageRemovalRequested(Widget widget)
- wizardPageVisibilityChangeRequested(bool visible, int page)
- wizardWidgetInsertionRequested(Widget widget, WizardPage page, int position)
- wizardWidgetRemovalRequested(Widget widget)
Methods
- void addUserRepositories(stringlist repositories)
- boolean addWizardPage(Component component, string name, int page)
- boolean addWizardPageItem(Component component, string name, int page, int position)
- stringlist allowedRunningProcesses()
- void autoAcceptMessageBoxes()
- void autoRejectMessageBoxes()
- boolean calculateComponentsToInstall()
- boolean calculateComponentsToUninstall()
- void cancelMetaInfoJob()
- void clearComponentsToInstallCalculated()
- array components(string regexp)
- void componentsToInstallNeedsRecalculation()
- boolean containsFileDialogAutomaticAnswer(string identifier)
- boolean containsValue(string key)
- void deselectComponent(string id)
- void dropAdminRights()
- string environmentVariable(string name)
- array execute(string program, stringlist arguments, string stdin, string stdinCodec, string stdoutCodec)
- boolean executeDetached(string program, stringlist arguments, string workingDirectory)
- boolean fileExists(string filePath)
- string findLibrary(string name, stringlist paths)
- string findPath(string name, stringlist paths)
- boolean gainAdminRights()
- void interrupt()
- boolean isCommandLineDefaultInstall()
- boolean isCommandLineInstance()
- boolean isFileExtensionRegistered(string extension)
- boolean isInstaller()
- boolean isOfflineGenerator()
- boolean isOfflineOnly()
- boolean isPackageManager()
- boolean isProcessRunning(string name)
- boolean isUninstaller()
- boolean isUpdater()
- boolean isUserSetBinaryMarker()
- string key(string value)
- boolean killProcess(string absoluteFilePath)
- void languageChanged()
- boolean localInstallerBinaryUsed()
- boolean performOperation(string name, stringlist arguments)
- string readConsoleLine(string title, int maxlen)
- string readFile(string filePath, string codecName)
- void removeFileDialogAutomaticAnswer(string identifier)
- boolean removeWizardPage(Component component, string name)
- boolean removeWizardPageItem(Component component, string name)
- float requiredDiskSpace()
- float requiredTemporaryDiskSpace()
- boolean runInstaller()
- boolean runOfflineGenerator()
- boolean runPackageUpdater()
- boolean runUninstaller()
- void selectComponent(string id)
- void setAllowedRunningProcesses(stringlist processes)
- void setAutoAcceptLicenses()
- void setCanceled()
- void setCompleteUninstallation(bool complete)
- boolean setDefaultPageVisible(int page, boolean visible)
- void setDependsOnLocalInstallerBinary()
- void setFileDialogAutomaticAnswer(string identifier, string value)
- void setInstaller()
- void setInstallerBaseBinary(string path)
- void setMessageBoxAutomaticAnswer(string identifier, int button)
- void setPackageManager()
- void setSharedFlag(string key, boolean value)
- void setTemporaryRepositories(stringlist repositories, boolean replace)
- void setUninstaller()
- void setUpdater()
- void setValidatorForCustomPage(Component component, string name, string callbackName)
- void setValue(string key, string value)
- boolean sharedFlag(string key)
- string value(string key, string defaultValue)
- stringlist values(string key, stringlist defaultValue)
- boolean versionMatches(string version, string requirement)
Detailed Description
Signal Documentation
Emitted before the ordered list of components to install is calculated.
Note: The corresponding handler is onAboutCalculateComponentsToInstall
.
Emitted before the ordered list of components to uninstall is calculated.
Note: The corresponding handler is onAboutCalculateComponentsToUninstall
.
Emitted when a new root component is added.
Note: The corresponding handler is onComponentAdded
.
See also rootComponentsAdded() and updaterComponentsAdded().
Emitted when the network settings are changed.
Note: The corresponding handler is onCoreNetworkSettingsChanged
.
Emitted when the current page changes.
Note: The corresponding handler is onCurrentPageChanged
.
Triggered when the list of new root components has been updated.
Note: The corresponding handler is onFinishAllComponentsReset
.
See also startAllComponentsReset().
Emitted when the user clicks the Finish button of the installer.
Note: The corresponding handler is onFinishButtonClicked
.
Triggered when the list of available remote updates has been updated.
Note: The corresponding handler is onFinishUpdaterComponentsReset
.
Emitted after the ordered list of components to install was calculated.
Note: The corresponding handler is onFinishedCalculateComponentsToInstall
.
Emitted after the ordered list of components to uninstall was calculated.
Note: The corresponding handler is onFinishedCalculateComponentsToUninstall
.
Triggered when installation has finished.
Note: The corresponding handler is onInstallationFinished
.
See also installationStarted() and installationInterrupted().
Triggered when installation has been interrupted (cancelled).
Note: The corresponding handler is onInstallationInterrupted
.
See also interrupt(), installationStarted(), and installationFinished().
Triggered when installation has started.
Note: The corresponding handler is onInstallationStarted
.
See also installationFinished() and installationInterrupted().
Triggered with informative updates of the communication with a remote repository.
Note: The corresponding handler is onMetaJobInfoMessage
.
Triggered with progress updates of the communication with a remote repository. Progress ranges from 0 to 100.
Note: The corresponding handler is onMetaJobProgress
.
Triggered when total progress value of the communication with a remote repository changes.
Note: The corresponding handler is onMetaJobTotalProgress
.
Triggered when offline installer generation has finished.
Note: The corresponding handler is onOfflineGenerationFinished
.
See also offlineGenerationStarted().
Triggered when offline installer generation has started.
Note: The corresponding handler is onOfflineGenerationStarted
.
See also offlineGenerationFinished().
Emitted when a new list of root components is added.
Note: The corresponding handler is onRootComponentsAdded
.
See also componentAdded() and updaterComponentsAdded().
Triggered when the automatic switching from PerformInstallation to InstallationFinished page is enabled (request = true
) or disabled (request = false
).
The automatic switching is disabled automatically when for example the user expands or unexpands the Details section of the PerformInstallation page.
Note: The corresponding handler is onSetAutomatedPageSwitchEnabled
.
Triggered when setValidatorForCustomPage is called.
Note: The corresponding handler is onSetValidatorForCustomPageRequested
.
Triggered when the list of components starts to get updated.
Note: The corresponding handler is onStartAllComponentsReset
.
See also finishAllComponentsReset().
Triggered when components start to get updated during a remote update.
Note: The corresponding handler is onStartUpdaterComponentsReset
.
Emitted when the installer status changes.
Note: The corresponding handler is onStatusChanged
.
Emitted when the text of the installer status (on the PerformInstallation page) changes to title.
Note: The corresponding handler is onTitleMessageChanged
.
Triggered when uninstallation has finished.
Note: The corresponding handler is onUninstallationFinished
.
See also uninstallationStarted().
Triggered when uninstallation has started.
Note: The corresponding handler is onUninstallationStarted
.
See also uninstallationFinished().
Triggered when an update has finished.
Note: The corresponding handler is onUpdateFinished
.
Emitted when a new list of updater components is added.
Note: The corresponding handler is onUpdaterComponentsAdded
.
See also componentAdded() and rootComponentsAdded().
Emitted when a value changes.
Note: The corresponding handler is onValueChanged
.
See also setValue().
Emitted when a custom widget is about to be inserted into page by addWizardPage.
Note: The corresponding handler is onWizardPageInsertionRequested
.
Emitted when a widget is removed by removeWizardPage.
Note: The corresponding handler is onWizardPageRemovalRequested
.
Emitted when the visibility of the page with id page changes to visible.
Note: The corresponding handler is onWizardPageVisibilityChangeRequested
.
See also setDefaultPageVisible().
Emitted when a widget is inserted into page by addWizardPageItem ordered by position.
Note: The corresponding handler is onWizardWidgetInsertionRequested
.
Emitted when a widget is removed by removeWizardPageItem.
Note: The corresponding handler is onWizardWidgetRemovalRequested
.
Method Documentation
Registers additional repositories.
See also setTemporaryRepositories().
Adds the widget with objectName() name registered by component as a new page into the installer's GUI wizard. The widget is added before page.
See Controller Scripting for the possible values of page.
Returns true
if the operation succeeded.
See also removeWizardPage() and setDefaultPageVisible().
Adds the widget with objectName() name registered by component as a GUI element into the installer's GUI wizard. The widget is added on page ordered by position. If several widgets are added to the same page, the widget with lower position number will be inserted on top.
See Controller Scripting for the possible values of page.
See also removeWizardPageItem() and wizardWidgetInsertionRequested().
Returns processes that are allowed to run when updating with the maintenance tool.
See also setAllowedRunningProcesses().
Automatically accept all user message boxes.
See also autoRejectMessageBoxes() and setMessageBoxAutomaticAnswer().
Automatically reject all user message boxes.
See also autoAcceptMessageBoxes() and setMessageBoxAutomaticAnswer().
Calculates an ordered list of components to install based on the current run mode. Also auto installed dependencies are resolved. The aboutCalculateComponentsToInstall() signal is emitted before the calculation starts, the finishedCalculateComponentsToInstall() signal once all calculations are done.
Calculates a list of components to uninstall based on the current run mode. Auto installed dependencies are not yet resolved. The aboutCalculateComponentsToUninstall() signal is emitted before the calculation starts, the finishedCalculateComponentsToUninstall() signal once all calculations are done. Always returns true
.
Returns an array of all components currently available. If the repository metadata have not been fetched yet, the array will be empty. Optionally, a regexp expression can be used to further filter the listed packages.
See also component, finishAllComponentsReset(), and finishUpdaterComponentsReset().
Returns true
if QFileDialog with the ID identifier has an automatic answer set.
See also setFileDialogAutomaticAnswer() and removeFileDialogAutomaticAnswer().
Returns true
if the installer contains a value for key.
See also value, setValue, and valueChanged.
Drops admin rights gained by gainAdminRights.
See also gainAdminRights().
Returns the content of the environment variable name. An empty string is returned if the environment variable is not set.
Starts the program program with the arguments arguments in a new process and waits for it to finish.
stdin is sent as standard input to the application.
stdInCodec is the name of the codec to use for converting the input string into bytes to write to the standard input of the application.
stdOutCodec is the name of the codec to use for converting data written by the application to standard output into a string.
Returns an empty array if the program could not be executed, otherwise the output of command as the first item, and the return code as the second.
Note: On Unix, the output is just the output to stdout, not to stderr.
See also executeDetached().
Starts the program program with the arguments arguments in a new process, and detaches from it. Returns true
on success; otherwise returns false
. If the installer exits, the detached process will continue to live.
Note: Arguments that contain spaces are not passed to the process as separate arguments.
Unix: The started process will run in its own session and act like a daemon.
Windows: Arguments that contain spaces are wrapped in quotes. The started process will run as a regular standalone process.
The process will be started in the directory workingDirectory.
Returns true
if the filePath exists; otherwise returns false
.
Note: If the file is a symlink that points to a non existing file, false
is returned.
Finds a library named name in paths. If paths is empty, it gets filled with platform dependent default paths. The resulting path is returned.
This method can be used by scripts to check external dependencies.
See also findPath.
Tries to find a file name name in one of paths. The resulting path is returned.
This method can be used by scripts to check external dependencies.
See also findLibrary.
Tries to gain admin rights. On success, it returns true
.
See also dropAdminRights().
Cancels an ongoing installation.
See also installationInterrupted.
Returns true
if installation is performed with default components.
Returns whether a file extension is already registered in the Windows registry. Returns false
on all other platforms.
Returns true
if the application, binary, or executable is executed in installer mode.
See also isUninstaller, isUpdater, and isPackageManager.
Returns true
if the application is executed in offline generation mode.
Returns true
if the the application, binary, or executable is executed in package manager mode.
See also setPackageManager, isInstaller, isUninstaller, and isUpdater.
Returns true
if a process with name is running. On Windows, the comparison is case-insensitive.
Returns true
if the the application, binary, or executable is executed in uninstaller mode.
See also setUninstaller, isInstaller, isUpdater, and isPackageManager.
Returns true
if the the application, binary, or executable is executed in updater mode.
See also setUpdater, isInstaller, isUninstaller, and isPackageManager.
Returns the installer key for value. If value is not known, empty string is returned.
Returns true
if a process with absoluteFilePath could be killed or is not running.
Note: This is implemented in a semi blocking way (to keep the main thread to paint the UI).
Returns false
if the installer is run on Windows, and the installer has been started from a remote file system drive. Otherwise returns true
.
See also setDependsOnLocalInstallerBinary().
Instantly performs the operation name with arguments.
Prints title to a console and reads console input. Function halts the installer and waits for user input. Function returns a line which user has typed into the console. The maximum allowed line length is set to maxlen. If the stream contains lines longer than this, then the line is split after maxlen characters. If maxlen is 0, the line can be of any length.
Note: This function can only be called when installing from a command line instance without GUI.
Returns the contents of the file filePath using the encoding specified by codecName. The file is read in the text mode, that is, end-of-line terminators are translated to the local encoding.
Note: If the file does not exist or an error occurs while reading the file, an empty string is returned.
Removes the automatic answer from QFileDialog with the ID identifier.
See also setFileDialogAutomaticAnswer().
Removes the widget with objectName() name previously added to the installer's wizard by component.
Returns true
if the operation succeeded.
See also addWizardPage(), setDefaultPageVisible(), and wizardPageRemovalRequested().
Removes the widget with objectName() name previously added to the installer's wizard by component.
See also addWizardPageItem().
Returns the additional estimated amount of disk space in bytes required after installation.
See also requiredTemporaryDiskSpace().
Returns the estimated required disk space during installation in bytes.
See also requiredDiskSpace().
Sets additional processes that can run when updating with the maintenance tool.
See also allowedRunningProcesses().
Automatically accepts all license agreements required to install the selected components. This can be used to skip the command line license acceptance query. The names of the accepted individual licenses are still printed to a console.
Sets the uninstallation to be complete. If complete is false, only components deselected by the user will be uninstalled. This option applies only on uninstallation.
Sets the visibility of the default page with the ID page to visible. That is, removes it from or adds it to the wizard. This works only for pages that were in the installer when it was started.
Returns true
.
See also addWizardPage() and removeWizardPage().
Makes sure the installer runs from a local drive. Otherwise the user will get an appropriate error message.
Note: This only works on Windows.
See also localInstallerBinaryUsed().
Automatically sets the existing directory or filename value to QFileDialog with the ID identifier.
See also removeFileDialogAutomaticAnswer().
Forces an installer context.
See also isInstaller, setUpdater, setUninstaller, and setPackageManager.
Sets the installerbase
binary to use when writing the maintenance tool. Set the path if an update to the binary is available.
If not set, the executable segment of the running installer or uninstaller will be used.
Automatically close the message box with ID identifier as if the user had pressed button.
This can be used for unattended (automatic) installations.
See also QMessageBox, autoAcceptMessageBoxes(), and autoRejectMessageBoxes().
Forces a package manager context.
See also isPackageManager().
Sets a shared flag with name key to value. This is one option to share information between scripts.
Deprecated since 2.0.0. Use setValue instead.
See also sharedFlag().
Sets additional repositories for this instance of the installer or updater. Will be removed after invoking it again.
See also addUserRepositories().
Forces an uninstaller context.
See also isUninstaller, setUpdater, setPackageManager, and setInstaller.
Forces an updater context.
See also isUpdater, setUninstaller, setPackageManager, and setInstaller.
See also setValidatorForCustomPageRequested().
Sets the installer value for key to value.
See also value, containsValue, and valueChanged.
Returns shared flag with name key. This is one option to share information between scripts.
Deprecated since 2.0.0. Use value or values instead.
See also setSharedFlag().
Returns the installer value for key. If key is not known to the system, defaultValue is returned. Additionally, on Windows, key can be a registry key.
See also setValue, containsValue, and valueChanged.
Returns the installer value for key. If key is not known to the system, defaultValue is returned. Additionally, on Windows, key can be a registry key.
See also value.
Returns true
when version matches the requirement. requirement can be a fixed version number or it can be prefixed by the comparators '>', '>=', '<', '<=' and '='.