mirror of
https://github.com/miurahr/aqtinstall.git
synced 2025-12-18 05:04:38 +03:00
@@ -29,7 +29,8 @@ from aqt.installer import QtInstaller
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description='Install Qt SDK.', formatter_class=RawTextHelpFormatter, add_help=True)
|
||||
parser = argparse.ArgumentParser(description='Install Qt SDK.',
|
||||
formatter_class=RawTextHelpFormatter, add_help=True)
|
||||
parser.add_argument("qt_version", help="Qt version in the format of \"5.X.Y\"")
|
||||
parser.add_argument('host', choices=['linux', 'mac', 'windows'], help="host os name")
|
||||
parser.add_argument('target', choices=['desktop', 'android', 'ios'], help="target sdk")
|
||||
|
||||
@@ -94,4 +94,3 @@ class QtArchives:
|
||||
|
||||
def get_archives(self):
|
||||
return self.archives
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ class QtInstaller:
|
||||
urllib.request.urlretrieve(url, archive)
|
||||
sys.stdout.write("\033[K")
|
||||
print("-Extracting {}...".format(archive))
|
||||
if platform.system() is 'Windows':
|
||||
if platform.system() == 'Windows':
|
||||
subprocess.run([r'C:\Program Files\7-Zip\7z.exe', 'x', '-aoa', '-y', archive])
|
||||
else:
|
||||
subprocess.run([r'7z', 'x', '-aoa', '-y', archive])
|
||||
@@ -88,6 +88,5 @@ class QtInstaller:
|
||||
if 'QT_EDITION' in line:
|
||||
line = 'QT_EDITION = OpenSource'
|
||||
f.write(line)
|
||||
except:
|
||||
except IOError:
|
||||
pass
|
||||
|
||||
|
||||
Reference in New Issue
Block a user