40 lines
886 B
Python
Raw Normal View History

2020-02-22 12:42:08 +03:00
import sys
import os
import subprocess
import shutil
PLATFORM = sys.argv[1]
VERSION = sys.argv[2]
PATHQIF = sys.argv[3]
if len(PLATFORM) <= 0:
2020-02-22 14:26:54 +03:00
PLATFORM = "linux"
2020-02-22 12:42:08 +03:00
if os.path.isdir(PATHQIF + "/QIF"):
print("if target already executed")
exit(0)
print("PLATFORM=" + PLATFORM)
print("VERSION=" + VERSION)
2021-01-05 12:41:26 +03:00
# Command Example : aqt tool linux tools_ifw 4.0 qt.tools.ifw.40
2020-11-04 13:29:09 +03:00
command = ["aqt",
2020-11-04 13:40:33 +03:00
"tool",
2021-01-20 09:11:33 +03:00
"-b",
"https://mirrors.ocf.berkeley.edu/qt/",
2020-11-04 13:40:33 +03:00
"--outputdir",
PATHQIF,
PLATFORM,
"tools_ifw",
VERSION,
2021-01-05 12:41:26 +03:00
"qt.tools.ifw." + VERSION.replace('.', '')]
2020-11-04 13:40:33 +03:00
print("command=" + " ".join(command))
2020-11-04 13:29:09 +03:00
subprocess.call(command)
2020-02-22 14:26:54 +03:00
os.rename(PATHQIF + "/Tools/QtInstallerFramework/" + VERSION[0:3] + "/bin/",
PATHQIF + "/QIF")
2020-02-22 12:42:08 +03:00
shutil.rmtree(PATHQIF + "/Tools")
os.remove("aqtinstall.log")