This commit is contained in:
恍兮惚兮 2024-11-09 12:24:31 +08:00
parent 7c885c5a90
commit 4427d28613
6 changed files with 18 additions and 26 deletions

View File

@ -34,25 +34,12 @@ if len(sys.argv) and sys.argv[1] == "merge":
rf'"C:\Program Files\7-Zip\7z.exe" a -m0=Deflate -mx9 {target} {targetdir}'
)
exit()
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"
print(sys.version)
print(__file__)
print(rootDir)
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")
def build_langx(lang, bit, onlycore):
config = (
f"-DBUILD_PLUGIN=OFF -DWINXP=OFF -DLANGUAGE={lang} -DBUILD_GUI=ON -DBUILD_CLI=ON"
@ -95,8 +82,6 @@ call dobuildxp.bat
)
os.system(f"cmd /c do.bat")
# installVCLTL()
os.chdir(os.path.join(rootDir, "scripts"))
if sys.argv[1] == "plg32":
os.system(f"cmd /c buildplugin32.bat")

View File

@ -7,11 +7,12 @@ if not rootDir:
rootDir=os.path.abspath(os.path.join(rootDir,'../../cpp/LunaHook'))
os.chdir(rootDir)
for f in os.listdir("builds"):
if os.path.isdir("builds/" + f) == False:
os.chdir('./builds')
for f in os.listdir("."):
if os.path.isdir("./" + f) == False:
continue
for dirname, _, fs in os.walk("builds/" + f):
for dirname, _, fs in os.walk("./" + f):
if (
dirname.endswith("translations")
or dirname.endswith("translations")
@ -31,8 +32,8 @@ for f in os.listdir("builds"):
"D3Dcompiler_47.dll",
]:
os.remove(path)
targetdir = "builds/" + f
target = "builds/" + f + ".zip"
targetdir = "./" + f
target = "./" + f + ".zip"
os.system(
rf'"C:\Program Files\7-Zip\7z.exe" a -m0=Deflate -mx9 {target} {targetdir}'
)

2
.gitignore vendored
View File

@ -45,3 +45,5 @@ cpp/libs/onnxruntime-static.zip
cpp/libs/onnxruntime-static/onnxruntime-static.7z
cpp/libs/opencv-static/opencv-static.7z
cpp/LunaHook/.vscode/settings.json
cpp/LunaHook/YY-Thunks
cpp/LunaHook/scripts/YY-Thunks-1.0.7-Binary.zip

View File

@ -1,3 +1,3 @@
cmake -DBUILD_PLUGIN=OFF -DWINXP=1 ../CMakeLists.txt -G "Visual Studio 17 2022" -A win32 -T host=x86 -B ../build/x86_xp
cmake -DBUILD_PLUGIN=OFF -DWINXP=1 -DLANGUAGE=Chinese ../CMakeLists.txt -G "Visual Studio 17 2022" -A win32 -T host=x86 -B ../build/x86_zh_xp
cmake -DBUILD_PLUGIN=OFF -DBUILD_GUI=ON -DWINXP=1 ../CMakeLists.txt -G "Visual Studio 17 2022" -A win32 -T host=x86 -B ../build/x86_xp
@REM cmake -DBUILD_PLUGIN=OFF -DWINXP=1 -DLANGUAGE=Chinese ../CMakeLists.txt -G "Visual Studio 17 2022" -A win32 -T host=x86 -B ../build/x86_zh_xp
call dobuildxp.bat

View File

@ -1,3 +0,0 @@
cmake -DBUILD_PLUGIN=OFF -DWINXP=1 ../CMakeLists.txt -G "Visual Studio 16 2019" -A win32 -T v141_xp -B ../build/x86_xp
cmake --build ../build/x86_xp --config Release --target ALL_BUILD -j 14
call dobuildxp.bat

View File

@ -11,3 +11,10 @@ for f in ['../build/x86_zh_xp','../build/x86_xp']:
file=file.replace('>v143<','>v141_xp<')
with open(path,'w',encoding='utf-8-sig') as pf:
pf.write(file)
url = "https://github.com/Chuyu-Team/YY-Thunks/releases/download/v1.0.7/YY-Thunks-1.0.7-Binary.zip"
target = "../YY-Thunks/objs/X86/YY_Thunks_for_WinXP.obj"
if os.path.exists(target) == False:
os.system(rf"curl -SLo YY-Thunks-1.0.7-Binary.zip " + url)
os.system(rf"7z x -y YY-Thunks-1.0.7-Binary.zip -o../YY-Thunks")