diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f9c74f7..2f2d541 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 diff --git a/Lang/Lang.h b/Lang/Lang.h index 06d7ffe..f361e0c 100644 --- a/Lang/Lang.h +++ b/Lang/Lang.h @@ -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) \ No newline at end of file diff --git a/build.py b/build.py index fd39b01..31e4943 100644 --- a/build.py +++ b/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") \ No newline at end of file + build_langx_xp('Chinese') + elif sys.argv[1]=='Release_Russian_winxp': + build_langx_xp('Russian') \ No newline at end of file diff --git a/scripts/buildxpzh.bat b/scripts/buildxpzh.bat deleted file mode 100644 index 656335c..0000000 --- a/scripts/buildxpzh.bat +++ /dev/null @@ -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 \ No newline at end of file diff --git a/scripts/buildzh.bat b/scripts/buildzh.bat deleted file mode 100644 index a43da61..0000000 --- a/scripts/buildzh.bat +++ /dev/null @@ -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