Online Installer 4.x

From Qt Wiki
Jump to navigation Jump to search

Overview

Qt Installer and Maintenance Tool 4.0 has a new command line interface. With command line interface you can install, uninstall and update components and perform a full uninstall. You can also list installed components, search updatable components, and search components available for install. Use command <installer_executable> --help to study the commands and options available. Please note that we have renamed several options to make them uniform. For example doing a default install, for all components marked as 'Default' and 'ForcedInstallation' the command would be:

installer(.exe) install --root C:\Qt\MyQtInstall

Installing unattended with CLI

There are several options which can be given to installer to perform full unattended installation. For example license and opensource oblications acceptancies:

--accept-licenses -> Accepts all licenses without user input.

--accept-obligations -> Accepts Qt Open Source usage obligations without user input.

Also there are queries which require user input from command line. In case you don't want to type them you can give the answer as an option to installer. Simpliest way is to use:

--default-answer

which will automatically select the default answer for the messages. In case you want different answers to certain queries, you can use --auto-answer <identifier=value>, for example

--auto-answer telemetry-question=Yes,AssociateCommonFiletypes=Yes

There might be also a case where the installer asks for a file or a folder location. --file-query <identifier=value> can be used in that case, for example for SDP7 path:

--file-query PathForSDP7=<path_to_sdp>

The identifiers are printed into console before the actual question and message type so you can pick up the identifiers from there.

Qt Installer and MaintenanceTool still have a forced login. If qtaccount.ini is found from cache that will be used. Optionally you can login either from command line using switches

--email <your_email>

--pw <your_pw>

or save jwt token to env variable JWT_TOKEN (for installers built in 8 Jun, after that the env variable will be QT_INSTALLER_JWT_TOKEN. You can check the build date with --version)

Example commands and options for Qt Installer

Here are examples for using command line interface with Qt Online Installer and Maintenance Tool:

Install

installer(.exe) install --root C:\Qt\MyQt --auto-answer telemetry-question=Yes,AssociateCommonFiletypes=Yes --default-answer --accept-licenses --accept-obligations --file-query PathForSDP7=<path_to_sdp> --email <your_email --pw <your_pw>

maintenancetool.exe install qt.qt5.5150.qtcharts qt.qt5.5150.win64_mingw81 --default-answer --accept-licenses