diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 1c26491..fd3d734 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -14,7 +14,7 @@ Current changes Added ----- -* Option to specify mirror site. +* Option -b | --base to specify mirror site. Changed ------- diff --git a/README.rst b/README.rst index 0db8e14..e885e35 100644 --- a/README.rst +++ b/README.rst @@ -55,8 +55,8 @@ General usage looks like this: .. code-block:: bash - aqt [-h][--help] install [] - python -m aqt [-h][--help] install [] + aqt [-h][--help][-O | --outputdir ][-b | --base ] install [] + python -m aqt [-h][--help][-O | --outputdir ][-b | --base ] install [] * The Qt version is formatted like this: `5.11.3` * Host is one of: `linux`, `mac`, `windows` @@ -72,8 +72,7 @@ run such as follows: .. code-block:: bash C:\> mkdir Qt - C:\> cd Qt - C:\Qt\> aqt install 5.11.3 windows desktop win64_msvc2017_64 + C:\> aqt install -O c:\Qt 5.11.3 windows desktop win64_msvc2017_64 Example: Installing Qt 5.12.0 for Linux: @@ -81,8 +80,7 @@ Example: Installing Qt 5.12.0 for Linux: .. code-block:: bash pip install aqtinstall - cd /opt - sudo aqt install 5.12.0 linux desktop + sudo aqt install --outputdir /opt 5.12.0 linux desktop Example: Installing Android (armv7) Qt 5.10.2: diff --git a/aqt/archives.py b/aqt/archives.py index a6ac890..4fb5c7d 100644 --- a/aqt/archives.py +++ b/aqt/archives.py @@ -44,7 +44,7 @@ class QtPackage: class QtArchives: - BASE_URL = 'https://download.qt.io/online/qtsdkrepository/' + BASE_URL = 'https://download.qt.io' archives = [] base = None @@ -59,9 +59,9 @@ class QtArchives: self.base = self.BASE_URL qt_ver_num = qt_version.replace(".", "") if os_name == 'windows': - archive_url = self.base + os_name + '_x86/' + target + '/' + 'qt5_' + qt_ver_num + '/' + archive_url = self.base + '/online/qtsdkrepository/' + os_name + '_x86/' + target + '/' + 'qt5_' + qt_ver_num + '/' else: - archive_url = self.base + os_name + '_x64/' + target + '/' + 'qt5_' + qt_ver_num + '/' + archive_url = self.base + '/online/qtsdkrepository/' + os_name + '_x64/' + target + '/' + 'qt5_' + qt_ver_num + '/' # Get packages index update_xml_url = "{0}Updates.xml".format(archive_url) diff --git a/aqt/cli.py b/aqt/cli.py index fe1458f..d659201 100644 --- a/aqt/cli.py +++ b/aqt/cli.py @@ -36,7 +36,7 @@ class Cli(): target = args.target os_name = args.host output_dir = args.outputdir - mirror = args.mirror + mirror = args.base if arch is None: if os_name == "linux" and target == "desktop": arch = "gcc_64" @@ -88,7 +88,7 @@ class Cli(): "\nandroid: android_x86, android_armv7") install_parser.add_argument('-O', '--outputdir', nargs='?', help='Target output directory(default current directory)') - install_parser.add_argument('-m', '--mirror', nargs='?', + install_parser.add_argument('-b', '--base', nargs='?', help="Specify mirror base url such as http://mirrors.ocf.berkeley.edu/qt/, " "where 'online' folder exist.") list_parser = subparsers.add_parser('list') diff --git a/docs/cli.rst b/docs/cli.rst index afd0f1b..743d78a 100644 --- a/docs/cli.rst +++ b/docs/cli.rst @@ -51,4 +51,11 @@ long options may be truncated to the shortest unambiguous abbreviation. Display help text -.. option:: +.. option:: --outputdir, -O + + specify output directory. + +.. option:: --base, -b + + specify mirror site base url such as -b 'http://mirrors.ocf.berkeley.edu/qt/' + where 'online' folder exist.