Merge pull request #907 from Kidev/use-official-doc
Some checks failed
Check tox tests / Check packaging 📦 (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
Publish Python 🐍 distributions 📦 to PyPI / Build package (push) Has been cancelled
Test on GH actions environment / test (binary, windows-latest, 3.13, 6.6.3) (push) Has been cancelled
Test on GH actions environment / test (standard, ubuntu-latest, 3.13, 6.5.3) (push) Has been cancelled
Test on GH actions environment / test (standard, ubuntu-latest, 3.13, 6.6.3) (push) Has been cancelled
Test on GH actions environment / test (standard, ubuntu-latest, 3.13, 6.8.0) (push) Has been cancelled
Test on GH actions environment / test (standard, ubuntu-latest, 3.13, 6.8.1) (push) Has been cancelled
Test on GH actions environment / test (standard, windows-latest, 3.13, 6.5.3) (push) Has been cancelled
Test on GH actions environment / test (standard, windows-latest, 3.13, 6.6.3) (push) Has been cancelled
Test on GH actions environment / test (standard, windows-latest, 3.13, 6.7.3) (push) Has been cancelled
Publish Python 🐍 distributions 📦 to PyPI / publish Python 🐍 distributions 📦 to PyPI (push) Has been cancelled

Documentation: Add --use-official-installer, --dry-run, --UNSAFE-ignore-hash, examples
This commit is contained in:
Hiroshi Miura
2025-05-15 13:13:53 +09:00
committed by GitHub
3 changed files with 62 additions and 3 deletions

View File

@@ -48,6 +48,7 @@ list-qt command
--arch (<Qt version> | latest) |
--archives (<Qt version> | latest) architecture [modules...]
--latest-version]
[--use-official-installer [<email> <password>]]
<host> [<target>]
List available versions of Qt, targets, modules, and architectures.
@@ -163,6 +164,21 @@ List available versions of Qt, targets, modules, and architectures.
Print only the newest version available
May be combined with the ``--spec`` flag.
.. option:: --use-official-installer [email password]
Use the official Qt installer instead of the AQT approach. This option simply
forwards your search terms to the official Qt installer.
Will use current OS as ``host`` (but the ``host`` value passed must still be provided and valid).
Will use target as research term, along with eventual arch, using the following regex:
``^.*{re.escape(version_str)}\.{re.escape(target_str)}.*$``.
It will list all the arguments ignored.
If you are already signed in and have a valid ``qtaccount.ini`` for the current
user, you can use this option without parameters. Otherwise, you must provide
an email and password to authenticate.
See :ref:`the official installer section<official>` for more details.
.. _list-src command:
@@ -448,6 +464,14 @@ are described here:
aqt install-* <host> <target> <Qt version> <arch> -m all
.. option:: --UNSAFE-ignore-hash
UNSAFE, use at your own risk.
This disables the hash check of downloaded files from your mirror against the official hashes.
Equivalent to setting ``INSECURE_NOT_FOR_PRODUCTION_ignore_hash: True`` in ``aqt/settings.ini``.
It does not edit the configuration file and only affects the current session. It will print warnings.
Useful if the Qt official mirror is down and you trust a third-party mirror.
.. _install archives flag:
.. option:: --archives <list of archives>
@@ -499,6 +523,8 @@ install-qt command
[--archives <archive> [<archive>...]]
[--autodesktop]
[--noarchives]
[--dry-run]
[--use-official-installer [<email> <password>]]
<host> <target> (<Qt version> | <spec>) [<arch>]
Install Qt library, with specified version and target.
@@ -566,6 +592,22 @@ There are various combinations to accept according to Qt version.
This is advanced option and you should use it with ``--modules`` option.
This allow you to add modules to existent Qt installation.
.. option:: --dry-run
Perform a simulation of the installation process without making any changes.
.. option:: --use-official-installer [email password]
Use the official Qt installer instead of the AQT approach. This option ignores
the ``--host`` parameter and forces installation for the current OS due to Qt
restrictions.
If you are already signed in and have a valid ``qtaccount.ini`` for the current
user, you can use this option without parameters. Otherwise, you must provide
an email and password to authenticate.
See :ref:`the official installer section<official>` for more details.
See `common options`_.
@@ -864,6 +906,20 @@ Example: Install different versions of Qt6 for Web Assembly (WASM)
aqt install-qt all_os wasm 6.8.0 wasm_multithread --autodesktop
Example: Install commercial version 6.5.5 of Qt6 on Windows
.. code-block:: console
aqt install-qt windows desktop 6.5.5 win64_msvc2019_64 --use-official-installer 'email@gmail.com' 'password'
Example: List commercial packages of Android for version 6.8.3 of Qt6 on current OS
.. code-block:: console
aqt list-qt linux android --arch 6.8.3 --use-official-installer 'email@gmail.com' 'password'
Example: List available versions of Qt on Linux
.. code-block:: console

View File

@@ -8,7 +8,9 @@ Installation
Requirements
------------
- Minimum Python version: 3.8.10
- Minimum Python version: 3.9
- Recommended Python version: 3.13
- Dependencies: requests, py7zr, semantic_version, patch, texttable, bs4, defusedxml, humanize

View File

@@ -17,8 +17,9 @@ Official Qt Installer
This file is automatically created when you use the ``MaintenanceTool`` binary and log in using the GUI. It is also created the first time you use the CLI or any mean to authenticate. You can simply copy the file from your PC to the CI server, it will work across platforms. Just treat it as a password. Refer to `this page <https://doc.qt.io/qt-6/get-and-install-qt-cli.html#providing-login-information>`_ for more details.
* It will also check the value of the environment variable ``QT_INSTALLER_JWT_TOKEN`` and use the token if provided.
* If neither are present, you will need to provide ``--email <email> --pw <password>``.
Note that if ``--email`` and ``--pw`` are provided, they will supersede the ``qtaccount.ini`` and the JWT token account.
* If neither are present, you will need to provide ``--email <email> --pw <password>``.
The Qt official installer will generate a ``qtaccount.ini`` file in the relevant folder for your OS (see above for its location) if there is not one already present. That file contains your Qt JSON Web Token (JWT), and must be treated as a password.
Note that if ``--email`` and ``--pw`` are provided, they will supersede the ``qtaccount.ini`` and the JWT provided in the environment.
``install-qt-official``
------------------------