Coder Social home page Coder Social logo

mite-qtinstall's Introduction

Python scripts to download Qt libraries from download.qt.io and its mirrors.

There are 2 problems with the existing Qt installers:

  1. There is no out-of-the-box tool to download Qt libraries when https://download.qt.io is unavailable.
  2. Only https://download.qt.io provides SHA256 hashes. Even if the first problem is solved, there is no way to verify the downloaded archives.

The scripts are a workaround for those problems:
When https://download.qt.io is available, get_data.py can be used to get the mirror list, the link list and SHA256 hashes for the required Qt versions. Then, obtained .json files can be stored somewhere for future use.
With obtained .json files, qti.py can be used to download and verify the hashes of the archives from Qt mirrors even when https://download.qt.io is unavailable.

Requirements

  1. python 3.9+
  2. 7z

The scripts were tested on Linux only.

Usage

Fetch info

Fetch the mirror list, the archive list and the hashes.
https://download.qt.io must be available at this point.
This repository includes the info obtained at 8 June 2022.


Fetch the mirror list and save it to data/mirrors.json.

$ ./get_data.py -m mirrors

Fetch available versions and save them to data/versions.json.

$ ./get_data.py -m versions

Print data from data/versions.json to figure out the name of the needed version.
For example, if the user needs Windows desktop 5.15.2:

$ ./get_data.py
windows_x86
linux_x64
mac_x64
$ ./get_data.py -q windows_x86
winrt
android
desktop
$ ./get_data.py -q windows_x86 desktop
...
qt5_51210
qt5_5152_wasm
qt5_5152
qt5_5151_wasm
qt5_5151
...

Fetch the list of links and SHA256 hashes for the required version and save them to data/<OS>/<platform>/<qt-version>.json, e.g. data/windows_x86/desktop/qt5_5152.json.

$ ./get_data.py -m hashes -q windows_x86 desktop qt5_5152

Fetch lists of links and SHA256 hashes for all OSs, platforms, versions and save them to data/<OS>/<platform>/<qt-version>.json files.
This takes a while, around 20 minutes with 100 processes, 7-10 minutes with 400 processes (default).

$ ./get_data.py -m hashes

Download

Download and unpack archives from https://download.qt.io and its mirrors.
Requires .json files from the previous step.
Should work as long as at least one mirror from data/mirrors.json is available.


Print available archives to figure out the names of the needed archives.
For example, if the user needs Windows desktop 5.15.2 MSVC2019 x64 Qt Charts archive:

$ ./qti.py
linux_x64
mac_x64
windows_x86
$ ./qti.py -q windows_x86
android
desktop
winrt
$ ./qti.py -q windows_x86 desktop
...
qt5_5151
qt5_5151_wasm
qt5_5152
qt5_5152_wasm
qt5_59
...
$ ./qti.py -q windows_x86 desktop qt5_5152
...
win64_mingw81
win64_msvc2015_64
win64_msvc2019_64
$ ./qti.py -q windows_x86 desktop qt5_5152 win64_msvc2019_64
...
qtbase
qtcharts
qtconnectivity
...

Download Qt Charts archive to archives and unpack it to out.

$ ./qti.py -m download -q windows_x86 desktop qt5_5152 win64_msvc2019_64 -a qtcharts

Download all archives for the selected version/arch to archives and unpack them to out.

$ ./qti.py -m download -q windows_x86 desktop qt5_5152 win64_msvc2019_64 -a all

Notes

If an archive is already found in archives directory, and the hash matches, it's not redownloaded.

In case of a hash mismatch after a successful download, the script will exit with an error.

There is no dependency resolution.

The scripts can handle only libraries and debug info for those libraries. There is no support to download tools, source code, etc.

Inspired by

https://github.com/miurahr/aqtinstall

https://github.com/WillBrennan/yaqti

mite-qtinstall's People

Contributors

mite-user avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.