mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-26 23:24:13 +08:00
build
This commit is contained in:
parent
7c885c5a90
commit
4427d28613
15
.github/scripts/build_lunahook.py
vendored
15
.github/scripts/build_lunahook.py
vendored
@ -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}'
|
rf'"C:\Program Files\7-Zip\7z.exe" a -m0=Deflate -mx9 {target} {targetdir}'
|
||||||
)
|
)
|
||||||
exit()
|
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(sys.version)
|
||||||
print(__file__)
|
print(__file__)
|
||||||
print(rootDir)
|
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):
|
def build_langx(lang, bit, onlycore):
|
||||||
config = (
|
config = (
|
||||||
f"-DBUILD_PLUGIN=OFF -DWINXP=OFF -DLANGUAGE={lang} -DBUILD_GUI=ON -DBUILD_CLI=ON"
|
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")
|
os.system(f"cmd /c do.bat")
|
||||||
|
|
||||||
|
|
||||||
# installVCLTL()
|
|
||||||
os.chdir(os.path.join(rootDir, "scripts"))
|
os.chdir(os.path.join(rootDir, "scripts"))
|
||||||
if sys.argv[1] == "plg32":
|
if sys.argv[1] == "plg32":
|
||||||
os.system(f"cmd /c buildplugin32.bat")
|
os.system(f"cmd /c buildplugin32.bat")
|
||||||
|
11
.github/scripts/packlunahook.py
vendored
11
.github/scripts/packlunahook.py
vendored
@ -7,11 +7,12 @@ if not rootDir:
|
|||||||
rootDir=os.path.abspath(os.path.join(rootDir,'../../cpp/LunaHook'))
|
rootDir=os.path.abspath(os.path.join(rootDir,'../../cpp/LunaHook'))
|
||||||
|
|
||||||
os.chdir(rootDir)
|
os.chdir(rootDir)
|
||||||
for f in os.listdir("builds"):
|
os.chdir('./builds')
|
||||||
if os.path.isdir("builds/" + f) == False:
|
for f in os.listdir("."):
|
||||||
|
if os.path.isdir("./" + f) == False:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
for dirname, _, fs in os.walk("builds/" + f):
|
for dirname, _, fs in os.walk("./" + f):
|
||||||
if (
|
if (
|
||||||
dirname.endswith("translations")
|
dirname.endswith("translations")
|
||||||
or dirname.endswith("translations")
|
or dirname.endswith("translations")
|
||||||
@ -31,8 +32,8 @@ for f in os.listdir("builds"):
|
|||||||
"D3Dcompiler_47.dll",
|
"D3Dcompiler_47.dll",
|
||||||
]:
|
]:
|
||||||
os.remove(path)
|
os.remove(path)
|
||||||
targetdir = "builds/" + f
|
targetdir = "./" + f
|
||||||
target = "builds/" + f + ".zip"
|
target = "./" + f + ".zip"
|
||||||
os.system(
|
os.system(
|
||||||
rf'"C:\Program Files\7-Zip\7z.exe" a -m0=Deflate -mx9 {target} {targetdir}'
|
rf'"C:\Program Files\7-Zip\7z.exe" a -m0=Deflate -mx9 {target} {targetdir}'
|
||||||
)
|
)
|
||||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -45,3 +45,5 @@ cpp/libs/onnxruntime-static.zip
|
|||||||
cpp/libs/onnxruntime-static/onnxruntime-static.7z
|
cpp/libs/onnxruntime-static/onnxruntime-static.7z
|
||||||
cpp/libs/opencv-static/opencv-static.7z
|
cpp/libs/opencv-static/opencv-static.7z
|
||||||
cpp/LunaHook/.vscode/settings.json
|
cpp/LunaHook/.vscode/settings.json
|
||||||
|
cpp/LunaHook/YY-Thunks
|
||||||
|
cpp/LunaHook/scripts/YY-Thunks-1.0.7-Binary.zip
|
||||||
|
@ -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 -DBUILD_GUI=ON -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
|
@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
|
call dobuildxp.bat
|
@ -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
|
|
@ -10,4 +10,11 @@ for f in ['../build/x86_zh_xp','../build/x86_xp']:
|
|||||||
file=pf.read()
|
file=pf.read()
|
||||||
file=file.replace('>v143<','>v141_xp<')
|
file=file.replace('>v143<','>v141_xp<')
|
||||||
with open(path,'w',encoding='utf-8-sig') as pf:
|
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")
|
Loading…
x
Reference in New Issue
Block a user