Online Installer 4.x: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
No edit summary
 
(9 intermediate revisions by 3 users not shown)
Line 1: Line 1:
==Overview==
==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.
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:
Use command <code><installer_executable> --help</code> 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
<code>installer(.exe) install --root C:\Qt\MyQtInstall</code>


==Installing unattended with CLI==
==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:
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.
<code>--accept-licenses</code> -> Accepts all licenses without user input.
   
   
--accept-obligations -> Accepts Qt Open Source usage obligations without user input.
<code>--accept-obligations</code> -> 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:
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
<code>--default-answer</code>
   
   
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
which will automatically select the default answer for the messages. In case you want different answers to certain queries, you can use <code>--auto-answer <identifier=value></code>, for example
   
   
--auto-answer telemetry-question=Yes,AssociateCommonFiletypes=Yes
<code>--auto-answer telemetry-question=Yes,AssociateCommonFiletypes=Yes</code>
   
   
When starting to install or update, installer lists the components it is about to be install or update. In case you are sure what you are installing and don't want to double check what is about to be installed, you can skip that query with command:
When starting to install or update, installer lists the components it is about to be install or update. In case you are sure what you are installing and don't want to double check what is about to be installed, you can skip that query with command:
   
   
--confirm-command
<code>--confirm-command</code>
   
   
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:
There might be also a case where the installer asks for a file or a folder location. <code>--file-query <identifier=value></code> can be used in that case, for example for SDP7 path:
   
   
--file-query PathForSDP7=<path_to_sdp>
<code>--file-query PathForSDP7=<path_to_sdp></code>
   
   
The identifiers are printed into console before the actual question and message type so you can pick up the identifiers from there.
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.
Qt Installer and MaintenanceTool still have a forced login. If <code>qtaccount.ini</code> is found from cache that will be used.
Optionally you can login either from command line using switches
Optionally you can login either from command line using switches
   
   
--email <your_email>  
<code>--email <your_email></code>
   
   
--pw <your_pw>
<code>--pw <your_pw></code>
   
   
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)
or save jwt token to env variable <code>JWT_TOKEN</code> (for installers built in 8  Jun, after that the env variable will be <code>QT_INSTALLER_JWT_TOKEN</code>. You can check the build date with <code>--version</code>)


==Example commands and options for Qt Installer==
==Example commands and options for Qt Installer==
Line 43: Line 43:


===Install===
===Install===
Install will install default set of components if no components are given as parameter. If components are given, then the default set and the given components are installed. If no default set is wanted, then add option --no-default-installations. Note that there are forced components, such as QtCreator which will always be installed. Option --no-force-installations can be used to not install the forced components but it is not adviced to be used. They are forced for a reason and no guarantee how the install will work if that option is used.
Install will install default set of components if no components are given as parameter. If components are given, then the default set and the given components are installed. If no default set is wanted, then add option <code>--no-default-installations</code>. Note that there are forced components, such as QtCreator which will always be installed. Option <code>--no-force-installations</code> can be used to not install the forced components but it is not advised to be used. They are forced for a reason and no guarantee how the install will work if that option is used.


''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> --confirm-command''
<code>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> --confirm-command</code>


''maintenancetool(.exe) install qt.qt5.5150.qtcharts qt.qt5.5150.win64_mingw81 --default-answer --accept-licenses --confirm-command''
<code>maintenancetool(.exe) install qt.qt5.5150.qtcharts qt.qt5.5150.win64_mingw81 --default-answer --accept-licenses --confirm-command</code>


===Search===
===Search===
Search searches all components which are available in repositories. It uses regular expression. For example searching all Qt5.13.0 and Qt5.13.1 components:
Search searches all components which are available in repositories. It uses regular expression. For example searching all Qt5.13.0 and Qt5.13.1 components:


''installer(.exe) or maintenancetool(.exe) search  "(5130|5131)"''
<code>installer(.exe) or maintenancetool(.exe) search  "(5130|5131)"</code>
 
The <code>--filter-packages  <element=regex,...></code> option can be used by itself or in conjunction with the search command argument to specify additional filters for the search operation:
 
<code>installer(.exe) or maintenancetool(.exe) search --filter-packages "DisplayName=Qt 5.15.2"</code>
 
The filter element can be any package information element, the full list can be found from:
 
https://doc.qt.io/qtinstallerframework/ifw-component-description.html#package-information-file-syntax
 
The element is case sensitive. The searchable string is case insensitive (from 4.3.x onwards).


===List===
===List===
List will list all components you have installed:
List will list all components you have installed:


''maintenancetool(.exe) list''
<code>maintenancetool(.exe) list</code>


===Check updates===
===Check updates===
''maintenancetool(.exe) check-updates''
<code>maintenancetool(.exe) check-updates</code>


===Update===
===Update===
Update without parameters will update all components that have an update. Essential components are always updated first, same way as it is done when launching updater from GUI. Alternatively you can give a list of components you want to update:
Update without parameters will update all components that have an update. Essential components are always updated first, same way as it is done when launching updater from GUI. Alternatively you can give a list of components you want to update:


''maintenancetool(.exe) update'' or
<code>maintenancetool(.exe) update</code> or


''maintenancetool(.exe) update qt.qt5.5150.qtcharts qt.qt5.5150.win64_mingw81''
<code>maintenancetool(.exe) update qt.qt5.5150.qtcharts qt.qt5.5150.win64_mingw81</code>


===Remove===
===Remove===
Remove uninstalls listed components, their children and other components depending on the uninstalled components.
Remove uninstalls listed components, their children and other components depending on the uninstalled components.


