Skip to main content

Another unofficial Qt installer

Project description

Another Qt installer(aqt)

  • Release: pypi

  • Documents: docs

  • Test status: gha

This is a utility alternative to the official graphical Qt installer, for using in CI environment where an interactive UI is not usable such as Github Actions, Travis-CI, CircleCI, Azure-Pipelines, AppVeyor and others.

It can automatically download prebuilt Qt binaries for any target (you’re not bound to Linux binaries on Linux; you could also download iOS binaries). It’s working with Python > 3.5 on Linux, OS X and Windows.

When installing QtBase package on proper platforms (eg. install linux package on linux), aqt update Qt binaries(eg. qmake, and libQt5Core.so/Qt5Core.dll/Freamework.QtCore), and change configurations(qt.conf, and qconfig.pri) to make it working well with installed directory(Qt prefix).

Requirements

  • Minimum Python version: 3.6

  • Recommended Python version: 3.7.5 or later

  • Dependent libraries: requests, py7zr

Install

Same as usual, it can be installed with pip

$ pip install aqtinstall

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 6 or Qt 5.13 and 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 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: Installing Android Qt 5.15.2:

aqt install 5.15.2 linux android android

Example: Install examples, doc and source:

C:\ aqt examples 5.15.0 windows desktop -m qtcharts qtnetworkauth
C:\ aqt doc 5.15.0 windows desktop -m qtcharts qtnetworkauth
C:\ aqt src 5.15.0 windows desktop

Example: Install Web Assembly for Qt5

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: Install Qt6 for android

aqt install -O qt 6.1.0 linux desktop
aqt install -O qt 6.1.0 linux android android_armv7
qt/6.1.0/android_armv7/bin/qmake -query

Example: Show help message

aqt help

Environment Variables

It is users task to set some environment variables to fit your platform such as

export PATH=/path/to/qt/x.x.x/clang_64/bin/:$PATH
export QT_PLUGIN_PATH=/path/to/qt/x.x.x/clang_64/plugins/
export QML_IMPORT_PATH=/path/to/qt/x.x.x/clang_64/qml/
export QML2_IMPORT_PATH=/path/to/qt/x.x.x/clang_64/qml/

aqtinstall never do it for you because not to break multiple installation versions.

Supported CI platforms

There are no limitation for CI platform but currently it is tested on Azure Pipelines and Github actions. If you want to use it with Github actions, install_qt action will help you. If you want to use it with Azure Pipelines, blog article Using Azure DevOps Pipelines with Qt may be informative.

Use cases

Media, slide, articles and discussions

History

This program is originally shown in Kaidan project as a name qli-installer. A project aqtinstall extend the original to run with standard python features with Linux, Mac and Windows, to be tested on CI platform, and to improve performance with a concurrent downloading.

aqtinstall changeLog

All notable changes to this project will be documented in this file.

Current changes

Unreleased

Added

Changed

Fixed

Deprecated

Removed

Security

v1.1.2 (20, Feb. 2021)

Fixed

  • Fix leaked multiprocessing resource(#220)

  • Catch both read timeout and connection timeout.

v1.1.1 (13, Feb. 2021)

Fixed

  • Catch timeout error and fallback to mirror (#215,#217)

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)

v0.11.1 (21, Jan. 2021)

Added

  • Add –timeout option to specify connection timeout (default 5.0 sec) (#197)

v0.11.0 (21, Jan. 2021)

Added

v0.10.1 (11, Dec. 2020)

Added

  • Add LTS versions as known one.(#188)

Changed

  • Tool: Version comparison by startswith. When specified 4.0 but download server hold 4.0.1, it catch 4.0.1.(related #187)

  • README: explicitly show python version requirements.

v0.10.0 (25, Nov. 2020)

Added

  • Add v5.12.2, v6.0.0 as known versions.(#176, #177)

  • Support –archives option on src installation.

Changed

  • Use multiprocessing.Pool instead of concurrent.futures(#178)

  • Refactoring whole modules. (#179)

  • Split old changelogs to CHNAGELOG_prerelease.rst

  • Drop an upper limitation (<0.11) for py7zr.(#183)

Fixed

  • When we used “-m all” to download doc or examples, Qt sources are also downloaded(@Gamso)(#182)

v0.9.8 (4, Nov. 2020)

Added

  • Added new combinations for tools_ifw

Fixed

  • When we start an installation, all packages are downloaded whatever the specified platform.(#159)

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aqtinstall-1.1.2.tar.gz (86.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aqtinstall-1.1.2-py2.py3-none-any.whl (26.2 kB view details)

Uploaded Python 2Python 3

File details

Details for the file aqtinstall-1.1.2.tar.gz.

File metadata

  • Download URL: aqtinstall-1.1.2.tar.gz
  • Upload date:
  • Size: 86.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.2

File hashes

Hashes for aqtinstall-1.1.2.tar.gz
Algorithm Hash digest
SHA256 d925de76a51afa85553548981f1d4860d69ef83c8eb37ec931edc051f65cbb0f
MD5 37c63585eeafba5139366e9cbaf23a8a
BLAKE2b-256 4678f95a4231852dcfbc8fef22da3842fa27bad736fe79400197fc0b1b602991

See more details on using hashes here.

File details

Details for the file aqtinstall-1.1.2-py2.py3-none-any.whl.

File metadata

  • Download URL: aqtinstall-1.1.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 26.2 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.2

File hashes

Hashes for aqtinstall-1.1.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 731051e7cee24fcc62ec33cecfaa31cd28425c7a5fad963867b37c74891056b2
MD5 e1b57001ffdafbd73e95735279225c2b
BLAKE2b-256 a9fb76133cdca332d93ef6c42943420c37fb5a06c1b5003c1b9c07f57b3fb664

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page