mirror of
https://github.com/miurahr/aqtinstall.git
synced 2025-12-18 05:04:38 +03:00
Change 7zip default to external utility
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
This commit is contained in:
23
aqt/cli.py
23
aqt/cli.py
@@ -66,21 +66,20 @@ class Cli():
|
||||
os_name = args.host
|
||||
output_dir = args.outputdir
|
||||
mirror = args.base
|
||||
sevenzip = args.external
|
||||
if sevenzip is not None:
|
||||
if sevenzip == '_auto':
|
||||
use_py7zr = args.internal
|
||||
sevenzip = None
|
||||
if not use_py7zr:
|
||||
sevenzip = args.external
|
||||
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')
|
||||
exit(1)
|
||||
elif sys.version_info.major == 2:
|
||||
if platform.system() == 'Windows':
|
||||
sevenzip = r'C:\Program Files\7-Zip\7z.exe'
|
||||
elif os.path.exists(sevenzip):
|
||||
pass
|
||||
else:
|
||||
sevenzip = r'7zr'
|
||||
print('Specified external 7zip command is not exist.')
|
||||
exit(1)
|
||||
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\"")
|
||||
|
||||
Reference in New Issue
Block a user