LunaHook-mirror/build.py
恍兮惚兮 84ae59c6e6 fix
2024-04-26 19:34:44 +08:00

38 lines
1.2 KiB
Python

import os, sys
import subprocess
rootDir = os.path.dirname(__file__)
vcltlFile = "https://github.com/Chuyu-Team/VC-LTL5/releases/download/v5.0.9/VC-LTL-5.0.9-Binary.7z"
vcltlFileName = "VC-LTL-5.0.9-Binary.7z"
def installVCLTL():
os.chdir(rootDir)
if os.path.exists("temp"):
return # already installed
os.makedirs(rootDir + "\\temp", exist_ok=True)
subprocess.run(f"curl -Lo temp\\{vcltlFileName} {vcltlFile}")
subprocess.run(f"7z x temp\\{vcltlFileName} -otemp\\VC-LTL5")
subprocess.run("cmd /c temp\\VC-LTL5\\Install.cmd")
if sys.argv[1]=='pack':
os.chdir(os.path.join(rootDir, "scripts"))
os.system(f"python pack.py pack")
else:
installVCLTL()
os.chdir(os.path.join(rootDir, "scripts"))
if sys.argv[1]=='plg32':
os.system(f"cmd /c buildplugin32.bat")
elif sys.argv[1]=='plg64':
os.system(f"cmd /c buildplugin64.bat")
elif sys.argv[1]=='en':
os.system(f"cmd /c builden.bat")
elif sys.argv[1]=='zh':
os.system(f"cmd /c buildzh.bat")
elif sys.argv[1]=='Release_English_winxp':
os.system(f"cmd /c buildxpen.bat")
elif sys.argv[1]=='Release_Chinese_winxp':
os.system(f"cmd /c buildxpzh.bat")