Skip to content

Commit

Permalink
build
Browse files Browse the repository at this point in the history
  • Loading branch information
HIllya51 committed Nov 9, 2024
1 parent 7c885c5 commit 4427d28
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 26 deletions.
15 changes: 0 additions & 15 deletions .github/scripts/build_lunahook.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,25 +34,12 @@
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"
Expand Down Expand Up @@ -95,8 +82,6 @@ def build_langx_xp(lang):
)
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")
Expand Down
11 changes: 6 additions & 5 deletions .github/scripts/packlunahook.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@
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")
Expand All @@ -31,8 +32,8 @@
"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 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions cpp/LunaHook/scripts/build32xp_local.bat
Original file line number Diff line number Diff line change
@@ -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
3 changes: 0 additions & 3 deletions cpp/LunaHook/scripts/buildxpen.bat

This file was deleted.

9 changes: 8 additions & 1 deletion cpp/LunaHook/scripts/edit_target.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,11 @@
file=pf.read()
file=file.replace('>v143<','>v141_xp<')
with open(path,'w',encoding='utf-8-sig') as pf:
pf.write(file)
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")

0 comments on commit 4427d28

Please sign in to comment.