mirror of
https://github.com/miurahr/aqtinstall.git
synced 2025-12-18 13:14:37 +03:00
Change 7zip default to external utility
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
This commit is contained in:
11
README.rst
11
README.rst
@@ -33,7 +33,7 @@ This is an utility replacing the official graphical Qt installer. It can
|
||||
automatically download prebuilt Qt binaries for any target (you're not bound to
|
||||
Linux binaries on Linux; you could also download iOS binaries).
|
||||
It's working with Python > 3.5 on Linux, OS X and Windows.
|
||||
|
||||
It is required to install 7zip utility in your platform.
|
||||
|
||||
Install
|
||||
-------
|
||||
@@ -52,19 +52,20 @@ General usage looks like this:
|
||||
.. code-block:: bash
|
||||
|
||||
aqt [-h][--help][-O | --outputdir <directory>][-b | --base <mirror url>][-E | --external <7zip command>] \
|
||||
install <qt-version> <host> <target> [<arch>]
|
||||
[--internal] install <qt-version> <host> <target> [<arch>]
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
python -m aqt [-h][--help][-O | --outputdir <directory>][-b | --base <mirror url>] \
|
||||
install <qt-version> <host> <target> [<arch>]
|
||||
python -m aqt [-h][--help][-O | --outputdir <directory>][-b | --base <mirror url>][-E | --external <7zip command>] \
|
||||
[--internal] install <qt-version> <host> <target> [<arch>]
|
||||
|
||||
* The Qt version is formatted like this: `5.11.3`
|
||||
* Host is one of: `linux`, `mac`, `windows`
|
||||
* Target is one of: `desktop`, `android`, `ios` (iOS only works with mac host)
|
||||
* For android and windows you also need to specify an arch: `win64_msvc2017_64`,
|
||||
`win64_msvc2015_64`, `win32_msvc2015`, `win32_mingw53`, `win64_mingw73`, `android_x86`, `android_armv7`
|
||||
* You can also use external 7zip command instead of internal extration function.
|
||||
* You can also use internal 7zip extractor instead of external 7zip command.
|
||||
* You can specify external 7zip command path.
|
||||
|
||||
|
||||
The Qt packages are installed under current directory as such `Qt<ver>/<ver>/gcc_64/`
|
||||
|
||||
21
aqt/cli.py
21
aqt/cli.py
@@ -66,21 +66,20 @@ class Cli():
|
||||
os_name = args.host
|
||||
output_dir = args.outputdir
|
||||
mirror = args.base
|
||||
use_py7zr = args.internal
|
||||
sevenzip = None
|
||||
if not use_py7zr:
|
||||
sevenzip = args.external
|
||||
if sevenzip is not None:
|
||||
if sevenzip == '_auto':
|
||||
if sevenzip is None:
|
||||
if platform.system() == 'Windows':
|
||||
sevenzip = r'C:\Program Files\7-Zip\7z.exe'
|
||||
else:
|
||||
sevenzip = r'7zr'
|
||||
elif not os.path.exists(sevenzip):
|
||||
print('Specified unexist external command in option -E')
|
||||
elif os.path.exists(sevenzip):
|
||||
pass
|
||||
else:
|
||||
print('Specified external 7zip command is not exist.')
|
||||
exit(1)
|
||||
elif sys.version_info.major == 2:
|
||||
if platform.system() == 'Windows':
|
||||
sevenzip = r'C:\Program Files\7-Zip\7z.exe'
|
||||
else:
|
||||
sevenzip = r'7zr'
|
||||
if arch is None:
|
||||
if os_name == "linux" and target == "desktop":
|
||||
arch = "gcc_64"
|
||||
@@ -140,8 +139,8 @@ class Cli():
|
||||
install_parser.add_argument('-b', '--base', nargs='?',
|
||||
help="Specify mirror base url such as http://mirrors.ocf.berkeley.edu/qt/, "
|
||||
"where 'online' folder exist.")
|
||||
install_parser.add_argument('-E', '--external', nargs='?', const='_auto',
|
||||
help='Use external 7zip command instead of internal extractor.')
|
||||
install_parser.add_argument('-E', '--external', nargs=1, help='Specify external 7zip command path.')
|
||||
install_parser.add_argument('--internal', action='store_true', help='Use internal extractor.')
|
||||
list_parser = subparsers.add_parser('list')
|
||||
list_parser.set_defaults(func=self.run_list)
|
||||
list_parser.add_argument("qt_version", help="Qt version in the format of \"5.X.Y\"")
|
||||
|
||||
@@ -24,7 +24,7 @@ steps:
|
||||
inputs:
|
||||
scriptSource: filePath
|
||||
scriptPath: $(Build.SourcesDirectory)/bin/aqt
|
||||
arguments: install $(QT_VERSION) $(HOST) $(TARGET) $(ARCH) -E
|
||||
arguments: install $(QT_VERSION) $(HOST) $(TARGET) $(ARCH)
|
||||
workingDirectory: $(Build.BinariesDirectory)
|
||||
condition: not(variables['QT_BASE_MIRROR'])
|
||||
displayName: Run Aqt (No Base URL Set)
|
||||
@@ -32,7 +32,7 @@ steps:
|
||||
inputs:
|
||||
scriptSource: filePath
|
||||
scriptPath: $(Build.SourcesDirectory)/bin/aqt
|
||||
arguments: install $(QT_VERSION) $(HOST) $(TARGET) $(ARCH) -b $(QT_BASE_MIRROR) -E
|
||||
arguments: install $(QT_VERSION) $(HOST) $(TARGET) $(ARCH) -b $(QT_BASE_MIRROR)
|
||||
workingDirectory: $(Build.BinariesDirectory)
|
||||
condition: variables['QT_BASE_MIRROR']
|
||||
displayName: Run Aqt (Base URL Set)
|
||||
|
||||
Reference in New Issue
Block a user