├── docs ├── devguide.rst ├── changes.rst ├── authors.rst ├── index.rst ├── cli.rst ├── make.bat ├── Makefile └── conf.py ├── requirements.txt ├── .gitignore ├── setup.cfg ├── bin └── aqt ├── tests ├── hello.pro ├── main.cpp └── accelbubble │ ├── qtquickcontrols2.conf │ ├── qml.qrc │ ├── Bluebubble.svg │ ├── accelbubble.pro │ ├── Bubble.qml │ ├── Page2Form.ui.qml │ ├── main.cpp │ ├── Page1Form.ui.qml │ └── main.qml ├── AUTHORS ├── .travis.yml ├── CONTRIBUTE.rst ├── LICENSE ├── aqt ├── __init__.py ├── __main__.py ├── archives.py ├── cli.py └── installer.py ├── setup.py ├── azure-pipelines.yml ├── ci ├── generate_azure_pipelines_matrices.py └── steps.yml ├── CHANGELOG.rst └── README.rst /docs/devguide.rst: -------------------------------------------------------------------------------- 1 | .. include:: ../CONTRIBUTE.rst 2 | -------------------------------------------------------------------------------- /docs/changes.rst: -------------------------------------------------------------------------------- 1 | :tocdepth: 2 2 | 3 | .. default-role:: any 4 | 5 | .. _changes: 6 | 7 | .. include:: ../CHANGELOG.rst 8 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | six 2 | requests 3 | pytest 4 | pytest-pep8 5 | pytest-cov 6 | flake8 7 | ruamel.yaml==0.15.94 8 | wheel 9 | twine 10 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | dist 3 | venv 4 | *.pyc 5 | *.egg-info 6 | __pycache__ 7 | .idea 8 | .tox 9 | .venv 10 | _build 11 | ci/*.matrix.gen.yml -------------------------------------------------------------------------------- /docs/authors.rst: -------------------------------------------------------------------------------- 1 | :tocdepth: 2 2 | 3 | .. _authors: 4 | 5 | aqtinstall authors 6 | ================ 7 | 8 | .. include:: ../AUTHORS 9 | 10 | -------------------------------------------------------------------------------- /setup.cfg: -------------------------------------------------------------------------------- 1 | [flake8] 2 | max-line-length = 125 3 | exclude = .git,__pycache__,docs/conf.py,build,dist,tmp,venv 4 | 5 | [bdist_wheel] 6 | universal=1 7 | -------------------------------------------------------------------------------- /bin/aqt: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import sys 4 | 5 | from aqt import main 6 | 7 | 8 | if __name__ == '__main__': 9 | sys.exit(main()) 10 | -------------------------------------------------------------------------------- /tests/hello.pro: -------------------------------------------------------------------------------- 1 | QT += core gui 2 | 3 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets 4 | 5 | TARGET = Hello 6 | TEMPLATE = app 7 | 8 | SOURCES += main.cpp 9 | 10 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | Aqtinstall is written and maintained by Hiroshi Miura 2 | 3 | Original qli-installer is written by Linus Jahn 4 | 5 | Contributors, listed alphabetically, are: 6 | 7 | * Nelson Chen (CI tests) 8 | 9 | -------------------------------------------------------------------------------- /tests/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(int argc, char **argv) 5 | { 6 | QApplication app (argc, argv); 7 | 8 | QPushButton button ("Hello world !"); 9 | button.show(); 10 | 11 | return app.exec(); 12 | } -------------------------------------------------------------------------------- /tests/accelbubble/qtquickcontrols2.conf: -------------------------------------------------------------------------------- 1 | ; This file can be edited to change the style of the application 2 | ; Read "Qt Quick Controls 2 Configuration File" for details: 3 | ; http://doc.qt.io/qt-5/qtquickcontrols2-configuration.html 4 | 5 | [Controls] 6 | Style=Default 7 | -------------------------------------------------------------------------------- /tests/accelbubble/qml.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | Page1Form.ui.qml 4 | Page2Form.ui.qml 5 | qtquickcontrols2.conf 6 | Bubble.qml 7 | Bluebubble.svg 8 | main.qml 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/index.rst: -------------------------------------------------------------------------------- 1 | Welcome to aqtinstall's documentation! 2 | ====================================== 3 | 4 | Contents: 5 | 6 | .. toctree:: 7 | :maxdepth: 2 8 | 9 | cli 10 | changes 11 | devguide 12 | authors 13 | 14 | Indices and tables 15 | ================== 16 | 17 | * :ref:`genindex` 18 | * :ref:`modindex` 19 | * :ref:`search` 20 | 21 | -------------------------------------------------------------------------------- /tests/accelbubble/Bluebubble.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: python 2 | python: 3.6 3 | 4 | install: 5 | - pip install wheel flake8 requests six 6 | 7 | script: 8 | - flake8 aqt bin 9 | - python -m aqt --help 10 | 11 | deploy: 12 | - provider: pypi 13 | user: miurahr 14 | password: 15 | secure: svKgwkUa3b/+zu99QDhuJUDgjoDY7Pd5hE5cGAkfil98xnq+CM5R5kLPaM7GIfh/jdUR5R4S/QH0A7baEmyoOHfVtP99UkmzsIoSUOYopsgROP6CG34FZUoQ/nknpcTw5xBDzm1Bnu3bBOtU+Avq6B2mAHqu0GFmgxOiZc9+4DECY/+dG/hTXFZb1fvWBWjCdg1LgqQomsgpDixUPAxeBkSsIbpkwrdSWAQWQ+SR7bpkv4yImJkX3hs+jEtmH0j7rYvVNzr72+WFAafKEigASxTVeFdph/hsnT69Bni2KMt5x0I3PXZ39Xx1qlyb04TxYK7rH8gg21ZMwXjA8XsjOy2NKcULub2scGKF7jM0v3EG5E6myNmYm0LFaIIQn6UjKebxADk481dx6y0hIDIJFVDyTIe3g6UkTZjW2skg5GouaIwM6bcX9DTdFQYvlby6CACFC6lte6wdlBKlVIihkimpilXw4zVibHjx0rmExstytzLw0O4NsMk2JIqQ34r5iwv1j27wuuQ9sbLPZpswTjp4PNbFgUozfink2sKldkRtY//Uzs74/t4tafnVb2UvS76fCzivzK25/0PVNQfvB8kbAUnjr2YXfDgpPfgSq4dei8X2VRaH7qM8aM/9lfaEnSQXLCryDB+jAnI4l8d4YyQmDvNClVgk1Svim2KBZao= 16 | skip_existing: true 17 | distributions: sdist bdist_wheel 18 | on: 19 | repo: miurahr/aqtinstall 20 | tags: true 21 | -------------------------------------------------------------------------------- /CONTRIBUTE.rst: -------------------------------------------------------------------------------- 1 | ================== 2 | Contribution guide 3 | ================== 4 | 5 | This is contribution guide for aqtinstall project. 6 | You are welcome to send a Pull-Request, reporting bugs and ask questions. 7 | 8 | Resources 9 | ========= 10 | 11 | - Project owner: Hiroshi Miura 12 | - Bug Tracker: Github issue `Tracker`_ 13 | - Status: alpha 14 | - Activity: high 15 | 16 | .. _`Tracker`: https://github.com/miurahr/aqtinstall/issues 17 | 18 | Bug triage 19 | ========== 20 | 21 | Every report to github issue tracker should be in triage. 22 | whether it is bug, question or invalid. 23 | 24 | 25 | Send patch 26 | ========== 27 | 28 | Here is small amount rule when you want to send patch the project; 29 | 30 | 1. every proposal for modification should send as 'Pull Request' 31 | 32 | 1. each pull request can consist of multiple commits. 33 | 34 | 1. you are encourage to split modifications to individual commits that are logical subpart. 35 | 36 | CI tests 37 | ========= 38 | 39 | The project configured to use Azure Pipelines, Travis-CI and CoverAlls for regression test. 40 | You can see test results on badge and see details in a web page linked from badge. 41 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (C) 2018 Linus Jahn 4 | Copyright (C) 2019 Hirshi Miura 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all 14 | copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | SOFTWARE. 23 | 24 | -------------------------------------------------------------------------------- /aqt/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # 3 | # Copyright (C) 2018 Linus Jahn 4 | # Copyright (C) 2019 Hiroshi Miura 5 | # 6 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | # this software and associated documentation files (the "Software"), to deal in 8 | # the Software without restriction, including without limitation the rights to 9 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | # the Software, and to permit persons to whom the Software is furnished to do so, 11 | # subject to the following conditions: 12 | # 13 | # The above copyright notice and this permission notice shall be included in all 14 | # copies or substantial portions of the Software. 15 | # 16 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | from aqt.cli import Cli 24 | 25 | 26 | def main(): 27 | cli = Cli() 28 | return cli.run() 29 | -------------------------------------------------------------------------------- /aqt/__main__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # 3 | # Copyright (C) 2018 Linus Jahn 4 | # Copyright (C) 2019 Hiroshi Miura 5 | # 6 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | # this software and associated documentation files (the "Software"), to deal in 8 | # the Software without restriction, including without limitation the rights to 9 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | # the Software, and to permit persons to whom the Software is furnished to do so, 11 | # subject to the following conditions: 12 | # 13 | # The above copyright notice and this permission notice shall be included in all 14 | # copies or substantial portions of the Software. 15 | # 16 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | import sys 24 | 25 | from . import main 26 | 27 | if __name__ == "__main__": 28 | sys.exit(main()) 29 | -------------------------------------------------------------------------------- /tests/accelbubble/accelbubble.pro: -------------------------------------------------------------------------------- 1 | QT += quick sensors svg xml 2 | 3 | CONFIG += c++11 4 | 5 | # The following define makes your compiler emit warnings if you use 6 | # any feature of Qt which as been marked deprecated (the exact warnings 7 | # depend on your compiler). Please consult the documentation of the 8 | # deprecated API in order to know how to port your code away from it. 9 | DEFINES += QT_DEPRECATED_WARNINGS 10 | 11 | # You can also make your code fail to compile if you use deprecated APIs. 12 | # In order to do so, uncomment the following line. 13 | # You can also select to disable deprecated APIs only up to a certain version of Qt. 14 | #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 15 | 16 | SOURCES += main.cpp 17 | 18 | RESOURCES += qml.qrc 19 | 20 | # Additional import path used to resolve QML modules in Qt Creator's code model 21 | QML_IMPORT_PATH = 22 | 23 | # Additional import path used to resolve QML modules just for Qt Quick Designer 24 | QML_DESIGNER_IMPORT_PATH = 25 | 26 | # Default rules for deployment. 27 | qnx: target.path = /tmp/$${TARGET}/bin 28 | else: unix:!android: target.path = /opt/$${TARGET}/bin 29 | !isEmpty(target.path): INSTALLS += target 30 | 31 | ios { 32 | QTPLUGIN += qsvg qsvgicon qtsensors_ios 33 | QMAKE_INFO_PLIST = Info.plist 34 | } 35 | 36 | DISTFILES += \ 37 | Bluebubble.svg 38 | -------------------------------------------------------------------------------- /docs/cli.rst: -------------------------------------------------------------------------------- 1 | .. _string-options-ref: 2 | 3 | ********************* 4 | Command Line Options 5 | ********************* 6 | 7 | The CLI uses argparse to parse the command line options so the short or long versions may be used and the 8 | long options may be truncated to the shortest unambiguous abbreviation. 9 | 10 | .. program:: aqt 11 | 12 | .. option:: list 13 | 14 | list available versions (not implemented yet) 15 | 16 | .. option:: help 17 | 18 | show generic help 19 | 20 | .. option:: install 21 | 22 | install Qt library specified version and target. 23 | 24 | .. describe:: Qt version 25 | 26 | This is a Qt version such as 5.9,7, 5.12.1 etc 27 | 28 | .. describe:: target OS 29 | 30 | linux, windows or mac 31 | 32 | .. describe:: target variant 33 | 34 | desktop or android 35 | 36 | .. describe:: target environment 37 | 38 | * gcc_64 for linux desktop 39 | 40 | * clang_64 for mac desktip 41 | 42 | * win64_msvc2017_64, win64_msvc2015_64, in32_msvc2015, win32_mingw53 for windows desktop 43 | 44 | * android_x86, android_armv7 for android 45 | 46 | .. option:: --version, -v 47 | 48 | Display version 49 | 50 | .. option:: --help, -h 51 | 52 | Display help text 53 | 54 | .. option:: --outputdir, -O 55 | 56 | specify output directory. 57 | 58 | .. option:: --base, -b 59 | 60 | specify mirror site base url such as -b 'http://mirrors.ocf.berkeley.edu/qt/' 61 | where 'online' folder exist. 62 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import io 4 | import os 5 | 6 | from setuptools import setup 7 | 8 | 9 | def readme(): 10 | with io.open(os.path.join(os.path.dirname(__file__), 'README.rst'), mode="r", encoding="UTF-8") as readmef: 11 | return readmef.read() 12 | 13 | 14 | setup(name='aqtinstall', 15 | version='0.4.1', 16 | description='Another unofficial Qt installer', 17 | url='http://github.com/miurahr/aqtinstall', 18 | license='MIT', 19 | long_description=readme(), 20 | author='Hioshi Miura', 21 | author_email='miurahr@linux.com', 22 | packages=["aqt"], 23 | install_requires=['requests', 'six'], 24 | extras_require={ 25 | 'dev': [ 26 | 'pytest', 27 | 'pytest-pep8', 28 | 'pytest-cov', 29 | 'flake8' 30 | ] 31 | }, 32 | scripts=["bin/aqt"], 33 | classifiers=[ 34 | 'Development Status :: 3 - Alpha', 35 | 'Environment :: Console', 36 | 'Environment :: X11 Applications :: Qt', 37 | 'Intended Audience :: Developers', 38 | 'License :: OSI Approved :: MIT License', 39 | 'Operating System :: MacOS :: MacOS X', 40 | 'Operating System :: Microsoft :: Windows', 41 | 'Operating System :: POSIX', 42 | 'Programming Language :: Python', 43 | 'Programming Language :: C++', 44 | 'Topic :: Software Development', 45 | 'Topic :: Software Development :: Libraries', 46 | ], 47 | ) 48 | -------------------------------------------------------------------------------- /azure-pipelines.yml: -------------------------------------------------------------------------------- 1 | jobs: 2 | - job: MatricesGenerator 3 | displayName: Matrices Generator 4 | pool: 5 | vmImage: 'ubuntu-16.04' 6 | steps: 7 | - task: UsePythonVersion@0 8 | inputs: 9 | versionSpec: '3.7' 10 | addToPath: true 11 | - bash: python ci/generate_azure_pipelines_matrices.py 12 | name: mtrx 13 | displayName: Generate test matrices and set variables in Azure Pipelines 14 | 15 | - job: Mac 16 | dependsOn: MatricesGenerator 17 | pool: 18 | vmImage: 'macOS-10.14' 19 | strategy: 20 | matrix: $[ dependencies.MatricesGenerator.outputs['mtrx.mac'] ] 21 | steps: 22 | - script: brew install p7zip 23 | displayName: Install 7zip 24 | - template: ci/steps.yml 25 | 26 | - job: Windows 27 | dependsOn: MatricesGenerator 28 | pool: 29 | vmImage: 'vs2017-win2016' 30 | strategy: 31 | matrix: $[ dependencies.MatricesGenerator.outputs['mtrx.windows'] ] 32 | steps: 33 | - template: ci/steps.yml 34 | 35 | - job: Linux 36 | dependsOn: MatricesGenerator 37 | pool: 38 | vmImage: 'ubuntu-16.04' 39 | strategy: 40 | matrix: $[ dependencies.MatricesGenerator.outputs['mtrx.linux'] ] 41 | steps: 42 | - template: ci/steps.yml 43 | 44 | - job: LinuxSpecificMirror 45 | displayName: Linux (Specific Mirror) 46 | variables: 47 | PYTHON_VERSION: '3.7' 48 | QT_VERSION: 5.13.0 49 | HOST: linux 50 | TARGET: android 51 | ARCH: android_armv7 52 | ARCHDIR: android_armv7 53 | QT_BASE_MIRROR: http://mirrors.ocf.berkeley.edu/qt/ 54 | pool: 55 | vmImage: 'ubuntu-16.04' 56 | steps: 57 | - template: ci/steps.yml 58 | -------------------------------------------------------------------------------- /tests/accelbubble/Bubble.qml: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2017 The Qt Company Ltd. 4 | ** Contact: https://www.qt.io/licensing/ 5 | ** 6 | ** This file is part of Qt Creator 7 | ** 8 | ** $QT_BEGIN_LICENSE:BSD$ 9 | ** Commercial License Usage 10 | ** Licensees holding valid commercial Qt licenses may use this file in 11 | ** accordance with the commercial license agreement provided with the 12 | ** Software or, alternatively, in accordance with the terms contained in 13 | ** a written agreement between you and The Qt Company. For licensing terms 14 | ** and conditions see https://www.qt.io/terms-conditions. For further 15 | ** information use the contact form at https://www.qt.io/contact-us. 16 | ** 17 | ** BSD License Usage 18 | ** Alternatively, you may use this file under the terms of the BSD license 19 | ** as follows: 20 | ** 21 | ** "Redistribution and use in source and binary forms, with or without 22 | ** modification, are permitted provided that the following conditions are 23 | ** met: 24 | ** * Redistributions of source code must retain the above copyright 25 | ** notice, this list of conditions and the following disclaimer. 26 | ** * Redistributions in binary form must reproduce the above copyright 27 | ** notice, this list of conditions and the following disclaimer in 28 | ** the documentation and/or other materials provided with the 29 | ** distribution. 30 | ** * Neither the name of The Qt Company Ltd nor the names of its 31 | ** contributors may be used to endorse or promote products derived 32 | ** from this software without specific prior written permission. 33 | ** 34 | ** 35 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 36 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 37 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 38 | ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 39 | ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 40 | ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 41 | ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 42 | ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 43 | ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 44 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 45 | ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." 46 | ** 47 | ** $QT_END_LICENSE$ 48 | ** 49 | ****************************************************************************/ 50 | 51 | import QtQuick 2.9 52 | import QtQuick.Controls 2.2 53 | 54 | Image { 55 | source: "Bluebubble.svg" 56 | smooth: true 57 | property real centerX 58 | property real centerY 59 | property real bubbleCenter 60 | } 61 | -------------------------------------------------------------------------------- /tests/accelbubble/Page2Form.ui.qml: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2017 The Qt Company Ltd. 4 | ** Contact: https://www.qt.io/licensing/ 5 | ** 6 | ** This file is part of Qt Creator 7 | ** 8 | ** $QT_BEGIN_LICENSE:BSD$ 9 | ** Commercial License Usage 10 | ** Licensees holding valid commercial Qt licenses may use this file in 11 | ** accordance with the commercial license agreement provided with the 12 | ** Software or, alternatively, in accordance with the terms contained in 13 | ** a written agreement between you and The Qt Company. For licensing terms 14 | ** and conditions see https://www.qt.io/terms-conditions. For further 15 | ** information use the contact form at https://www.qt.io/contact-us. 16 | ** 17 | ** BSD License Usage 18 | ** Alternatively, you may use this file under the terms of the BSD license 19 | ** as follows: 20 | ** 21 | ** "Redistribution and use in source and binary forms, with or without 22 | ** modification, are permitted provided that the following conditions are 23 | ** met: 24 | ** * Redistributions of source code must retain the above copyright 25 | ** notice, this list of conditions and the following disclaimer. 26 | ** * Redistributions in binary form must reproduce the above copyright 27 | ** notice, this list of conditions and the following disclaimer in 28 | ** the documentation and/or other materials provided with the 29 | ** distribution. 30 | ** * Neither the name of The Qt Company Ltd nor the names of its 31 | ** contributors may be used to endorse or promote products derived 32 | ** from this software without specific prior written permission. 33 | ** 34 | ** 35 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 36 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 37 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 38 | ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 39 | ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 40 | ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 41 | ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 42 | ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 43 | ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 44 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 45 | ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." 46 | ** 47 | ** $QT_END_LICENSE$ 48 | ** 49 | ****************************************************************************/ 50 | import QtQuick 2.9 51 | import QtQuick.Controls 2.2 52 | 53 | Page { 54 | width: 600 55 | height: 400 56 | 57 | header: Label { 58 | text: qsTr("Page 2") 59 | font.pixelSize: Qt.application.font.pixelSize * 2 60 | padding: 10 61 | } 62 | 63 | Label { 64 | text: qsTr("You are on Page 2.") 65 | anchors.centerIn: parent 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /tests/accelbubble/main.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2017 The Qt Company Ltd. 4 | ** Contact: https://www.qt.io/licensing/ 5 | ** 6 | ** This file is part of Qt Creator 7 | ** 8 | ** $QT_BEGIN_LICENSE:BSD$ 9 | ** Commercial License Usage 10 | ** Licensees holding valid commercial Qt licenses may use this file in 11 | ** accordance with the commercial license agreement provided with the 12 | ** Software or, alternatively, in accordance with the terms contained in 13 | ** a written agreement between you and The Qt Company. For licensing terms 14 | ** and conditions see https://www.qt.io/terms-conditions. For further 15 | ** information use the contact form at https://www.qt.io/contact-us. 16 | ** 17 | ** BSD License Usage 18 | ** Alternatively, you may use this file under the terms of the BSD license 19 | ** as follows: 20 | ** 21 | ** "Redistribution and use in source and binary forms, with or without 22 | ** modification, are permitted provided that the following conditions are 23 | ** met: 24 | ** * Redistributions of source code must retain the above copyright 25 | ** notice, this list of conditions and the following disclaimer. 26 | ** * Redistributions in binary form must reproduce the above copyright 27 | ** notice, this list of conditions and the following disclaimer in 28 | ** the documentation and/or other materials provided with the 29 | ** distribution. 30 | ** * Neither the name of The Qt Company Ltd nor the names of its 31 | ** contributors may be used to endorse or promote products derived 32 | ** from this software without specific prior written permission. 33 | ** 34 | ** 35 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 36 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 37 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 38 | ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 39 | ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 40 | ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 41 | ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 42 | ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 43 | ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 44 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 45 | ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." 46 | ** 47 | ** $QT_END_LICENSE$ 48 | ** 49 | ****************************************************************************/ 50 | 51 | #include 52 | #include 53 | 54 | int main(int argc, char *argv[]) 55 | { 56 | QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); 57 | 58 | QGuiApplication app(argc, argv); 59 | 60 | QQmlApplicationEngine engine; 61 | engine.load(QUrl(QStringLiteral("qrc:/main.qml"))); 62 | if (engine.rootObjects().isEmpty()) 63 | return -1; 64 | 65 | return app.exec(); 66 | } 67 | -------------------------------------------------------------------------------- /tests/accelbubble/Page1Form.ui.qml: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2017 The Qt Company Ltd. 4 | ** Contact: https://www.qt.io/licensing/ 5 | ** 6 | ** This file is part of Qt Creator 7 | ** 8 | ** $QT_BEGIN_LICENSE:BSD$ 9 | ** Commercial License Usage 10 | ** Licensees holding valid commercial Qt licenses may use this file in 11 | ** accordance with the commercial license agreement provided with the 12 | ** Software or, alternatively, in accordance with the terms contained in 13 | ** a written agreement between you and The Qt Company. For licensing terms 14 | ** and conditions see https://www.qt.io/terms-conditions. For further 15 | ** information use the contact form at https://www.qt.io/contact-us. 16 | ** 17 | ** BSD License Usage 18 | ** Alternatively, you may use this file under the terms of the BSD license 19 | ** as follows: 20 | ** 21 | ** "Redistribution and use in source and binary forms, with or without 22 | ** modification, are permitted provided that the following conditions are 23 | ** met: 24 | ** * Redistributions of source code must retain the above copyright 25 | ** notice, this list of conditions and the following disclaimer. 26 | ** * Redistributions in binary form must reproduce the above copyright 27 | ** notice, this list of conditions and the following disclaimer in 28 | ** the documentation and/or other materials provided with the 29 | ** distribution. 30 | ** * Neither the name of The Qt Company Ltd nor the names of its 31 | ** contributors may be used to endorse or promote products derived 32 | ** from this software without specific prior written permission. 33 | ** 34 | ** 35 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 36 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 37 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 38 | ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 39 | ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 40 | ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 41 | ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 42 | ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 43 | ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 44 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 45 | ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." 46 | ** 47 | ** $QT_END_LICENSE$ 48 | ** 49 | ****************************************************************************/ 50 | import QtQuick 2.9 51 | import QtQuick.Controls 2.2 52 | 53 | Page { 54 | width: 600 55 | height: 400 56 | property alias bubble: bubble 57 | property alias mainWindow: mainWindow 58 | 59 | header: Label { 60 | text: qsTr("Page 1") 61 | font.pixelSize: Qt.application.font.pixelSize * 2 62 | padding: 10 63 | } 64 | 65 | Rectangle { 66 | id: mainWindow 67 | color: "#ffffff" 68 | anchors.fill: parent 69 | 70 | Bubble { 71 | id: bubble 72 | } 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /ci/generate_azure_pipelines_matrices.py: -------------------------------------------------------------------------------- 1 | """ 2 | This sets variables for a matrix of QT versions to test downloading against with Azure Pipelines 3 | """ 4 | import collections 5 | import json 6 | from itertools import product 7 | 8 | 9 | class BuildJob: 10 | def __init__(self, qt_version, host, target, arch, archdir): 11 | self.qt_version = qt_version 12 | self.host = host 13 | self.target = target 14 | self.arch = arch 15 | self.archdir = archdir 16 | 17 | 18 | class PlatformBuildJobs: 19 | def __init__(self, platform, build_jobs): 20 | self.platform = platform 21 | self.build_jobs = build_jobs 22 | 23 | 24 | python_versions = [ 25 | '3.7', 26 | ] 27 | 28 | qt_versions = [ 29 | '5.11.3', 30 | '5.12.3', 31 | '5.13.0' 32 | ] 33 | 34 | linux_build_jobs = [] 35 | mac_build_jobs = [] 36 | windows_build_jobs = [] 37 | 38 | all_platform_build_jobs = [ 39 | PlatformBuildJobs('linux', linux_build_jobs), 40 | PlatformBuildJobs('mac', mac_build_jobs), 41 | PlatformBuildJobs('windows', windows_build_jobs), 42 | ] 43 | 44 | # Linux Desktop 45 | 46 | for qt_version in qt_versions: 47 | linux_build_jobs.append( 48 | BuildJob(qt_version, 'linux', 'desktop', 'gcc_64', 'gcc_64') 49 | ) 50 | 51 | # Mac Desktop 52 | 53 | for qt_version in qt_versions: 54 | mac_build_jobs.append( 55 | BuildJob(qt_version, 'mac', 'desktop', 'clang_64', "clang_64") 56 | ) 57 | 58 | # Mac iOS 59 | mac_build_jobs.append( 60 | BuildJob('5.13.0', 'mac', 'ios', 'ios', 'ios') 61 | ) 62 | 63 | # Windows Desktop 64 | windows_build_jobs.extend( 65 | [ 66 | BuildJob('5.11.3', 'windows', 'desktop', 'win64_msvc2017_64', 'msvc2017_64'), 67 | BuildJob('5.11.3', 'windows', 'desktop', 'win32_msvc2015', 'msvc2015'), 68 | ] 69 | ) 70 | 71 | windows_build_jobs.extend( 72 | [ 73 | BuildJob('5.12.3', 'windows', 'desktop', 'win64_msvc2017_64', 'msvc2017_64'), 74 | BuildJob('5.12.3', 'windows', 'desktop', 'win32_msvc2017', 'msvc2017'), 75 | ] 76 | ) 77 | 78 | windows_build_jobs.extend( 79 | [ 80 | BuildJob('5.13.0', 'windows', 'desktop', 'win64_msvc2017_64', 'msvc2017_64'), 81 | BuildJob('5.13.0', 'windows', 'desktop', 'win64_msvc2015_64', 'msvc2015_64'), 82 | BuildJob('5.13.0', 'windows', 'desktop', 'win64_mingw73', 'mingw73_64'), 83 | BuildJob('5.13.0', 'windows', 'desktop', 'win32_msvc2017', 'msvc2017'), 84 | BuildJob('5.13.0', 'windows', 'desktop', 'win32_mingw73', 'mingw73_32'), 85 | ] 86 | ) 87 | 88 | # Androids for Linux platforms 89 | # aqt is for CI/CD systems! 90 | # Users might develop on Win/Mac, but are most likely to use Linux for CI/CD with 91 | # the Android ecosystem. 92 | 93 | for android_arch in ['android_x86', 'android_armv7']: 94 | linux_build_jobs.append( 95 | BuildJob('5.13.0', 'linux', 'android', android_arch, android_arch) 96 | ) 97 | 98 | matrices = {} 99 | 100 | for platform_build_job in all_platform_build_jobs: 101 | matrix_dictionary = collections.OrderedDict() 102 | 103 | for build_job, python_version in product(platform_build_job.build_jobs, python_versions): 104 | key = 'QT {} {} {} {}'.format(build_job.qt_version, build_job.host, build_job.target, 105 | build_job.arch) 106 | matrix_dictionary[key] = collections.OrderedDict( 107 | [ 108 | ('PYTHON_VERSION', python_version), 109 | ('QT_VERSION', build_job.qt_version), 110 | ('HOST', build_job.host), 111 | ('TARGET', build_job.target), 112 | ('ARCH', build_job.arch), 113 | ('ARCHDIR', build_job.archdir), 114 | ] 115 | ) 116 | 117 | matrices[platform_build_job.platform] = matrix_dictionary 118 | 119 | print("Setting Variables below") 120 | print(f"##vso[task.setVariable variable=linux;isOutput=true]{json.dumps(matrices['linux'])}") 121 | print(f"##vso[task.setVariable variable=windows;isOutput=true]{json.dumps(matrices['windows'])}") 122 | print(f"##vso[task.setVariable variable=mac;isOutput=true]{json.dumps(matrices['mac'])}") 123 | -------------------------------------------------------------------------------- /ci/steps.yml: -------------------------------------------------------------------------------- 1 | steps: 2 | - task: UsePythonVersion@0 3 | inputs: 4 | versionSpec: $(PYTHON_VERSION) 5 | architecture: 'x64' 6 | - script: | 7 | cd $(Build.SourcesDirectory) 8 | python -m pip install -rrequirements.txt 9 | displayName: 'Install dependency' 10 | - task: PythonScript@0 11 | inputs: 12 | scriptSource: filePath 13 | scriptPath: $(Build.SourcesDirectory)/setup.py 14 | arguments: sdist bdist_wheel 15 | workingDirectory: $(Build.SourcesDirectory) 16 | displayName: build package 17 | # 18 | # Install aqtinstall 19 | - powershell: | 20 | $aqtVersion = & python $(Build.SourcesDirectory)/setup.py --version | Out-String -Stream 21 | pip install $(Build.SourcesDirectory)/dist/aqtinstall-$aqtVersion-py2.py3-none-any.whl 22 | displayName: install package 23 | - task: PythonScript@0 24 | inputs: 25 | scriptSource: filePath 26 | scriptPath: $(Build.SourcesDirectory)/bin/aqt 27 | arguments: install $(QT_VERSION) $(HOST) $(TARGET) $(ARCH) 28 | workingDirectory: $(Build.BinariesDirectory) 29 | condition: not(variables['QT_BASE_MIRROR']) 30 | displayName: Run Aqt (No Base URL Set) 31 | - task: PythonScript@0 32 | inputs: 33 | scriptSource: filePath 34 | scriptPath: $(Build.SourcesDirectory)/bin/aqt 35 | arguments: install $(QT_VERSION) $(HOST) $(TARGET) $(ARCH) -b $(QT_BASE_MIRROR) 36 | workingDirectory: $(Build.BinariesDirectory) 37 | condition: variables['QT_BASE_MIRROR'] 38 | displayName: Run Aqt (Base URL Set) 39 | # 40 | # Test installation results 41 | # for Android on linux 42 | - script: | 43 | wget https://dl.google.com/android/repository/android-ndk-r19c-linux-x86_64.zip 44 | unzip android-ndk-r19c-linux-x86_64.zip 45 | condition: and(eq(variables['TARGET'], 'android'), eq(variables['Agent.OS'], 'Linux')) 46 | displayName: Download and extract Android NDK 47 | # for Android on mac 48 | - script: | 49 | wget https://dl.google.com/android/repository/android-ndk-r19c-darwin-x86_64.zip 50 | unzip android-ndk-r19c-darwin-x86_64.zip 51 | condition: and(eq(variables['TARGET'], 'android'), eq(variables['Agent.OS'], 'Darwin')) 52 | displayName: Download and extract Android NDK 53 | - script: | 54 | export ANDROID_NDK_ROOT=$(Build.SourcesDirectory)/android-ndk-r19c 55 | $(Build.BinariesDirectory)/Qt$(QT_VERSION)/$(QT_VERSION)/$(ARCHDIR)/bin/qmake $(Build.SourcesDirectory)/tests/accelbubble/ && make 56 | condition: and(eq(variables['TARGET'], 'android'), or(eq(variables['Agent.OS'], 'Linux'), eq(variables['Agent.OS'], 'Darwin'))) 57 | displayName: Build accelbubble example application to test for android 58 | # for desktop application 59 | - powershell: | 60 | Install-PackageProvider NuGet -Force 61 | Import-PackageProvider NuGet -Force 62 | Set-PSRepository -Name PSGallery -InstallationPolicy Trusted 63 | Install-Module Pscx -AllowClobber 64 | Install-Module VSSetup -Scope CurrentUser 65 | if ('$(ARCH)' -like '*msvc*') { 66 | echo '##vso[task.setvariable variable=TOOLCHAIN]MSVC' 67 | } 68 | if ('$(ARCH)' -like '*mingw*') { 69 | echo '##vso[task.setvariable variable=TOOLCHAIN]MINGW' 70 | } 71 | if ('$(ARCH)' -like 'win64_msvc*') { 72 | echo '##vso[task.setvariable variable=ARCHITECTURE]amd64' 73 | } else { 74 | echo '##vso[task.setvariable variable=ARCHITECTURE]x86' 75 | } 76 | if ('$(ARCH)' -like '*msvc2017*') { 77 | echo '##vso[task.setvariable variable=VSVER]2017' 78 | } else { 79 | echo '##vso[task.setvariable variable=VSVER]2015' 80 | } 81 | condition: eq( variables['Agent.OS'], 'Windows_NT') 82 | - powershell: | 83 | Import-VisualStudioVars -VisualStudioVersion $(VSVER) -Architecture $(ARCHITECTURE) 84 | $(Build.BinariesDirectory)/Qt$(QT_VERSION)/$(QT_VERSION)/$(ARCHDIR)/bin/qmake $(Build.SourcesDirectory)/tests 85 | nmake 86 | condition: and(eq( variables['Agent.OS'], 'Windows_NT'), eq(variables['TOOLCHAIN'], 'MSVC')) 87 | displayName: build test with qmake with MSVC 88 | - script: | 89 | $(Build.BinariesDirectory)/Qt$(QT_VERSION)/$(QT_VERSION)/$(ARCHDIR)/bin/qmake $(Build.SourcesDirectory)/tests 90 | make 91 | condition: and(eq( variables['TARGET'], 'desktop' ), or(eq(variables['Agent.OS'], 'Linux'), eq(variables['Agent.OS'], 'Darwin'))) 92 | displayName: Build test with qmake for Linux and macOS 93 | # for ios 94 | - script: echo Currently not implemented. 95 | condition: and(eq(variables['TARGET'], 'ios'), eq(variables['Agent.OS'], 'Darwin')) 96 | displayName: Build test with qmake for ios 97 | -------------------------------------------------------------------------------- /CHANGELOG.rst: -------------------------------------------------------------------------------- 1 | ==================== 2 | aqtinstall changeLog 3 | ==================== 4 | 5 | All notable changes to this project will be documented in this file. 6 | 7 | *************** 8 | Current changes 9 | *************** 10 | 11 | `Unreleased`_ 12 | ============= 13 | 14 | Added 15 | ----- 16 | 17 | Changed 18 | ------- 19 | 20 | * README: update badge layout. 21 | * CI: Improve azure-pipelines configurations by Nelson (#20) 22 | * Check parameter combination allowance and add winrt variant. 23 | * Support installation of mingw runtime package. 24 | 25 | Fixed 26 | ----- 27 | 28 | Deprecated 29 | ---------- 30 | 31 | Removed 32 | ------- 33 | 34 | Security 35 | -------- 36 | 37 | 38 | `v0.4.1`_ (01, Jun, 2019) 39 | ========================= 40 | 41 | Added 42 | ----- 43 | 44 | * Option -b | --base to specify mirror site.(#24) 45 | 46 | Changed 47 | ------- 48 | 49 | * CI: add script to generate auzre-pipelines.yml (#27, #28, #29) 50 | * CI: use powershell script for linux, mac and windows. (#26) 51 | 52 | Fixed 53 | ----- 54 | 55 | * Avoid blacklisted mirror site that cause CI fails.(#25) 56 | 57 | 58 | `v0.4.0`_ (29, May, 2019) 59 | ========================= 60 | 61 | Added 62 | ----- 63 | 64 | * cli: output directory option. 65 | * sphinx document. 66 | * test packaging on CI. 67 | * Handler for metalink information and intelligent mirror selection. 68 | 69 | Changed 70 | ------- 71 | 72 | * Change project directory structure. 73 | * cli command name changed from `aqtinst` to `aqt` and now you can run `aqt install` 74 | * Introduce Cli class 75 | * Massive regression test on azure pipelines(#20) 76 | * blacklist against http://mirrors.tuna.tsinghua.edu.cn and http://mirrors.geekpie.club/ 77 | from mirror site. 78 | * Run 7zip command with '-o{directory}' option. 79 | 80 | Fixed 81 | ----- 82 | 83 | * Fix File Not Found Error when making qt.conf against win64_mingw73 and win32_mingw73 84 | 85 | 86 | `v0.3.1`_ (15, March, 2019) 87 | ========================== 88 | 89 | Added 90 | ----- 91 | 92 | * Qmake build test code in CI environment.(#14) 93 | 94 | Fixed 95 | ----- 96 | 97 | * Connect to Qt download server through proxy with authentication.(#17) 98 | 99 | Changed 100 | ------- 101 | 102 | * Change QtInstaller.install() function signature not to take any parameter. 103 | * Replace standard urllib to requests library.(#18) 104 | * Use 7zr external command instead of 7z in Linux and mac OSX envitonment. 105 | 106 | Removed 107 | ------- 108 | 109 | * requirements.txt file. 110 | 111 | 112 | `v0.3.0`_ (8, March, 2019) 113 | ========================== 114 | 115 | Added 116 | ----- 117 | 118 | * Allow execute both `aqtinst` and `python -m aqt` form. 119 | 120 | Changed 121 | ------- 122 | 123 | * Project URL is changed. 124 | * Generate universal wheel support both python2.7 and python 3.x. 125 | 126 | Fixed 127 | ----- 128 | 129 | * Update README wordings. 130 | * Remove dependency for python3 with `aqtinst` command utility. 131 | * Fix command name in help message. 132 | 133 | 134 | 135 | `v0.2.0`_ (7, March, 2019) 136 | ========================== 137 | 138 | Added 139 | ----- 140 | 141 | * Released on pypi.org 142 | 143 | Changed 144 | ------- 145 | 146 | * Install not only basic packages also optional packages. 147 | * Rename project/command to aqt - Another QT installer 148 | 149 | Fixed 150 | ----- 151 | 152 | * Update mkspecs/qconfig.pri to indicate QT_EDITION is OpenSource 153 | * Support Python2 154 | 155 | `v0.1.0`_ (5, March, 2019) 156 | ========================== 157 | 158 | Changed 159 | ------- 160 | 161 | * Support multiprocess concurrent download and installation. 162 | 163 | `v0.0.2`_ (4, March, 2019) 164 | ======================== 165 | 166 | Added 167 | ===== 168 | 169 | * CI test on Azure-pipelines 170 | 171 | Changed 172 | ======= 173 | 174 | * Refactoring code 175 | * Install QtSDK into (cwd)/Qt//gcc_64/ 176 | * Drop dependency for `requests` library 177 | * Use standard `argparser` for command line argument. 178 | 179 | Fixed 180 | ===== 181 | 182 | * Support windows. 183 | * looking for 7zip in standard directory. 184 | 185 | `v0.0.1`_ (2, March, 2019) 186 | ========================== 187 | 188 | * Fork from https://git.kaidan.im/lnj/qli-installer 189 | 190 | .. _Unreleased: https://github.com/miurahr/qli-installer/compare/v0.4.1...HEAD 191 | .. _v0.4.1: https://github.com/miurahr/qli-installer/compare/v0.4.0...v0.4.1 192 | .. _v0.4.0: https://github.com/miurahr/qli-installer/compare/v0.3.1...v0.4.0 193 | .. _v0.3.1: https://github.com/miurahr/qli-installer/compare/v0.3.0...v0.3.1 194 | .. _v0.3.0: https://github.com/miurahr/qli-installer/compare/v0.2.0...v0.3.0 195 | .. _v0.2.0: https://github.com/miurahr/qli-installer/compare/v0.1.0...v0.2.0 196 | .. _v0.1.0: https://github.com/miurahr/qli-installer/compare/v0.0.2...v0.1.0 197 | .. _v0.0.2: https://github.com/miurahr/qli-installer/compare/v0.0.1...v0.0.2 198 | .. _v0.0.1: https://github.com/miurahr/qli-installer/releases/tag/v0.0.1 199 | -------------------------------------------------------------------------------- /README.rst: -------------------------------------------------------------------------------- 1 | Another Qt installer(aqt) 2 | ========================= 3 | 4 | 5 | .. |pypi| image:: https://badge.fury.io/py/aqtinstall.png 6 | :target: http://badge.fury.io/py/aqtinstall 7 | .. |docs| image:: https://readthedocs.org/projects/aqtinstall/badge/?version=latest 8 | :target: https://aqtinstall.readthedocs.io/en/latest/?badge=latest 9 | .. |pep8| image:: https://travis-ci.org/miurahr/aqtinstall.svg?branch=master 10 | :target: https://travis-ci.org/miurahr/aqtinstall 11 | .. |macos| image:: https://dev.azure.com/miurahr/github/_apis/build/status/miurahr.aqtinstall?branchName=master&jobName=Mac 12 | :target: https://dev.azure.com/miurahr/github/_build/latest?definitionId=6&branchName=master 13 | .. |ubuntu| image:: https://dev.azure.com/miurahr/github/_apis/build/status/miurahr.aqtinstall?branchName=master&jobName=Linux 14 | :target: https://dev.azure.com/miurahr/github/_build/latest?definitionId=6&branchName=master 15 | .. |windows| image:: https://dev.azure.com/miurahr/github/_apis/build/status/miurahr.aqtinstall?branchName=master&jobName=Windows 16 | :target: https://dev.azure.com/miurahr/github/_build/latest?definitionId=6&branchName=master 17 | .. |ext| image:: https://dev.azure.com/miurahr/github/_apis/build/status/miurahr.aqtinstall?branchName=master&jobName=Linux%20(Specific%20Mirror) 18 | :target: https://dev.azure.com/miurahr/github/_build/latest?definitionId=6&branchName=master 19 | 20 | +--------+-----------+---------+ 21 | | Jobs | Mac | Release | 22 | | | Linux | Status | 23 | | | Windows | | 24 | | | Mirror | | 25 | +--------+-----------+---------+ 26 | | Status | |macos| | |pypi| | 27 | | | |ubuntu| | |pep8| | 28 | | | |windows| | |docs| | 29 | | | |ext| | | 30 | +--------+-----------+---------+ 31 | 32 | This is an utility replacing the official graphical Qt installer. It can 33 | automatically download prebuilt Qt binaries for any target (you're not bound to 34 | Linux binaries on Linux; you could also download iOS binaries). 35 | It's working with python on Linux, OS X and Windows. 36 | 37 | Prerequisite 38 | ------------ 39 | 40 | **Dependencies**: python, 7z 41 | 42 | It is required `p7zip` for windows, `7zip` for mac or `p7zip-full` for Ubuntu. 43 | 44 | Install 45 | ------- 46 | 47 | Same as usual, it can be installed with `pip` 48 | 49 | .. code-block:: bash 50 | 51 | $ pip install aqtinstall 52 | 53 | Usage 54 | ----- 55 | 56 | General usage looks like this: 57 | 58 | .. code-block:: bash 59 | 60 | aqt [-h][--help][-O | --outputdir ][-b | --base ] install [] 61 | python -m aqt [-h][--help][-O | --outputdir ][-b | --base ] install [] 62 | 63 | * The Qt version is formatted like this: `5.11.3` 64 | * Host is one of: `linux`, `mac`, `windows` 65 | * Target is one of: `desktop`, `android`, `ios` (iOS only works with mac host) 66 | * For android and windows you also need to specify an arch: `win64_msvc2017_64`, 67 | `win64_msvc2015_64`, `win32_msvc2015`, `win32_mingw53`, 'win64_mingw73', `android_x86`, `android_armv7` 68 | 69 | 70 | The Qt packages are installed under current directory as such `Qt//gcc_64/` 71 | If you want to install it in `C:\Qt` as same as standard gui installer default, 72 | run such as follows: 73 | 74 | .. code-block:: bash 75 | 76 | C:\> mkdir Qt 77 | C:\> aqt install -O c:\Qt 5.11.3 windows desktop win64_msvc2017_64 78 | 79 | 80 | Example: Installing Qt 5.12.0 for Linux: 81 | 82 | .. code-block:: bash 83 | 84 | pip install aqtinstall 85 | sudo aqt install --outputdir /opt 5.12.0 linux desktop 86 | 87 | 88 | Example: Installing Android (armv7) Qt 5.10.2: 89 | 90 | .. code-block:: bash 91 | 92 | aqt install 5.10.2 linux android android_armv7 93 | 94 | 95 | Example: Show help message 96 | 97 | .. code-block:: bash 98 | 99 | aqt help 100 | 101 | 102 | 103 | Supported CI platform 104 | --------------------- 105 | 106 | There are no limitation for CI platform but currently it is tested on Azure Pipelines. 107 | 108 | 109 | Known issues and limitations 110 | ---------------------------- 111 | 112 | Current version(v0.4.0) don't have a capability to install tools such as mingw and qtcreator. 113 | A utility install only Qt library staffs. 114 | 115 | 116 | License and copyright 117 | --------------------- 118 | 119 | This program is distributed under MIT license. 120 | 121 | Qt SDK and its related files are under its licenses. When using the utility, you are considered 122 | to agree upon Qt licenses. 123 | For details see `Qt licensing`_ and `Licenses used in Qt5`_ 124 | 125 | .. _`Qt licensing`: https://www.qt.io/licensing/ 126 | 127 | .. _`Licenses used in Qt5`: https://doc.qt.io/qt-5/licenses-used-in-qt.html 128 | 129 | History 130 | ------- 131 | 132 | This program is originally shown in `Kaidan`_ project as a name `qli-installer`. 133 | A project `aqtinstall` extend the original to run with standard python features with Linux, Mac and Windows, 134 | to be tested on CI platform, and to improve performance with a concurrent downloading. 135 | 136 | .. _`kaidan`: https://git.kaidan.im/lnj/qli-installer 137 | -------------------------------------------------------------------------------- /tests/accelbubble/main.qml: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2017 The Qt Company Ltd. 4 | ** Contact: https://www.qt.io/licensing/ 5 | ** 6 | ** This file is part of Qt Creator 7 | ** 8 | ** $QT_BEGIN_LICENSE:BSD$ 9 | ** Commercial License Usage 10 | ** Licensees holding valid commercial Qt licenses may use this file in 11 | ** accordance with the commercial license agreement provided with the 12 | ** Software or, alternatively, in accordance with the terms contained in 13 | ** a written agreement between you and The Qt Company. For licensing terms 14 | ** and conditions see https://www.qt.io/terms-conditions. For further 15 | ** information use the contact form at https://www.qt.io/contact-us. 16 | ** 17 | ** BSD License Usage 18 | ** Alternatively, you may use this file under the terms of the BSD license 19 | ** as follows: 20 | ** 21 | ** "Redistribution and use in source and binary forms, with or without 22 | ** modification, are permitted provided that the following conditions are 23 | ** met: 24 | ** * Redistributions of source code must retain the above copyright 25 | ** notice, this list of conditions and the following disclaimer. 26 | ** * Redistributions in binary form must reproduce the above copyright 27 | ** notice, this list of conditions and the following disclaimer in 28 | ** the documentation and/or other materials provided with the 29 | ** distribution. 30 | ** * Neither the name of The Qt Company Ltd nor the names of its 31 | ** contributors may be used to endorse or promote products derived 32 | ** from this software without specific prior written permission. 33 | ** 34 | ** 35 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 36 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 37 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 38 | ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 39 | ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 40 | ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 41 | ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 42 | ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 43 | ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 44 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 45 | ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." 46 | ** 47 | ** $QT_END_LICENSE$ 48 | ** 49 | ****************************************************************************/ 50 | 51 | import QtQuick 2.9 52 | import QtQuick.Controls 2.2 53 | import QtSensors 5.9 54 | 55 | ApplicationWindow { 56 | visible: true 57 | width: 640 58 | height: 480 59 | title: qsTr("Accelerate Bubble") 60 | 61 | SwipeView { 62 | id: swipeView 63 | anchors.fill: parent 64 | currentIndex: tabBar.currentIndex 65 | 66 | Page1Form { 67 | bubble { 68 | id: bubble 69 | centerX: mainWindow.width / 2 70 | centerY: mainWindow.height / 2 71 | bubbleCenter: bubble.width / 2 72 | x: bubble.centerX - bubble.bubbleCenter 73 | y: bubble.centerY - bubble.bubbleCenter 74 | 75 | Behavior on y { 76 | SmoothedAnimation { 77 | easing.type: Easing.Linear 78 | duration: 100 79 | } 80 | } 81 | Behavior on x { 82 | SmoothedAnimation { 83 | easing.type: Easing.Linear 84 | duration: 100 85 | } 86 | } 87 | } 88 | } 89 | 90 | Page2Form { 91 | } 92 | } 93 | 94 | footer: TabBar { 95 | id: tabBar 96 | currentIndex: swipeView.currentIndex 97 | 98 | TabButton { 99 | text: qsTr("Page 1") 100 | } 101 | TabButton { 102 | text: qsTr("Page 2") 103 | } 104 | } 105 | 106 | Accelerometer { 107 | id: accel 108 | dataRate: 100 109 | active: true 110 | 111 | onReadingChanged: { 112 | var newX = (bubble.x + calcRoll(accel.reading.x, accel.reading.y, accel.reading.z) * 0.1) 113 | var newY = (bubble.y - calcPitch(accel.reading.x, accel.reading.y, accel.reading.z) * 0.1) 114 | 115 | if (isNaN(newX) || isNaN(newY)) 116 | return; 117 | 118 | if (newX < 0) 119 | newX = 0 120 | 121 | if (newX > mainWindow.width - bubble.width) 122 | newX = mainWindow.width - bubble.width 123 | 124 | if (newY < 18) 125 | newY = 18 126 | 127 | if (newY > mainWindow.height - bubble.height) 128 | newY = mainWindow.height - bubble.height 129 | 130 | bubble.x = newX 131 | bubble.y = newY 132 | } 133 | } 134 | 135 | function calcPitch(x, y, z) { 136 | return -(Math.atan(y / Math.sqrt(x * x + z * z)) * 57.2957795); 137 | } 138 | function calcRoll(x, y, z) { 139 | return -(Math.atan(x / Math.sqrt(y * y + z * z)) * 57.2957795); 140 | } 141 | } 142 | -------------------------------------------------------------------------------- /aqt/archives.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # 3 | # Copyright (C) 2018 Linus Jahn 4 | # Copyright (C) 2019 Hiroshi Miura 5 | # 6 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | # this software and associated documentation files (the "Software"), to deal in 8 | # the Software without restriction, including without limitation the rights to 9 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | # the Software, and to permit persons to whom the Software is furnished to do so, 11 | # subject to the following conditions: 12 | # 13 | # The above copyright notice and this permission notice shall be included in all 14 | # copies or substantial portions of the Software. 15 | # 16 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | import logging 24 | import requests 25 | import traceback 26 | import xml.etree.ElementTree as ElementTree 27 | from six import StringIO 28 | 29 | 30 | class QtPackage: 31 | name = "" 32 | url = "" 33 | archive = "" 34 | desc = "" 35 | mirror = None 36 | 37 | def __init__(self, name, archive_url, archive, package_desc, has_mirror=False): 38 | self.name = name 39 | self.url = archive_url 40 | self.archive = archive 41 | self.desc = package_desc 42 | self.has_mirror = has_mirror 43 | 44 | 45 | class QtArchives: 46 | BASE_URL = 'https://download.qt.io/online/qtsdkrepository/' 47 | archives = [] 48 | base = None 49 | 50 | def __init__(self, os_name, qt_version, target, arch, mirror=None): 51 | self.qt_version = qt_version 52 | self.target = target 53 | self.arch = arch 54 | if mirror is not None: 55 | self.has_mirror = True 56 | self.base = mirror + '/online/qtsdkrepository/' 57 | else: 58 | self.base = self.BASE_URL 59 | qt_ver_num = qt_version.replace(".", "") 60 | 61 | # install mingw runtime package 62 | if arch in ['win64_mingw73', 'win32_mingw73', 'win64_mingw53', 'win32_mingw53']: 63 | archive_url = self.base + 'windows_x86/desktop/tools_mingw/' 64 | update_xml_url = "{0}Updates.xml".format(archive_url) 65 | try: 66 | r = requests.get(update_xml_url) 67 | except requests.exceptions.ConnectionError as e: 68 | print("Caught download error: %s" % e.args) 69 | exc_buffer = StringIO() 70 | traceback.print_exc(file=exc_buffer) 71 | logging.error('Download error:\n%s', exc_buffer.getvalue()) 72 | raise e 73 | else: 74 | self.update_xml = ElementTree.fromstring(r.text) 75 | for packageupdate in self.update_xml.iter("PackageUpdate"): 76 | name = packageupdate.find("Name").text 77 | if name.split(".")[-1] != arch: 78 | continue 79 | downloadable_archives = packageupdate.find("DownloadableArchives").text.split(", ") 80 | full_version = packageupdate.find("Version").text 81 | split_version = full_version.split["-"] 82 | named_version = split_version[0] + "-" + split_version[1] 83 | package_desc = packageupdate.find("Description").text 84 | for archive in downloadable_archives: 85 | # ex. 7.3.0-1x86_64-7.3.0-release-posix-seh-rt_v5-rev0.7z 86 | package_url = archive_url + name + "/" + named_version + archive 87 | self.archives.append(QtPackage(name, package_url, archive, package_desc, 88 | has_mirror=(mirror is not None))) 89 | # Ordinary packages 90 | if os_name == 'windows': 91 | archive_url = self.base + os_name + '_x86/' + target + '/' + 'qt5_' + qt_ver_num + '/' 92 | else: 93 | archive_url = self.base + os_name + '_x64/' + target + '/' + 'qt5_' + qt_ver_num + '/' 94 | 95 | # Get packages index 96 | update_xml_url = "{0}Updates.xml".format(archive_url) 97 | try: 98 | r = requests.get(update_xml_url) 99 | except requests.exceptions.ConnectionError as e: 100 | print("Caught download error: %s" % e.args) 101 | exc_buffer = StringIO() 102 | traceback.print_exc(file=exc_buffer) 103 | logging.error('Download error:\n%s', exc_buffer.getvalue()) 104 | raise e 105 | else: 106 | self.update_xml = ElementTree.fromstring(r.text) 107 | for packageupdate in self.update_xml.iter("PackageUpdate"): 108 | name = packageupdate.find("Name").text 109 | if name.split(".")[-1] != arch: 110 | continue 111 | if name.split(".")[-2] == "debug_info": 112 | continue 113 | if packageupdate.find("DownloadableArchives").text is None: 114 | continue 115 | if name == "qt.qt5.{}.{}".format(qt_ver_num, arch) or name == "qt.{}.{}".format(qt_ver_num, arch): 116 | # basic packages 117 | pass 118 | else: 119 | # optional packages: FIXME: check option whether install or not 120 | pass 121 | downloadable_archives = packageupdate.find("DownloadableArchives").text.split(", ") 122 | full_version = packageupdate.find("Version").text 123 | package_desc = packageupdate.find("Description").text 124 | for archive in downloadable_archives: 125 | package_url = archive_url + name + "/" + full_version + archive 126 | self.archives.append(QtPackage(name, package_url, archive, package_desc, 127 | has_mirror=(mirror is not None))) 128 | 129 | if len(self.archives) == 0: 130 | print("Error while parsing package information!") 131 | exit(1) 132 | 133 | def get_archives(self): 134 | return self.archives 135 | 136 | def get_target_config(self): 137 | return self.qt_version, self.target, self.arch 138 | -------------------------------------------------------------------------------- /aqt/cli.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # 3 | # Copyright (C) 2018 Linus Jahn 4 | # Copyright (C) 2019 Hiroshi Miura 5 | # 6 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | # this software and associated documentation files (the "Software"), to deal in 8 | # the Software without restriction, including without limitation the rights to 9 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | # the Software, and to permit persons to whom the Software is furnished to do so, 11 | # subject to the following conditions: 12 | # 13 | # The above copyright notice and this permission notice shall be included in all 14 | # copies or substantial portions of the Software. 15 | # 16 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | import argparse 24 | import sys 25 | 26 | from aqt.archives import QtArchives 27 | from aqt.installer import QtInstaller 28 | 29 | 30 | class Cli(): 31 | 32 | __slot__ = ['parser'] 33 | 34 | COMBINATION = [ 35 | {'os_name': 'linux', 'target': 'desktop', 'arch': 'gcc_64'}, 36 | {'os_name': 'linux', 'target': 'android', 'arch': 'android_x86'}, 37 | {'os_name': 'linux', 'target': 'android', 'arch': 'android_armv7'}, 38 | {'os_name': 'mac', 'target': 'desktop', 'arch': 'clang_64'}, 39 | {'os_name': 'mac', 'target': 'ios', 'arch': 'ios'}, 40 | {'os_name': 'windows', 'target': 'desktop', 'arch': 'win64_msvc2017_64'}, 41 | {'os_name': 'windows', 'target': 'desktop', 'arch': 'win32_msvc2017'}, 42 | {'os_name': 'windows', 'target': 'desktop', 'arch': 'win64_msvc2015_64'}, 43 | {'os_name': 'windows', 'target': 'desktop', 'arch': 'win32_msvc2015'}, 44 | {'os_name': 'windows', 'target': 'desktop', 'arch': 'win64_mingw73'}, 45 | {'os_name': 'windows', 'target': 'desktop', 'arch': 'win32_mingw73'}, 46 | {'os_name': 'windows', 'target': 'desktop', 'arch': 'win64_mingw53'}, 47 | {'os_name': 'windows', 'target': 'desktop', 'arch': 'win32_mingw53'}, 48 | {'os_name': 'windows', 'target': 'winrt', 'arch': 'win64_msvc2017_winrt_x64'}, 49 | {'os_name': 'windows', 'target': 'winrt', 'arch': 'win64_msvc2017_winrt_x86'}, 50 | {'os_name': 'windows', 'target': 'winrt', 'arch': 'win64_msvc2017_winrt_armv7'}, 51 | {'os_name': 'windows', 'target': 'android', 'arch': 'android_x86'}, 52 | {'os_name': 'windows', 'target': 'android', 'arch': 'android_armv7'}, 53 | ] 54 | 55 | def check_arg_combination(self, qt_version, os_name, target, arch): 56 | for c in self.COMBINATION: 57 | if c['os_name'] == os_name and c['target'] == target and c['arch'] == arch: 58 | return True 59 | return False 60 | 61 | def run_install(self, args): 62 | arch = args.arch 63 | target = args.target 64 | os_name = args.host 65 | output_dir = args.outputdir 66 | mirror = args.base 67 | if arch is None: 68 | if os_name == "linux" and target == "desktop": 69 | arch = "gcc_64" 70 | elif os_name == "mac" and target == "desktop": 71 | arch = "clang_64" 72 | elif os_name == "mac" and target == "ios": 73 | arch = "ios" 74 | if arch == "": 75 | print("Please supply a target architecture.") 76 | args.print_help() 77 | exit(1) 78 | qt_version = args.qt_version 79 | if not self.check_arg_combination(qt_version, os_name, target, arch): 80 | print("Specified target combination is not valid: {} {} {}".format(os_name, target, arch)) 81 | exit(1) 82 | if mirror is not None: 83 | if not mirror.startswith('http://') or mirror.startswith('https://') or mirror.startswith('ftp://'): 84 | args.print_help() 85 | exit(1) 86 | if output_dir is not None: 87 | QtInstaller(QtArchives(os_name, qt_version, target, arch, mirror=mirror)).install(target_dir=output_dir) 88 | else: 89 | QtInstaller(QtArchives(os_name, qt_version, target, arch, mirror=mirror)).install() 90 | 91 | sys.stdout.write("\033[K") 92 | print("Finished installation") 93 | 94 | def run_list(self, args): 95 | print('List Qt packages for %s' % args.qt_version) 96 | 97 | def show_help(self, args): 98 | print("show help") 99 | self.parser.print_help() 100 | 101 | def __init__(self): 102 | parser = argparse.ArgumentParser(prog='aqt', description='Installer for Qt SDK.', 103 | formatter_class=argparse.RawTextHelpFormatter, add_help=True) 104 | subparsers = parser.add_subparsers(title='subcommands', description='Valid subcommands', 105 | help='subcommand for aqt Qt installer') 106 | install_parser = subparsers.add_parser('install') 107 | install_parser.set_defaults(func=self.run_install) 108 | install_parser.add_argument("qt_version", help="Qt version in the format of \"5.X.Y\"") 109 | install_parser.add_argument('host', choices=['linux', 'mac', 'windows'], help="host os name") 110 | install_parser.add_argument('target', choices=['desktop', 'winrt', 'android', 'ios', 'tool'], help="target sdk") 111 | install_parser.add_argument('arch', nargs='?', help="\ntarget linux/desktop: gcc_64" 112 | "\ntarget mac/desktop: clang_64" 113 | "\ntarget mac/ios: ios" 114 | "\nwindows/desktop: win64_msvc2017_64, win64_msvc2015_64" 115 | "\n win32_msvc2015, win32_mingw53" 116 | "\n win64_mingw73, win32_mingw73" 117 | "\nwindows/winrt: win64_msvc2017_winrt_x64, win64_msvc2017_winrt_x86" 118 | "\n win64_msvc2017_winrt_armv7" 119 | "\nandroid: android_x86, android_armv7") 120 | install_parser.add_argument('-O', '--outputdir', nargs='?', 121 | help='Target output directory(default current directory)') 122 | install_parser.add_argument('-b', '--base', nargs='?', 123 | help="Specify mirror base url such as http://mirrors.ocf.berkeley.edu/qt/, " 124 | "where 'online' folder exist.") 125 | list_parser = subparsers.add_parser('list') 126 | list_parser.set_defaults(func=self.run_list) 127 | list_parser.add_argument("qt_version", help="Qt version in the format of \"5.X.Y\"") 128 | help_parser = subparsers.add_parser('help') 129 | help_parser.set_defaults(func=self.show_help) 130 | self.parser = parser 131 | 132 | def run(self): 133 | args = self.parser.parse_args() 134 | args.func(args) 135 | -------------------------------------------------------------------------------- /aqt/installer.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # 3 | # Copyright (C) 2018 Linus Jahn 4 | # Copyright (C) 2019 Hiroshi Miura 5 | # 6 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | # this software and associated documentation files (the "Software"), to deal in 8 | # the Software without restriction, including without limitation the rights to 9 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | # the Software, and to permit persons to whom the Software is furnished to do so, 11 | # subject to the following conditions: 12 | # 13 | # The above copyright notice and this permission notice shall be included in all 14 | # copies or substantial portions of the Software. 15 | # 16 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | import functools 24 | import logging 25 | import os 26 | import platform 27 | import requests 28 | import sys 29 | import traceback 30 | import xml.etree.ElementTree as ElementTree 31 | from six import StringIO 32 | from multiprocessing.dummy import Pool 33 | from operator import and_ 34 | if sys.version_info.major == 3: 35 | from subprocess import run 36 | else: 37 | from subprocess import call as run 38 | 39 | 40 | NUM_PROCESS = 3 41 | blacklist = ['http://mirrors.ustc.edu.cn', 42 | 'http://mirrors.tuna.tsinghua.edu.cn', 43 | 'http://mirrors.geekpie.club'] 44 | 45 | 46 | class QtInstaller: 47 | """ 48 | Installer class to download packages and extract it. 49 | """ 50 | 51 | def __init__(self, qt_archives): 52 | self.qt_archives = qt_archives 53 | 54 | @staticmethod 55 | def retrieve_archive(package, path=None): 56 | archive = package.archive 57 | url = package.url 58 | print("-Downloading {}...".format(url)) 59 | try: 60 | r = requests.get(url, stream=True, allow_redirects=False) 61 | if r.status_code == 302: 62 | # tsinghua.edu.cn is problematic and it prohibit service to specific geo location. 63 | # we will use another redirected location for that. 64 | newurl = r.headers['Location'] 65 | mml = Metalink(url) 66 | newurl = mml.altlink(blacklist=blacklist) 67 | print('Redirected to new URL: {}'.format(newurl)) 68 | r = requests.get(newurl, stream=True, allow_redirects=False) 69 | except requests.exceptions.ConnectionError as e: 70 | print("Caught download error: %s" % e.args) 71 | return False 72 | else: 73 | with open(archive, 'wb') as fd: 74 | for chunk in r.iter_content(chunk_size=8196): 75 | fd.write(chunk) 76 | sys.stdout.write("\033[K") 77 | print("-Extracting {}...".format(archive)) 78 | if platform.system() == 'Windows': 79 | if path is not None: 80 | run([r'C:\Program Files\7-Zip\7z.exe', 'x', '-aoa', '-bd', '-y', '-o{}'.format(path), archive]) 81 | else: 82 | run([r'C:\Program Files\7-Zip\7z.exe', 'x', '-aoa', '-bd', '-y', archive]) 83 | else: 84 | if path is not None: 85 | run([r'7zr', 'x', '-aoa', '-bd', '-y', '-o{}'.format(path), archive]) 86 | else: 87 | run([r'7zr', 'x', '-aoa', '-bd', '-y', archive]) 88 | os.unlink(archive) 89 | return True 90 | 91 | @staticmethod 92 | def get_base_dir(qt_version, target_dir=None): 93 | if target_dir is not None: 94 | return os.path.join(target_dir, 'Qt{}'.format(qt_version)) 95 | else: 96 | return os.path.join(os.getcwd(), 'Qt{}'.format(qt_version)) 97 | 98 | def install(self, target_dir=None): 99 | qt_version, target, arch = self.qt_archives.get_target_config() 100 | base_dir = self.get_base_dir(qt_version, target_dir) 101 | archives = self.qt_archives.get_archives() 102 | p = Pool(NUM_PROCESS) 103 | ret_arr = p.map(functools.partial(self.retrieve_archive, path=base_dir), archives) 104 | ret = functools.reduce(and_, ret_arr) 105 | if ret: 106 | if arch.startswith('win64_mingw'): 107 | arch_dir = arch[6:] + '_64' 108 | elif arch.startswith('win32_mingw'): 109 | arch_dir = arch[6:] + '_32' 110 | elif arch.startswith('win'): 111 | arch_dir = arch[6:] 112 | else: 113 | arch_dir = arch 114 | try: 115 | # prepare qt.conf 116 | with open(os.path.join(base_dir, qt_version, arch_dir, 'bin', 'qt.conf'), 'w') as f: 117 | f.write("[Paths]\n") 118 | f.write("Prefix=..\n") 119 | # prepare qtconfig.pri 120 | with open(os.path.join(base_dir, qt_version, arch_dir, 'mkspecs', 'qconfig.pri'), 'r+') as f: 121 | lines = f.readlines() 122 | f.seek(0) 123 | f.truncate() 124 | for line in lines: 125 | if 'QT_EDITION' in line: 126 | line = 'QT_EDITION = OpenSource' 127 | f.write(line) 128 | except IOError as e: 129 | print("Configuration file generation error: %s" % e.args) 130 | exc_buffer = StringIO() 131 | traceback.print_exc(file=exc_buffer) 132 | logging.error('Error happened when writing configuration files:\n%s', exc_buffer.getvalue()) 133 | raise e 134 | else: 135 | exit(1) 136 | 137 | 138 | class Metalink: 139 | '''Download .meta4 metalink version4 xml file and parse it.''' 140 | 141 | def __init__(self, url): 142 | self.mirrors = {} 143 | self.url = url 144 | try: 145 | m = requests.get(url + '.meta4') 146 | except requests.exceptions.ConnectionError: 147 | return 148 | else: 149 | mirror_xml = ElementTree.fromstring(m.text) 150 | for f in mirror_xml.iter("{urn:ietf:params:xml:ns:metalink}file"): 151 | for u in f.iter("{urn:ietf:params:xml:ns:metalink}url"): 152 | pri = u.attrib['priority'] 153 | self.mirrors[pri] = u.text 154 | 155 | def altlink(self, priority=None, blacklist=None): 156 | if len(self.mirrors) == 0: 157 | # no alternative 158 | return self.url 159 | if priority is None: 160 | if blacklist is not None: 161 | for ind in range(len(self.mirrors)): 162 | mirror = self.mirrors[str(ind + 1)] 163 | black = False 164 | for b in blacklist: 165 | if mirror.startswith(b): 166 | black = True 167 | continue 168 | if black: 169 | continue 170 | return mirror 171 | else: 172 | for ind in range(len(self.mirrors)): 173 | mirror = self.mirrors[str(ind + 1)] 174 | if mirror == self.candidate: 175 | continue 176 | return mirror 177 | else: 178 | return self.mirrors[str(priority)] 179 | -------------------------------------------------------------------------------- /docs/make.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | 3 | REM Command file for Sphinx documentation 4 | 5 | if "%SPHINXBUILD%" == "" ( 6 | set SPHINXBUILD=sphinx-build 7 | ) 8 | set BUILDDIR=_build 9 | set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% . 10 | set I18NSPHINXOPTS=%SPHINXOPTS% . 11 | if NOT "%PAPER%" == "" ( 12 | set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS% 13 | set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS% 14 | ) 15 | 16 | if "%1" == "" goto help 17 | 18 | if "%1" == "help" ( 19 | :help 20 | echo.Please use `make ^` where ^ is one of 21 | echo. html to make standalone HTML files 22 | echo. dirhtml to make HTML files named index.html in directories 23 | echo. singlehtml to make a single large HTML file 24 | echo. pickle to make pickle files 25 | echo. json to make JSON files 26 | echo. htmlhelp to make HTML files and a HTML help project 27 | echo. qthelp to make HTML files and a qthelp project 28 | echo. devhelp to make HTML files and a Devhelp project 29 | echo. epub to make an epub 30 | echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter 31 | echo. text to make text files 32 | echo. man to make manual pages 33 | echo. texinfo to make Texinfo files 34 | echo. gettext to make PO message catalogs 35 | echo. changes to make an overview over all changed/added/deprecated items 36 | echo. xml to make Docutils-native XML files 37 | echo. pseudoxml to make pseudoxml-XML files for display purposes 38 | echo. linkcheck to check all external links for integrity 39 | echo. doctest to run all doctests embedded in the documentation if enabled 40 | echo. coverage to run coverage check of the documentation if enabled 41 | goto end 42 | ) 43 | 44 | if "%1" == "clean" ( 45 | for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i 46 | del /q /s %BUILDDIR%\* 47 | goto end 48 | ) 49 | 50 | 51 | REM Check if sphinx-build is available and fallback to Python version if any 52 | %SPHINXBUILD% 1>NUL 2>NUL 53 | if errorlevel 9009 goto sphinx_python 54 | goto sphinx_ok 55 | 56 | :sphinx_python 57 | 58 | set SPHINXBUILD=python -m sphinx.__init__ 59 | %SPHINXBUILD% 2> nul 60 | if errorlevel 9009 ( 61 | echo. 62 | echo.The 'sphinx-build' command was not found. Make sure you have Sphinx 63 | echo.installed, then set the SPHINXBUILD environment variable to point 64 | echo.to the full path of the 'sphinx-build' executable. Alternatively you 65 | echo.may add the Sphinx directory to PATH. 66 | echo. 67 | echo.If you don't have Sphinx installed, grab it from 68 | echo.http://sphinx-doc.org/ 69 | exit /b 1 70 | ) 71 | 72 | :sphinx_ok 73 | 74 | 75 | if "%1" == "html" ( 76 | %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html 77 | if errorlevel 1 exit /b 1 78 | echo. 79 | echo.Build finished. The HTML pages are in %BUILDDIR%/html. 80 | goto end 81 | ) 82 | 83 | if "%1" == "dirhtml" ( 84 | %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml 85 | if errorlevel 1 exit /b 1 86 | echo. 87 | echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml. 88 | goto end 89 | ) 90 | 91 | if "%1" == "singlehtml" ( 92 | %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml 93 | if errorlevel 1 exit /b 1 94 | echo. 95 | echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml. 96 | goto end 97 | ) 98 | 99 | if "%1" == "pickle" ( 100 | %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle 101 | if errorlevel 1 exit /b 1 102 | echo. 103 | echo.Build finished; now you can process the pickle files. 104 | goto end 105 | ) 106 | 107 | if "%1" == "json" ( 108 | %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json 109 | if errorlevel 1 exit /b 1 110 | echo. 111 | echo.Build finished; now you can process the JSON files. 112 | goto end 113 | ) 114 | 115 | if "%1" == "htmlhelp" ( 116 | %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp 117 | if errorlevel 1 exit /b 1 118 | echo. 119 | echo.Build finished; now you can run HTML Help Workshop with the ^ 120 | .hhp project file in %BUILDDIR%/htmlhelp. 121 | goto end 122 | ) 123 | 124 | if "%1" == "qthelp" ( 125 | %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp 126 | if errorlevel 1 exit /b 1 127 | echo. 128 | echo.Build finished; now you can run "qcollectiongenerator" with the ^ 129 | .qhcp project file in %BUILDDIR%/qthelp, like this: 130 | echo.^> qcollectiongenerator %BUILDDIR%\qthelp\aqtinstall.qhcp 131 | echo.To view the help file: 132 | echo.^> assistant -collectionFile %BUILDDIR%\qthelp\aqtinstall.ghc 133 | goto end 134 | ) 135 | 136 | if "%1" == "devhelp" ( 137 | %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp 138 | if errorlevel 1 exit /b 1 139 | echo. 140 | echo.Build finished. 141 | goto end 142 | ) 143 | 144 | if "%1" == "epub" ( 145 | %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub 146 | if errorlevel 1 exit /b 1 147 | echo. 148 | echo.Build finished. The epub file is in %BUILDDIR%/epub. 149 | goto end 150 | ) 151 | 152 | if "%1" == "latex" ( 153 | %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex 154 | if errorlevel 1 exit /b 1 155 | echo. 156 | echo.Build finished; the LaTeX files are in %BUILDDIR%/latex. 157 | goto end 158 | ) 159 | 160 | if "%1" == "latexpdf" ( 161 | %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex 162 | cd %BUILDDIR%/latex 163 | make all-pdf 164 | cd %~dp0 165 | echo. 166 | echo.Build finished; the PDF files are in %BUILDDIR%/latex. 167 | goto end 168 | ) 169 | 170 | if "%1" == "latexpdfja" ( 171 | %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex 172 | cd %BUILDDIR%/latex 173 | make all-pdf-ja 174 | cd %~dp0 175 | echo. 176 | echo.Build finished; the PDF files are in %BUILDDIR%/latex. 177 | goto end 178 | ) 179 | 180 | if "%1" == "text" ( 181 | %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text 182 | if errorlevel 1 exit /b 1 183 | echo. 184 | echo.Build finished. The text files are in %BUILDDIR%/text. 185 | goto end 186 | ) 187 | 188 | if "%1" == "man" ( 189 | %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man 190 | if errorlevel 1 exit /b 1 191 | echo. 192 | echo.Build finished. The manual pages are in %BUILDDIR%/man. 193 | goto end 194 | ) 195 | 196 | if "%1" == "texinfo" ( 197 | %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo 198 | if errorlevel 1 exit /b 1 199 | echo. 200 | echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo. 201 | goto end 202 | ) 203 | 204 | if "%1" == "gettext" ( 205 | %SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale 206 | if errorlevel 1 exit /b 1 207 | echo. 208 | echo.Build finished. The message catalogs are in %BUILDDIR%/locale. 209 | goto end 210 | ) 211 | 212 | if "%1" == "changes" ( 213 | %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes 214 | if errorlevel 1 exit /b 1 215 | echo. 216 | echo.The overview file is in %BUILDDIR%/changes. 217 | goto end 218 | ) 219 | 220 | if "%1" == "linkcheck" ( 221 | %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck 222 | if errorlevel 1 exit /b 1 223 | echo. 224 | echo.Link check complete; look for any errors in the above output ^ 225 | or in %BUILDDIR%/linkcheck/output.txt. 226 | goto end 227 | ) 228 | 229 | if "%1" == "doctest" ( 230 | %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest 231 | if errorlevel 1 exit /b 1 232 | echo. 233 | echo.Testing of doctests in the sources finished, look at the ^ 234 | results in %BUILDDIR%/doctest/output.txt. 235 | goto end 236 | ) 237 | 238 | if "%1" == "coverage" ( 239 | %SPHINXBUILD% -b coverage %ALLSPHINXOPTS% %BUILDDIR%/coverage 240 | if errorlevel 1 exit /b 1 241 | echo. 242 | echo.Testing of coverage in the sources finished, look at the ^ 243 | results in %BUILDDIR%/coverage/python.txt. 244 | goto end 245 | ) 246 | 247 | if "%1" == "xml" ( 248 | %SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml 249 | if errorlevel 1 exit /b 1 250 | echo. 251 | echo.Build finished. The XML files are in %BUILDDIR%/xml. 252 | goto end 253 | ) 254 | 255 | if "%1" == "pseudoxml" ( 256 | %SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml 257 | if errorlevel 1 exit /b 1 258 | echo. 259 | echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml. 260 | goto end 261 | ) 262 | 263 | :end 264 | -------------------------------------------------------------------------------- /docs/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line. 5 | SPHINXOPTS = 6 | SPHINXBUILD = sphinx-build 7 | PAPER = 8 | BUILDDIR = _build 9 | 10 | # User-friendly check for sphinx-build 11 | ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) 12 | $(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/) 13 | endif 14 | 15 | # Internal variables. 16 | PAPEROPT_a4 = -D latex_paper_size=a4 17 | PAPEROPT_letter = -D latex_paper_size=letter 18 | ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . 19 | # the i18n builder cannot share the environment and doctrees with the others 20 | I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . 21 | 22 | .PHONY: help 23 | help: 24 | @echo "Please use \`make ' where is one of" 25 | @echo " html to make standalone HTML files" 26 | @echo " dirhtml to make HTML files named index.html in directories" 27 | @echo " singlehtml to make a single large HTML file" 28 | @echo " pickle to make pickle files" 29 | @echo " json to make JSON files" 30 | @echo " htmlhelp to make HTML files and a HTML help project" 31 | @echo " qthelp to make HTML files and a qthelp project" 32 | @echo " applehelp to make an Apple Help Book" 33 | @echo " devhelp to make HTML files and a Devhelp project" 34 | @echo " epub to make an epub" 35 | @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" 36 | @echo " latexpdf to make LaTeX files and run them through pdflatex" 37 | @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" 38 | @echo " text to make text files" 39 | @echo " man to make manual pages" 40 | @echo " texinfo to make Texinfo files" 41 | @echo " info to make Texinfo files and run them through makeinfo" 42 | @echo " gettext to make PO message catalogs" 43 | @echo " changes to make an overview of all changed/added/deprecated items" 44 | @echo " xml to make Docutils-native XML files" 45 | @echo " pseudoxml to make pseudoxml-XML files for display purposes" 46 | @echo " linkcheck to check all external links for integrity" 47 | @echo " doctest to run all doctests embedded in the documentation (if enabled)" 48 | @echo " coverage to run coverage check of the documentation (if enabled)" 49 | 50 | .PHONY: clean 51 | clean: 52 | rm -rf $(BUILDDIR)/* 53 | 54 | .PHONY: html 55 | html: 56 | $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html 57 | @echo 58 | @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." 59 | 60 | .PHONY: dirhtml 61 | dirhtml: 62 | $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml 63 | @echo 64 | @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." 65 | 66 | .PHONY: singlehtml 67 | singlehtml: 68 | $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml 69 | @echo 70 | @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." 71 | 72 | .PHONY: pickle 73 | pickle: 74 | $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle 75 | @echo 76 | @echo "Build finished; now you can process the pickle files." 77 | 78 | .PHONY: json 79 | json: 80 | $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json 81 | @echo 82 | @echo "Build finished; now you can process the JSON files." 83 | 84 | .PHONY: htmlhelp 85 | htmlhelp: 86 | $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp 87 | @echo 88 | @echo "Build finished; now you can run HTML Help Workshop with the" \ 89 | ".hhp project file in $(BUILDDIR)/htmlhelp." 90 | 91 | .PHONY: qthelp 92 | qthelp: 93 | $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp 94 | @echo 95 | @echo "Build finished; now you can run "qcollectiongenerator" with the" \ 96 | ".qhcp project file in $(BUILDDIR)/qthelp, like this:" 97 | @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/aqtinstall.qhcp" 98 | @echo "To view the help file:" 99 | @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/aqtinstall.qhc" 100 | 101 | .PHONY: applehelp 102 | applehelp: 103 | $(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp 104 | @echo 105 | @echo "Build finished. The help book is in $(BUILDDIR)/applehelp." 106 | @echo "N.B. You won't be able to view it unless you put it in" \ 107 | "~/Library/Documentation/Help or install it in your application" \ 108 | "bundle." 109 | 110 | .PHONY: devhelp 111 | devhelp: 112 | $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp 113 | @echo 114 | @echo "Build finished." 115 | @echo "To view the help file:" 116 | @echo "# mkdir -p $$HOME/.local/share/devhelp/aqtinstall" 117 | @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/aqtinstall" 118 | @echo "# devhelp" 119 | 120 | .PHONY: epub 121 | epub: 122 | $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub 123 | @echo 124 | @echo "Build finished. The epub file is in $(BUILDDIR)/epub." 125 | 126 | .PHONY: latex 127 | latex: 128 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 129 | @echo 130 | @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." 131 | @echo "Run \`make' in that directory to run these through (pdf)latex" \ 132 | "(use \`make latexpdf' here to do that automatically)." 133 | 134 | .PHONY: latexpdf 135 | latexpdf: 136 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 137 | @echo "Running LaTeX files through pdflatex..." 138 | $(MAKE) -C $(BUILDDIR)/latex all-pdf 139 | @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." 140 | 141 | .PHONY: latexpdfja 142 | latexpdfja: 143 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 144 | @echo "Running LaTeX files through platex and dvipdfmx..." 145 | $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja 146 | @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." 147 | 148 | .PHONY: text 149 | text: 150 | $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text 151 | @echo 152 | @echo "Build finished. The text files are in $(BUILDDIR)/text." 153 | 154 | .PHONY: man 155 | man: 156 | $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man 157 | @echo 158 | @echo "Build finished. The manual pages are in $(BUILDDIR)/man." 159 | 160 | .PHONY: texinfo 161 | texinfo: 162 | $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo 163 | @echo 164 | @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." 165 | @echo "Run \`make' in that directory to run these through makeinfo" \ 166 | "(use \`make info' here to do that automatically)." 167 | 168 | .PHONY: info 169 | info: 170 | $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo 171 | @echo "Running Texinfo files through makeinfo..." 172 | make -C $(BUILDDIR)/texinfo info 173 | @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." 174 | 175 | .PHONY: gettext 176 | gettext: 177 | $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale 178 | @echo 179 | @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." 180 | 181 | .PHONY: changes 182 | changes: 183 | $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes 184 | @echo 185 | @echo "The overview file is in $(BUILDDIR)/changes." 186 | 187 | .PHONY: linkcheck 188 | linkcheck: 189 | $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck 190 | @echo 191 | @echo "Link check complete; look for any errors in the above output " \ 192 | "or in $(BUILDDIR)/linkcheck/output.txt." 193 | 194 | .PHONY: doctest 195 | doctest: 196 | $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest 197 | @echo "Testing of doctests in the sources finished, look at the " \ 198 | "results in $(BUILDDIR)/doctest/output.txt." 199 | 200 | .PHONY: coverage 201 | coverage: 202 | $(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage 203 | @echo "Testing of coverage in the sources finished, look at the " \ 204 | "results in $(BUILDDIR)/coverage/python.txt." 205 | 206 | .PHONY: xml 207 | xml: 208 | $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml 209 | @echo 210 | @echo "Build finished. The XML files are in $(BUILDDIR)/xml." 211 | 212 | .PHONY: pseudoxml 213 | pseudoxml: 214 | $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml 215 | @echo 216 | @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." 217 | -------------------------------------------------------------------------------- /docs/conf.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # aqtinstall documentation build configuration file, created by 4 | # sphinx-quickstart on Sat Mar 23 20:07:58 2019. 5 | # 6 | # This file is execfile()d with the current directory set to its 7 | # containing dir. 8 | # 9 | # Note that not all possible configuration values are present in this 10 | # autogenerated file. 11 | # 12 | # All configuration values have a default; values that are commented out 13 | # serve to show the default. 14 | 15 | import sys 16 | import os 17 | 18 | # If extensions (or modules to document with autodoc) are in another directory, 19 | # add these directories to sys.path here. If the directory is relative to the 20 | # documentation root, use os.path.abspath to make it absolute, like shown here. 21 | #sys.path.insert(0, os.path.abspath('.')) 22 | 23 | # -- General configuration ------------------------------------------------ 24 | 25 | # If your documentation needs a minimal Sphinx version, state it here. 26 | #needs_sphinx = '1.0' 27 | 28 | # Add any Sphinx extension module names here, as strings. They can be 29 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom 30 | # ones. 31 | extensions = [ 32 | 'sphinx.ext.autodoc', 33 | 'sphinx.ext.coverage', 34 | ] 35 | 36 | # Add any paths that contain templates here, relative to this directory. 37 | templates_path = ['_templates'] 38 | 39 | # The suffix(es) of source filenames. 40 | # You can specify multiple suffix as a list of string: 41 | # source_suffix = ['.rst', '.md'] 42 | source_suffix = '.rst' 43 | 44 | # The encoding of source files. 45 | #source_encoding = 'utf-8-sig' 46 | 47 | # The master toctree document. 48 | master_doc = 'index' 49 | 50 | # General information about the project. 51 | project = u'aqtinstall' 52 | copyright = u'2019, Hiroshi Miura' 53 | author = u'Hiroshi Miura' 54 | 55 | # The version info for the project you're documenting, acts as replacement for 56 | # |version| and |release|, also used in various other places throughout the 57 | # built documents. 58 | # 59 | # The short X.Y version. 60 | version = u'0.3' 61 | # The full version, including alpha/beta/rc tags. 62 | release = u'0.3.1' 63 | 64 | # The language for content autogenerated by Sphinx. Refer to documentation 65 | # for a list of supported languages. 66 | # 67 | # This is also used if you do content translation via gettext catalogs. 68 | # Usually you set "language" from the command line for these cases. 69 | language = None 70 | 71 | # There are two options for replacing |today|: either, you set today to some 72 | # non-false value, then it is used: 73 | #today = '' 74 | # Else, today_fmt is used as the format for a strftime call. 75 | #today_fmt = '%B %d, %Y' 76 | 77 | # List of patterns, relative to source directory, that match files and 78 | # directories to ignore when looking for source files. 79 | exclude_patterns = ['_build'] 80 | 81 | # The reST default role (used for this markup: `text`) to use for all 82 | # documents. 83 | #default_role = None 84 | 85 | # If true, '()' will be appended to :func: etc. cross-reference text. 86 | #add_function_parentheses = True 87 | 88 | # If true, the current module name will be prepended to all description 89 | # unit titles (such as .. function::). 90 | #add_module_names = True 91 | 92 | # If true, sectionauthor and moduleauthor directives will be shown in the 93 | # output. They are ignored by default. 94 | #show_authors = False 95 | 96 | # The name of the Pygments (syntax highlighting) style to use. 97 | pygments_style = 'sphinx' 98 | 99 | # A list of ignored prefixes for module index sorting. 100 | #modindex_common_prefix = [] 101 | 102 | # If true, keep warnings as "system message" paragraphs in the built documents. 103 | #keep_warnings = False 104 | 105 | # If true, `todo` and `todoList` produce output, else they produce nothing. 106 | todo_include_todos = False 107 | 108 | 109 | # -- Options for HTML output ---------------------------------------------- 110 | 111 | # The theme to use for HTML and HTML Help pages. See the documentation for 112 | # a list of builtin themes. 113 | html_theme = 'sphinx_rtd_theme' 114 | 115 | # Theme options are theme-specific and customize the look and feel of a theme 116 | # further. For a list of options available for each theme, see the 117 | # documentation. 118 | #html_theme_options = {} 119 | 120 | # Add any paths that contain custom themes here, relative to this directory. 121 | #html_theme_path = [] 122 | 123 | # The name for this set of Sphinx documents. If None, it defaults to 124 | # " v documentation". 125 | #html_title = None 126 | 127 | # A shorter title for the navigation bar. Default is the same as html_title. 128 | #html_short_title = None 129 | 130 | # The name of an image file (relative to this directory) to place at the top 131 | # of the sidebar. 132 | #html_logo = None 133 | 134 | # The name of an image file (relative to this directory) to use as a favicon of 135 | # the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 136 | # pixels large. 137 | #html_favicon = None 138 | 139 | # Add any paths that contain custom static files (such as style sheets) here, 140 | # relative to this directory. They are copied after the builtin static files, 141 | # so a file named "default.css" will overwrite the builtin "default.css". 142 | html_static_path = ['_static'] 143 | 144 | # Add any extra paths that contain custom files (such as robots.txt or 145 | # .htaccess) here, relative to this directory. These files are copied 146 | # directly to the root of the documentation. 147 | #html_extra_path = [] 148 | 149 | # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, 150 | # using the given strftime format. 151 | #html_last_updated_fmt = '%b %d, %Y' 152 | 153 | # If true, SmartyPants will be used to convert quotes and dashes to 154 | # typographically correct entities. 155 | #html_use_smartypants = True 156 | 157 | # Custom sidebar templates, maps document names to template names. 158 | #html_sidebars = {} 159 | 160 | # Additional templates that should be rendered to pages, maps page names to 161 | # template names. 162 | #html_additional_pages = {} 163 | 164 | # If false, no module index is generated. 165 | #html_domain_indices = True 166 | 167 | # If false, no index is generated. 168 | #html_use_index = True 169 | 170 | # If true, the index is split into individual pages for each letter. 171 | #html_split_index = False 172 | 173 | # If true, links to the reST sources are added to the pages. 174 | #html_show_sourcelink = True 175 | 176 | # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. 177 | #html_show_sphinx = True 178 | 179 | # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. 180 | #html_show_copyright = True 181 | 182 | # If true, an OpenSearch description file will be output, and all pages will 183 | # contain a tag referring to it. The value of this option must be the 184 | # base URL from which the finished HTML is served. 185 | #html_use_opensearch = '' 186 | 187 | # This is the file name suffix for HTML files (e.g. ".xhtml"). 188 | #html_file_suffix = None 189 | 190 | # Language to be used for generating the HTML full-text search index. 191 | # Sphinx supports the following languages: 192 | # 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja' 193 | # 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr' 194 | #html_search_language = 'en' 195 | 196 | # A dictionary with options for the search language support, empty by default. 197 | # Now only 'ja' uses this config value 198 | #html_search_options = {'type': 'default'} 199 | 200 | # The name of a javascript file (relative to the configuration directory) that 201 | # implements a search results scorer. If empty, the default will be used. 202 | #html_search_scorer = 'scorer.js' 203 | 204 | # Output file base name for HTML help builder. 205 | htmlhelp_basename = 'aqtinstalldoc' 206 | 207 | # -- Options for LaTeX output --------------------------------------------- 208 | 209 | latex_elements = { 210 | # The paper size ('letterpaper' or 'a4paper'). 211 | #'papersize': 'letterpaper', 212 | 213 | # The font size ('10pt', '11pt' or '12pt'). 214 | #'pointsize': '10pt', 215 | 216 | # Additional stuff for the LaTeX preamble. 217 | #'preamble': '', 218 | 219 | # Latex figure (float) alignment 220 | #'figure_align': 'htbp', 221 | } 222 | 223 | # Grouping the document tree into LaTeX files. List of tuples 224 | # (source start file, target name, title, 225 | # author, documentclass [howto, manual, or own class]). 226 | latex_documents = [ 227 | (master_doc, 'aqtinstall.tex', u'aqtinstall Documentation', 228 | u'Hiroshi Miura', 'manual'), 229 | ] 230 | 231 | # The name of an image file (relative to this directory) to place at the top of 232 | # the title page. 233 | #latex_logo = None 234 | 235 | # For "manual" documents, if this is true, then toplevel headings are parts, 236 | # not chapters. 237 | #latex_use_parts = False 238 | 239 | # If true, show page references after internal links. 240 | #latex_show_pagerefs = False 241 | 242 | # If true, show URL addresses after external links. 243 | #latex_show_urls = False 244 | 245 | # Documents to append as an appendix to all manuals. 246 | #latex_appendices = [] 247 | 248 | # If false, no module index is generated. 249 | #latex_domain_indices = True 250 | 251 | 252 | # -- Options for manual page output --------------------------------------- 253 | 254 | # One entry per manual page. List of tuples 255 | # (source start file, name, description, authors, manual section). 256 | man_pages = [ 257 | (master_doc, 'aqtinstall', u'aqtinstall Documentation', 258 | [author], 1) 259 | ] 260 | 261 | # If true, show URL addresses after external links. 262 | #man_show_urls = False 263 | 264 | 265 | # -- Options for Texinfo output ------------------------------------------- 266 | 267 | # Grouping the document tree into Texinfo files. List of tuples 268 | # (source start file, target name, title, author, 269 | # dir menu entry, description, category) 270 | texinfo_documents = [ 271 | (master_doc, 'aqtinstall', u'aqtinstall Documentation', 272 | author, 'aqtinstall', 'One line description of project.', 273 | 'Miscellaneous'), 274 | ] 275 | 276 | # Documents to append as an appendix to all manuals. 277 | #texinfo_appendices = [] 278 | 279 | # If false, no module index is generated. 280 | #texinfo_domain_indices = True 281 | 282 | # How to display URL addresses: 'footnote', 'no', or 'inline'. 283 | #texinfo_show_urls = 'footnote' 284 | 285 | # If true, do not generate a @detailmenu in the "Top" node's menu. 286 | #texinfo_no_detailmenu = False 287 | --------------------------------------------------------------------------------