''maintenancetool(.exe) remove qt.qt5.5150.qtcharts qt.qt5.5150.win64_mingw81''
<code>maintenancetool(.exe) remove qt.qt5.5150.qtcharts qt.qt5.5150.win64_mingw81</code>


===Full uninstall===
===Full uninstall===
''maintenancetool(.exe) purge''
<code>maintenancetool(.exe) purge</code>


==Identifiers reference==
==Identifiers reference==


===Message identifiers===
===Message identifiers===
The following table lists known identifiers and values used for --auto-answer option.
The following table lists known identifiers and values used for <code>--auto-answer</code> option.
{| class="wikitable"
{| class="wikitable"
!ID
!ID
Line 125: Line 135:
|}
|}


== Selecting mirror for opensource ==
==Selecting a mirror for opensource==
Installer version 4.0.1-1 has new option for selecting a mirror for opensource metadata and downloads. Mirror can be set from terminal using option --mirror.
Installer version 4.0.1-1 has new option for selecting a mirror for opensource metadata and downloads. The mirror can be set from terminal using option --mirror.


Examples:
Examples:


''installer(.exe) --mirror <nowiki>http://www.nic.funet.fi/pub/mirrors/download.qt-project.org</nowiki>''
* <code>installer(.exe) --mirror http://www.nic.funet.fi/pub/mirrors/download.qt-project.org</code>
 
* <code>installer(.exe) --mirror http://ftp2.nluug.nl/languages/qt</code>
''installer(.exe) --mirror <nowiki>http://ftp2.nluug.nl/languages/qt</nowiki>''
* <code>maintenancetool(.exe)  --mirror http://qt.mirror.constant.com</code>
 
''maintenancetool(.exe)  --mirror <nowiki>http://qt.mirror.constant.com</nowiki>''


As the example shows, don't use the full path but use the path before '/online' (no forward slash at the end)
As the example shows, don't use the full path but use the path before '/online' (no forward slash at the end)


Available mirrors can be found from <nowiki>https://download.qt.io/online/qtsdkrepository/windows_x86/root/qt/Updates.xml.mirrorlist</nowiki>
Available mirrors can be found from https://download.qt.io/online/qtsdkrepository/windows_x86/root/qt/Updates.xml.mirrorlist

Latest revision as of 09:56, 18 March 2022

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

When starting to install or update, installer lists the components it is about to be install or update. In case you are sure what you are installing and don't want to double check what is about to be installed, you can skip that query with command:

--confirm-command

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

Install will install default set of components if no components are given as parameter. If components are given, then the default set and the given components are installed. If no default set is wanted, then add option

--no-default-installations

. Note that there are forced components, such as QtCreator which will always be installed. Option

--no-force-installations

can be used to not install the forced components but it is not advised to be used. They are forced for a reason and no guarantee how the install will work if that option is used.

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> --confirm-command
maintenancetool(.exe) install qt.qt5.5150.qtcharts qt.qt5.5150.win64_mingw81 --default-answer --accept-licenses --confirm-command

Search

Search searches all components which are available in repositories. It uses regular expression. For example searching all Qt5.13.0 and Qt5.13.1 components:

installer(.exe) or maintenancetool(.exe) search  "(5130|5131)"

The

--filter-packages  <element=regex,...>

option can be used by itself or in conjunction with the search command argument to specify additional filters for the search operation:

installer(.exe) or maintenancetool(.exe) search --filter-packages "DisplayName=Qt 5.15.2"

The filter element can be any package information element, the full list can be found from:

https://doc.qt.io/qtinstallerframework/ifw-component-description.html#package-information-file-syntax

The element is case sensitive. The searchable string is case insensitive (from 4.3.x onwards).

List

List will list all components you have installed:

maintenancetool(.exe) list

Check updates

maintenancetool(.exe) check-updates

Update

Update without parameters will update all components that have an update. Essential components are always updated first, same way as it is done when launching updater from GUI. Alternatively you can give a list of components you want to update:

maintenancetool(.exe) update

or

maintenancetool(.exe) update qt.qt5.5150.qtcharts qt.qt5.5150.win64_mingw81

Remove

Remove uninstalls listed components, their children and other components depending on the uninstalled components.

maintenancetool(.exe) remove qt.qt5.5150.qtcharts qt.qt5.5150.win64_mingw81

Full uninstall

maintenancetool(.exe) purge

Identifiers reference

Message identifiers

The following table lists known identifiers and values used for

--auto-answer

option.

ID Values Default
OperationDoesNotExistError Abort, Ignore Ignore
OverwriteTargetDirectory Yes, No No
stopProcessesForUpdates Retry, Ignore, Cancel Cancel
installationErrorWithCancel Retry, Ignore, Cancel Cancel
installationErrorWithIgnore Retry, Ignore Ignore
AssociateCommonFiletypes Yes, No Yes
telemetry-question Yes, No Yes

File query identifiers

The following table lists known identifiers and values used for --file-query option.

ID Type
PathForSDP7 Directory

Selecting a mirror for opensource

Installer version 4.0.1-1 has new option for selecting a mirror for opensource metadata and downloads. The mirror can be set from terminal using option --mirror.

Examples:

  • installer(.exe) --mirror http://www.nic.funet.fi/pub/mirrors/download.qt-project.org
    
  • installer(.exe) --mirror http://ftp2.nluug.nl/languages/qt
    
  • maintenancetool(.exe)  --mirror http://qt.mirror.constant.com
    

As the example shows, don't use the full path but use the path before '/online' (no forward slash at the end)

Available mirrors can be found from https://download.qt.io/online/qtsdkrepository/windows_x86/root/qt/Updates.xml.mirrorlist