mirror of
https://github.com/HIllya51/LunaHook.git
synced 2025-01-12 04:49:37 +08:00
build
This commit is contained in:
parent
67bbf034c3
commit
d93ecc95a2
10
.github/workflows/release.yml
vendored
10
.github/workflows/release.yml
vendored
@ -16,6 +16,7 @@ jobs:
|
||||
include:
|
||||
- target: Release_English_winxp
|
||||
- target: Release_Chinese_winxp
|
||||
- target: Release_Russian_winxp
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
@ -98,10 +99,9 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- lang: en
|
||||
target: Release_English
|
||||
- lang: zh
|
||||
target: Release_Chinese
|
||||
- target: Release_English
|
||||
- target: Release_Chinese
|
||||
- target: Release_Russian
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
@ -115,7 +115,7 @@ jobs:
|
||||
python-version: '3.11'
|
||||
architecture: x64
|
||||
- name: Run build script
|
||||
run: python build.py ${{ matrix.lang }}
|
||||
run: python build.py ${{ matrix.target }}
|
||||
|
||||
- name: Pack
|
||||
run: python build.py pack
|
||||
|
@ -3,12 +3,16 @@
|
||||
|
||||
#define English 0
|
||||
#define Chinese 1
|
||||
#define Russian 2
|
||||
|
||||
#include"en.h"
|
||||
|
||||
#if (LANGUAGE == Chinese)
|
||||
#include"zh.h"
|
||||
#endif
|
||||
#if (LANGUAGE == Russian)
|
||||
#include"ru.h"
|
||||
#endif
|
||||
|
||||
|
||||
#pragma warning(pop)
|
34
build.py
34
build.py
@ -16,7 +16,25 @@ def installVCLTL():
|
||||
subprocess.run(f"7z x temp\\{vcltlFileName} -otemp\\VC-LTL5")
|
||||
subprocess.run("cmd /c temp\\VC-LTL5\\Install.cmd")
|
||||
|
||||
def build_langx(lang):
|
||||
os.chdir('./scripts')
|
||||
os.system(rf'''
|
||||
cmake -DBUILD_PLUGIN=OFF -DLANGUAGE={lang} ../CMakeLists.txt -G "Visual Studio 17 2022" -A win32 -T host=x86 -B ../build/x86_{lang}
|
||||
cmake --build ../build/x86_{lang} --config Release --target ALL_BUILD -j 14
|
||||
|
||||
cmake -DBUILD_PLUGIN=OFF -DLANGUAGE={lang} ../CMakeLists.txt -G "Visual Studio 17 2022" -A x64 -T host=x64 -B ../build/x64_{lang}
|
||||
cmake --build ../build/x64_{lang} --config Release --target ALL_BUILD -j 14
|
||||
|
||||
''')
|
||||
|
||||
def build_langx_xp(lang):
|
||||
os.chdir('./scripts')
|
||||
os.system(rf'''
|
||||
|
||||
cmake -DBUILD_PLUGIN=OFF -DWINXP=1 -DLANGUAGE={lang} ../CMakeLists.txt -G "Visual Studio 16 2019" -A win32 -T v141_xp -B ../build/x86_{lang}_xp
|
||||
cmake --build ../build/x86_{lang}_xp --config Release --target ALL_BUILD -j 14
|
||||
call dobuildxp.bat
|
||||
''')
|
||||
|
||||
if sys.argv[1]=='pack':
|
||||
os.chdir(os.path.join(rootDir, "scripts"))
|
||||
@ -28,11 +46,15 @@ else:
|
||||
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':
|
||||
build_langx('English')
|
||||
elif sys.argv[1]=='Release_Chinese':
|
||||
build_langx('Chinese')
|
||||
elif sys.argv[1]=='Release_Russian':
|
||||
build_langx('Russian')
|
||||
elif sys.argv[1]=='Release_English_winxp':
|
||||
os.system(f"cmd /c buildxpen.bat")
|
||||
build_langx_xp('English')
|
||||
elif sys.argv[1]=='Release_Chinese_winxp':
|
||||
os.system(f"cmd /c buildxpzh.bat")
|
||||
build_langx_xp('Chinese')
|
||||
elif sys.argv[1]=='Release_Russian_winxp':
|
||||
build_langx_xp('Russian')
|
@ -1,4 +0,0 @@
|
||||
|
||||
cmake -DBUILD_PLUGIN=OFF -DWINXP=1 -DLANGUAGE=Chinese ../CMakeLists.txt -G "Visual Studio 16 2019" -A win32 -T v141_xp -B ../build/x86_zh_xp
|
||||
cmake --build ../build/x86_zh_xp --config Release --target ALL_BUILD -j 14
|
||||
call dobuildxp.bat
|
@ -1,5 +0,0 @@
|
||||
cmake -DBUILD_PLUGIN=OFF -DLANGUAGE=Chinese ../CMakeLists.txt -G "Visual Studio 17 2022" -A win32 -T host=x86 -B ../build/x86_zh
|
||||
cmake --build ../build/x86_zh --config Release --target ALL_BUILD -j 14
|
||||
|
||||
cmake -DBUILD_PLUGIN=OFF -DLANGUAGE=Chinese ../CMakeLists.txt -G "Visual Studio 17 2022" -A x64 -T host=x64 -B ../build/x64_zh
|
||||
cmake --build ../build/x64_zh --config Release --target ALL_BUILD -j 14
|
Loading…
x
Reference in New Issue
Block a user