mirror of
https://github.com/HIllya51/LunaHook.git
synced 2024-10-22 23:18:16 +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:
|
include:
|
||||||
- target: Release_English_winxp
|
- target: Release_English_winxp
|
||||||
- target: Release_Chinese_winxp
|
- target: Release_Chinese_winxp
|
||||||
|
- target: Release_Russian_winxp
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@ -98,10 +99,9 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- lang: en
|
- target: Release_English
|
||||||
target: Release_English
|
- target: Release_Chinese
|
||||||
- lang: zh
|
- target: Release_Russian
|
||||||
target: Release_Chinese
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@ -115,7 +115,7 @@ jobs:
|
|||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
architecture: x64
|
architecture: x64
|
||||||
- name: Run build script
|
- name: Run build script
|
||||||
run: python build.py ${{ matrix.lang }}
|
run: python build.py ${{ matrix.target }}
|
||||||
|
|
||||||
- name: Pack
|
- name: Pack
|
||||||
run: python build.py pack
|
run: python build.py pack
|
||||||
|
@ -3,12 +3,16 @@
|
|||||||
|
|
||||||
#define English 0
|
#define English 0
|
||||||
#define Chinese 1
|
#define Chinese 1
|
||||||
|
#define Russian 2
|
||||||
|
|
||||||
#include"en.h"
|
#include"en.h"
|
||||||
|
|
||||||
#if (LANGUAGE == Chinese)
|
#if (LANGUAGE == Chinese)
|
||||||
#include"zh.h"
|
#include"zh.h"
|
||||||
#endif
|
#endif
|
||||||
|
#if (LANGUAGE == Russian)
|
||||||
|
#include"ru.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#pragma warning(pop)
|
#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(f"7z x temp\\{vcltlFileName} -otemp\\VC-LTL5")
|
||||||
subprocess.run("cmd /c temp\\VC-LTL5\\Install.cmd")
|
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':
|
if sys.argv[1]=='pack':
|
||||||
os.chdir(os.path.join(rootDir, "scripts"))
|
os.chdir(os.path.join(rootDir, "scripts"))
|
||||||
@ -28,11 +46,15 @@ else:
|
|||||||
os.system(f"cmd /c buildplugin32.bat")
|
os.system(f"cmd /c buildplugin32.bat")
|
||||||
elif sys.argv[1]=='plg64':
|
elif sys.argv[1]=='plg64':
|
||||||
os.system(f"cmd /c buildplugin64.bat")
|
os.system(f"cmd /c buildplugin64.bat")
|
||||||
elif sys.argv[1]=='en':
|
elif sys.argv[1]=='Release_English':
|
||||||
os.system(f"cmd /c builden.bat")
|
build_langx('English')
|
||||||
elif sys.argv[1]=='zh':
|
elif sys.argv[1]=='Release_Chinese':
|
||||||
os.system(f"cmd /c buildzh.bat")
|
build_langx('Chinese')
|
||||||
|
elif sys.argv[1]=='Release_Russian':
|
||||||
|
build_langx('Russian')
|
||||||
elif sys.argv[1]=='Release_English_winxp':
|
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':
|
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…
Reference in New Issue
Block a user