mirror of
https://github.com/QuasarApp/CQtDeployer.git
synced 2025-05-08 15:39:35 +00:00
fix path on windows
This commit is contained in:
parent
1960729de9
commit
a090923935
@ -4,14 +4,17 @@ import subprocess
|
||||
import shutil
|
||||
from glob import glob
|
||||
|
||||
def re_path(path):
|
||||
return path.replace('\\', os.sep).replace('/', os.sep)
|
||||
|
||||
PLATFORM = sys.argv[1]
|
||||
VERSION = sys.argv[2]
|
||||
PATHQIF = sys.argv[3]
|
||||
PATHQIF = re_path(sys.argv[3])
|
||||
|
||||
if len(PLATFORM) <= 0:
|
||||
PLATFORM = "linux"
|
||||
|
||||
if os.path.isdir(PATHQIF + "/QIF"):
|
||||
if os.path.isdir(os.path.join(PATHQIF, "QIF")):
|
||||
print("if target already executed")
|
||||
exit(0)
|
||||
|
||||
@ -32,16 +35,17 @@ print("command=" + " ".join(command))
|
||||
|
||||
subprocess.call(command)
|
||||
|
||||
BASEPATHQIF = PATHQIF + "/Tools/QtInstallerFramework/" + VERSION[0:3]
|
||||
BASEPATHQIF = os.path.join(PATHQIF, "Tools", "QtInstallerFramework", VERSION[0:3])
|
||||
|
||||
for file in glob(BASEPATHQIF + "/bin/repogen*"):
|
||||
for file in glob(os.path.join(BASEPATHQIF, "bin", "repogen*")):
|
||||
os.remove(file)
|
||||
for file in glob(BASEPATHQIF + "/bin/archivegen*"):
|
||||
for file in glob(os.path.join(BASEPATHQIF, "bin", "archivegen*")):
|
||||
os.remove(file)
|
||||
for file in glob(BASEPATHQIF + "/bin/devtool*"):
|
||||
for file in glob(os.path.join(BASEPATHQIF, "bin", "devtool*")):
|
||||
os.remove(file)
|
||||
|
||||
os.rename(PATHQIF + "/Tools/QtInstallerFramework/" + VERSION[0:3] + "/bin/",
|
||||
PATHQIF + "/QIF")
|
||||
shutil.rmtree(PATHQIF + "/Tools")
|
||||
os.rename(os.path.join(PATHQIF, "Tools", "QtInstallerFramework", VERSION[0:3], "bin"),
|
||||
os.path.join(PATHQIF, "QIF"))
|
||||
|
||||
shutil.rmtree(os.path.join(PATHQIF, "Tools"))
|
||||
os.remove("aqtinstall.log")
|
||||
|
Loading…
x
Reference in New Issue
Block a user