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():
|
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("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('host', choices=['linux', 'mac', 'windows'], help="host os name")
|
||||||
parser.add_argument('target', choices=['desktop', 'android', 'ios'], help="target sdk")
|
parser.add_argument('target', choices=['desktop', 'android', 'ios'], help="target sdk")
|
||||||
@@ -65,4 +66,4 @@ def main():
|
|||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
sys.exit(main())
|
sys.exit(main())
|
||||||
|
|||||||
@@ -94,4 +94,3 @@ class QtArchives:
|
|||||||
|
|
||||||
def get_archives(self):
|
def get_archives(self):
|
||||||
return self.archives
|
return self.archives
|
||||||
|
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ class QtInstaller:
|
|||||||
urllib.request.urlretrieve(url, archive)
|
urllib.request.urlretrieve(url, archive)
|
||||||
sys.stdout.write("\033[K")
|
sys.stdout.write("\033[K")
|
||||||
print("-Extracting {}...".format(archive))
|
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])
|
subprocess.run([r'C:\Program Files\7-Zip\7z.exe', 'x', '-aoa', '-y', archive])
|
||||||
else:
|
else:
|
||||||
subprocess.run([r'7z', 'x', '-aoa', '-y', archive])
|
subprocess.run([r'7z', 'x', '-aoa', '-y', archive])
|
||||||
@@ -88,6 +88,5 @@ class QtInstaller:
|
|||||||
if 'QT_EDITION' in line:
|
if 'QT_EDITION' in line:
|
||||||
line = 'QT_EDITION = OpenSource'
|
line = 'QT_EDITION = OpenSource'
|
||||||
f.write(line)
|
f.write(line)
|
||||||
except:
|
except IOError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|||||||
18
setup.py
18
setup.py
@@ -5,18 +5,20 @@ import os
|
|||||||
|
|
||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
|
|
||||||
|
|
||||||
def readme():
|
def readme():
|
||||||
with io.open(os.path.join(os.path.dirname(__file__),'README.rst'), mode="r", encoding="UTF-8") as f:
|
with io.open(os.path.join(os.path.dirname(__file__), 'README.rst'), mode="r", encoding="UTF-8") as f:
|
||||||
return f.read()
|
return f.read()
|
||||||
|
|
||||||
setup(name='aqtinstall',
|
|
||||||
version='0.2.0',
|
setup(name = 'aqtinstall',
|
||||||
description='Another Qt installer',
|
version = '0.2.0',
|
||||||
|
description = 'Another Qt installer',
|
||||||
url='http://github.com/miurahr/qli-installer',
|
url='http://github.com/miurahr/qli-installer',
|
||||||
license='MIT',
|
license ='MIT',
|
||||||
long_description=readme(),
|
long_description=readme(),
|
||||||
author='Hioshi Miura',
|
author ='Hioshi Miura',
|
||||||
author_email='miurahr@linux.com',
|
author_email ='miurahr@linux.com',
|
||||||
packages = ["aqt"],
|
packages = ["aqt"],
|
||||||
scripts = ["aqtinst"]
|
scripts = ["aqtinst"]
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user