aqtinstall manual¶
Contents:
Installation¶
Requirements¶
- Minimum Python version: 3.6
- Recommended Python version: 3.7.5 or later
- Dependent libraries: requests, py7zr
Usage¶
General usage looks like this:
aqt [-h][--help][-O | --outputdir <directory>][-b | --base <mirror url>][-E | --external <7zip command>] \
install <qt-version> <host> <target> [<arch>] [-m all | -m [extra module] [extra module]...] [--internal]
[--archives <archive>[ <archive>...]] [--timeout <timeout(sec)>]
You can also call with python -m aqt
syntax as well as command script aqt
.
- The Qt version is formatted like this: 5.11.3
- Host is one of: linux, mac, windows
- Target is one of: desktop, android, ios (iOS only works with mac host)
- For some platforms you also need to specify an arch:
- For windows, choose one of:
- win64_msvc2019_64, win32_msvc2019,
- win64_msvc2017_64, win32_msvc2017,
- win64_msvc2015_64, win32_msvc2015,
- win64_mingw81, win32_mingw81,
- win64_mingw73, win32_mingw73,
- win64_mingw53, win32_mingw53,
- win64_msvc2019_winrt_x64, win64_msvc2019_winrt_x86, win64_msvc2019_winrt_armv7
- win64_msvc2017_winrt_x64, win64_msvc2017_winrt_x86, win64_msvc2017_winrt_armv7
- For android and Qt 5.13 or below, choose one of: android_x86_64, android_arm64_v8a, android_x86, android_armv7
- You can specify external 7zip command path instead of built-in extractor.
- When specifying all for extra modules option -m all extra modules are installed.
Installing tool and utility (Experimental)¶
You can install tools and utilities using following syntax;
python -m aqt [-h][--help][-O | --outputdir <directory>][-b | --base <mirror url>][-E | --external <7zip command>] \
tool <host> <tool_name> <tool-version> <arch> [--timeout <timeout>]
- tool_name is one of tools_ifw, tools_vcredist, and tools_openssl.
- arch is full qualified tool name such as qt.tools.ifw.31 which values can be seen on Qt archive_site This is a quite experimental feature, may not work and please use it with your understanding of what you are doing.
- It does not recognize ‘installscript.qs’. When using tools which depends on a qt script, you should do something by yourself.
Target directory¶
aqt can take option ‘–outputdir’ or ‘-O’ that specify a target directory.
The Qt packages are installed under current directory as such Qt/<ver>/gcc_64/ If you want to install it in C:Qt as same as standard gui installer default, run such as follows:
C:\> mkdir Qt
C:\> aqt install --outputdir c:\Qt 5.11.3 windows desktop win64_msvc2019_64
Command Line Options¶
The CLI uses argparse to parse the command line options so the short or long versions may be used and the long options may be truncated to the shortest unambiguous abbreviation.
Generic commands¶
-
help
¶
show generic help
-
list
<Qt version> <target OS>
¶ list available variations. positional arguments: qt_version Qt version in the format of “5.X.Y” {linux,mac,windows} host os name {desktop,winrt,android,ios} target sdk
Installation command¶
-
install
<Qt version> <target OS> <target variant> <target architecture>
¶ install Qt library specified version and target. There are various combinations to accept according to Qt version.
-
Qt version
This is a Qt version such as 5.9,7, 5.12.1 etc
-
target OS
linux, windows or mac
-
target variant
desktop, ios or android
-
target architecture
- gcc_64 for linux desktop
- clang_64 for mac desktop
- win64_msvc2019_64, win64_msvc2017_64, win64_msvc2015_64, win32_msvc2015, win32_mingw53 for windows desktop
- android_armv7, android_arm64_v8a, android_x86, android_x86_64 for android
-
--version
,
-v
¶
Display version
-
--help
,
-h
¶
Display help text
-
--outputdir
,
-O
<Output Directory>
¶ specify output directory.
-
--base
,
-b
<base url>
¶ specify mirror site base url such as -b ‘https://mirrors.ocf.berkeley.edu/qt/’ where ‘online’ folder exist.
-
--modules
,
-m
<list of modules>
¶ specify extra modules to install as a list.
-
--archives
<list of archives>
¶ [Advanced] Specify subset of archives to limit installed archives. This is advanced option and not recommended to use for general usage. Main purpose is speed up CI/CD process by limiting installed modules. It can cause broken installation of Qt SDK.
-
--noarchives
¶
[Advanced] Specify not to install all base packages. This is advanced option and you should use with –modules option. This allow you to add modules to existent Qt installation.
Tool installation commands¶
-
src
<Qt version> <target OS> <target variant> [--kde] [--archives <archive>]
¶ install Qt sources specified version and target. by adding –kde option, KDE patch collection is applied for qtbase tree. It is only applied to Qt 5.15.2. When specified version is other than it, command will abort with error when using –kde. You can specify –archives option to install only a specified source such as qtbase.
-
doc
<Qt version> <target OS> <target variant>
¶ install Qt documents specified version and target.
-
examples
<Qt version> <target OS> <target variant>
¶ install Qt examples specified version and target.
-
tool
<target OS> <target tool name> <target tool version> <tool variant name>
¶ install tools specified. tool name may be ‘tools_openssl_x64’, ‘tools_ninja’, ‘tools_ifw’, ‘tools_cmake’ and tool variants name may be ‘qt.tools.openssl.gcc_64’, ‘qt.tools.ninja’, ‘qt.tools.ifw.32’, ‘qt.tools.cmake’. You may need to looking for version number at https://download.qt.io/online/qtsdkrepository/
Command examples¶
Example: Installing Qt SDK 5.12.0 for Linux with QtCharts and QtNetworkAuth:
pip install aqtinstall
sudo aqt install --outputdir /opt 5.12.0 linux desktop -m qtcharts qtnetworkauth
Example: Installing Android (armv7) Qt 5.10.2:
aqt install 5.10.2 linux android android_armv7
Example: Install examples, doc and source:
C:\ aqt examples 5.15.2 windows desktop -m qtcharts qtnetworkauth
C:\ aqt doc 5.15.2 windows desktop -m qtcharts qtnetworkauth
C:\ aqt src 5.15.2 windows desktop --archives qtbase --kde
Example: Install Web Assembly
aqt install 5.15.0 linux desktop wasm_32
Example: Install an Install FrameWork (IFW):
aqt tool linux tools_ifw 4.0 qt.tools.ifw.40
Example: Install vcredist:
C:\ aqt tool windows tools_vcredist 2019-02-13-1 qt.tools.vcredist_msvc2019_x64
C:\ .\Qt\Tools\vcredist\vcredist_msvc2019_x64.exe /norestart /q
Example: Install MinGW on Windows
C:\ aqt tool -O c:\Qt windows tools_mingw 8.1.0-1-202004170606 qt.tools.win64_mingw810w
c:\ set PATH=C:\Qt\Tools\mingw810_64\bin
Example: Show help message
aqt help
Available Qt versions¶
Here is an available combinations of Qt versions and platforms. It is based on contents at https://download.qt.io/ as in January, 2021.
WARNING: Older versions may be removed and new version will be added, because The Qt Foundation maintains the site and aqtinstall just see there. So there is no guarantee for you to be able to install versions listed here.
Desktop¶
Qt SDK for Desktop applications are provided for linux, mac and windows.
Linux¶
Variant | Qt Versions |
---|---|
gcc_64 |
|
wasm_32 |
|
mac¶
Variant | Qt Versions |
---|---|
clang_64 |
|
wasm_32 |
|
windows¶
Variant | Qt Versions |
---|---|
win64_msvc2019_64 |
|
win32_msvc2019 |
|
win64_msvc2017_64 |
|
win32_msvc2017 |
|
win64_msvc2015_64 |
|
win32_msvc2015 |
|
|
|
|
|
win32_mingw53 |
|
wasm_32 |
|
Mobile platforms¶
android¶
android SDK is provided for linux, mac and windows.
Variant | Qt Versions |
---|---|
|
|
|
|
|
|
ios¶
Qt SDK for ios is provided on mac.
Variant | Qt Versions |
---|---|
ios |
|
winrt¶
winrt SDK is provided for windows platform.
Variant | Qt Versions |
---|---|
win64_msvc2019_winrt_x64 |
|
win64_msvc2019_winrt_armv7 |
|
win64_msvc2019_winrt_x86 | 5.15.2 5.15.1 5.15.0 5.14.2 5.14.1 5.14.0 5.13.2 5.13.1 5.13.0 5.12.9 5.12.8 5.12.7 5.12.6 5.12.5 5.12.4 5.12.3 5.12.2 5.12.1 5.12.0 |
win64_msvc2017_winrt_armv7 | 5.14.2 5.14.1 5.14.0 5.13.2 5.13.1 5.13.0 5.12.9 5.12.8 5.12.7 5.12.6 5.12.5 5.12.4 5.12.3 5.12.2 5.12.1 5.12.0 |
win64_msvc2017_winrt_x64 | 5.14.2 5.14.1 5.14.0 5.13.2 5.13.1 5.13.0 5.12.9 5.12.8 5.12.7 5.12.6 5.12.5 5.12.4 5.12.3 5.12.2 5.12.1 5.12.0 |
win64_msvc2017_winrt_x86 | 5.14.2 5.14.1 5.14.0 5.13.2 5.13.1 5.13.0 5.12.9 5.12.8 5.12.7 5.12.6 5.12.5 5.12.4 5.12.3 5.12.2 5.12.1 5.12.0 |
win64_msvc2015_winrt_armv7 | 5.15.2 5.15.1 5.15.0 5.14.2 5.14.1 5.14.0 5.13.2 5.13.1 5.13.0 5.12.9 5.12.8 5.12.7 5.12.6 5.12.5 5.12.4 5.12.3 5.12.2 5.12.1 5.12.0 5.11.2 5.11.1 5.11.0 5.10.1 5.10.0 5.9.9 5.9.8 5.9.7 5.9.6 5.9.5 |
win64_msvc2015_winrt_x64 | 5.14.2 5.14.1 5.14.0 5.13.2 5.13.1 5.13.0 5.12.9 5.12.8 5.12.7 5.12.6 5.12.5 5.12.4 5.12.3 5.12.2 5.12.1 5.12.0 |
win64_msvc2015_winrt_x86 | 5.11.2 5.11.1 5.11.0 5.10.1 5.10.0 5.9.9 5.9.8 5.9.7 5.9.6 5.9.5 |
Configuration¶
aqtinstall
can be configured through a configuration file.
A default configuration is stored in aqt/settings.ini
file.
You can specify custom configuration file through AQT_CONFIG
environment variable or “-c” or “–config” command line option.
A file is like as follows:
Settings¶
An [aqt]
section is a configuration for basic behavior.
- concurrency:
concurrency
is a setting how many download concurrently starts. It should be a integer value.- connection_timeout:
connection_timeout
is a timeout in second for connection. It is passed torequests
library.- response_timeout:
response_timeout
is a timeout in second how much time waiting for response. It is passed torequests
library.- baseurl:
baseurl
is a URL of Qt download site. When you have your own Qt download site repository, you can set it here. It is as same as--base
option.- 7zcmd:
- It is a command name of 7-zip. When
aqtinstall
is installed without recommended librarypy7zr
, it is used to extract archive instead ofpy7zr
library. When--external
option specified, a value is override with option’s one.
A [mirrors]
section is a configuration for mirror handling.
- blacklist:
- It is a list of URL where is a problematic mirror site. Some mirror sites ignore a connection from IP addresses out of their preffered one. It will cause connection error or connection timeout. There are some known mirror sites in default. When you are happy with the default sites, you can override with your custom settings.
- fallbacks:
- It is a list of URL where is a good for access. When mirror site cause an error, aqt use fallbacks when possible.
aqtinstall changeLog¶
All notable changes to this project will be documented in this file.
v1.2.2 (1, Jul. 2021)¶
Added¶
- Create qtenv2.bat file on windows(#279)
Fixed¶
- Fix list subcommand to retrieve information from web(#280)
- Fix crash when installing Qt6.2.0 on mac(#288,#289)
v1.2.0 (21, Jun. 2021)¶
Added¶
- Add -c/–config option to specify custom settings.ini(#246)
- Document for settings.ini configuration parameters(#246)
- Patching libtool file(.la) on mac(#267)
- CI: Add more blacklist mirrors
- Add –kde option for src subommand(#274)
Changed¶
- Use spawn multiprocessing on Linux platform.(#273)
- Check MD5 checksum when download(#238)
- Config settings.ini parser and URL list format(#246)
- Refactoring network connection code, consolidated to helper.py(#244)
- Refactoring exceptions, introduce exceptions.py(#244)
- Update known Qt versions combinations.(#243)
- CI: changes azure pipelines test scripts(#250)
Fixed¶
- Fix logging during subprocess installation on macOS, and Windows(#273)
- Fix patching qmake(#259)
- Prettify help message format(#237)
- Update patching pkgconfig/lib on mac(#267)
- CI: fix check workflow(#248)
- CI: fix error on Azure/Windows(connection error)(#246)
v1.1.5 (8, Apr. 2021)¶
Added¶
- README: describe advanced installation method.
Changed¶
- Change tox.ini: docs test output folder
- Remove changelog from pypi page
Fixed¶
- Drop dependency for wheel
v1.1.4 (2, Apr. 2021)¶
Changed¶
- Code reformatting by black and check by black.
- Check linting by github actions.
Fixed¶
- Fix document error on README(#228, #226).
v1.1.2 (20, Feb. 2021)¶
Fixed¶
- Fix leaked multiprocessing resource(#220)
- Catch both read timeout and connection timeout.
v1.1.0 (12, Feb. 2021)¶
Added¶
- Patching android installation for Qt6 - patch target_qt.conf
Changed¶
- CI test with Qt6
- Docs: update avaiable conbinations
Fixed¶
- Skip QtCore patching for 5.14.0 and later(Fix regression)(#211)
v1.0.0 (4, Feb. 2021)¶
Added¶
- Add –noarchives option to allow user to add modules to existed installation(#174,#204)
- No patching when it does not install qtbase package by –noarchives and –archives option.(#204)
- Azure: test with jom build on windows.
- Patch pkgconfig configurations(#199)
- Patch libQt5Core and libQt6Core for linux(#201)
Changed¶
- Update document to show available Qt versions
- Update README to add more references.
- Suppress debug log and exist silently when specified package not found.
Fixed¶
- Catch exception on qmake -query execution(#201)
- Fix Qt6/Android installation handling.(#193, #200)
Contribution guide¶
This is contribution guide for aqtinstall project. You are welcome to send a Pull-Request, reporting bugs and ask questions.
Resources¶
- Project owner: Hiroshi Miura
- Bug Tracker: Github issue Tracker
- Status: Beta
- Activity: moderate
Bug triage¶
Every report to github issue tracker should be in triage. whether it is bug, question or invalid.
Send patch¶
Here is small amount rule when you want to send patch the project;
- every proposal for modification should send as ‘Pull Request’
- each pull request can consist of multiple commits.
- you are encourage to split modifications to individual commits that are logical subpart.
CI tests¶
The project configured to use Azure Pipelines, Github actions and Coveralls for regression test. You can see test results on badge and see details in a web page linked from badge.
Authors¶
Aqtinstall is written and maintained by Hiroshi Miura <miurahr@linux.com>
Original qli-installer is written by Linus Jahn
Contributors, listed alphabetically, are:
- Andrei Yankovich (tools ifw installation)
- Aurélien Gâteau (patching to qmake)
- Benjamin O (Github Actions and more)
- David Dalcino (Improve tests and fix patching to qmake)
- Felix Barz (Android, Explicit extra module installation)
- Gamso (improve parsing of update.xml)
- Kyle Altendorf (7z binary path search)
- Martin Delille (Document)
- Mizux Seihax (Qt versions)
- Nelson Chen (CI tests)
- @pylipp (Document)
- Sztergbaum Roman
- Thomas Grainger (CLI entry point)
- @tsteven4 (fix patching to qmake)
- Vadim Peretokin (Version database)
- @ypnos (Document)
and many other participants and contributors.