mirror of
https://github.com/HIllya51/LunaHook.git
synced 2024-10-22 23:18:16 +08:00
fix
This commit is contained in:
parent
f85195f2dc
commit
84ae59c6e6
28
.github/workflows/release.yml
vendored
28
.github/workflows/release.yml
vendored
@ -11,6 +11,11 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
build_xp:
|
build_xp:
|
||||||
runs-on: windows-2019
|
runs-on: windows-2019
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- target: Release_English_winxp
|
||||||
|
- target: Release_Chinese_winxp
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@ -23,31 +28,26 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
architecture: x64
|
architecture: x64
|
||||||
|
|
||||||
- name: Run build script 32xp
|
- name: Run build script
|
||||||
run: python build.py xp
|
run: python build.py ${{ matrix.target }}
|
||||||
|
|
||||||
- name: Pack
|
- name: Pack
|
||||||
run: python build.py pack
|
run: python build.py pack
|
||||||
- name: Upload English xp artifact
|
|
||||||
|
- name: Upload artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: Release_English_xp
|
name: ${{ matrix.target }}
|
||||||
path: builds/Release_English_xp.zip
|
path: builds/${{ matrix.target }}.zip
|
||||||
- name: Upload Chinese xp artifact
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: Release_Chinese_xp
|
|
||||||
path: builds/Release_Chinese_xp.zip
|
|
||||||
- name: Release LunaHook
|
- name: Release LunaHook
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
tag_name: ${{ github.event.inputs.create_release }}
|
tag_name: ${{ github.event.inputs.create_release }}
|
||||||
files: |
|
files: builds/${{ matrix.target }}.zip
|
||||||
builds/Release_Chinese_xp.zip
|
|
||||||
builds/Release_English_xp.zip
|
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
build_plugin:
|
build_plugin:
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
strategy:
|
strategy:
|
||||||
|
6
build.py
6
build.py
@ -32,5 +32,7 @@ else:
|
|||||||
os.system(f"cmd /c builden.bat")
|
os.system(f"cmd /c builden.bat")
|
||||||
elif sys.argv[1]=='zh':
|
elif sys.argv[1]=='zh':
|
||||||
os.system(f"cmd /c buildzh.bat")
|
os.system(f"cmd /c buildzh.bat")
|
||||||
elif sys.argv[1]=='xp':
|
elif sys.argv[1]=='Release_English_winxp':
|
||||||
os.system(f"cmd /c build32xp.bat")
|
os.system(f"cmd /c buildxpen.bat")
|
||||||
|
elif sys.argv[1]=='Release_Chinese_winxp':
|
||||||
|
os.system(f"cmd /c buildxpzh.bat")
|
@ -1,67 +1,3 @@
|
|||||||
cmake -DWINXP=1 ../CMakeLists.txt -G "Visual Studio 17 2022" -A win32 -T host=x86 -B ../build/x86_xp
|
cmake -DWINXP=1 ../CMakeLists.txt -G "Visual Studio 17 2022" -A win32 -T host=x86 -B ../build/x86_xp
|
||||||
cmake -DWINXP=1 -DLANGUAGE=Chinese ../CMakeLists.txt -G "Visual Studio 17 2022" -A win32 -T host=x86 -B ../build/x86_zh_xp
|
cmake -DWINXP=1 -DLANGUAGE=Chinese ../CMakeLists.txt -G "Visual Studio 17 2022" -A win32 -T host=x86 -B ../build/x86_zh_xp
|
||||||
|
call dobuildxp.bat
|
||||||
python edit_target.py
|
|
||||||
|
|
||||||
@echo off
|
|
||||||
setlocal enabledelayedexpansion
|
|
||||||
goto :main
|
|
||||||
|
|
||||||
:get_host_arch
|
|
||||||
setlocal
|
|
||||||
set out_var=%~1
|
|
||||||
if defined PROCESSOR_ARCHITEW6432 (
|
|
||||||
set "host_arch=%PROCESSOR_ARCHITEW6432%"
|
|
||||||
) else (
|
|
||||||
set "host_arch=%PROCESSOR_ARCHITECTURE%"
|
|
||||||
)
|
|
||||||
if "%host_arch%" == "AMD64" (
|
|
||||||
set result=x64
|
|
||||||
) else if "%host_arch%" == "x86" (
|
|
||||||
set result=x86
|
|
||||||
) else (
|
|
||||||
echo ERROR: Unsupported host machine architecture.
|
|
||||||
endlocal
|
|
||||||
exit /b 1
|
|
||||||
)
|
|
||||||
endlocal & set %out_var%=%result%
|
|
||||||
goto :eof
|
|
||||||
|
|
||||||
:find_msvc
|
|
||||||
setlocal
|
|
||||||
set out_var=%~1
|
|
||||||
rem Find vswhere.exe
|
|
||||||
set "vswhere=%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"
|
|
||||||
if not exist "%vswhere%" set "vswhere=!ProgramFiles!\Microsoft Visual Studio\Installer\vswhere.exe"
|
|
||||||
if not exist "%vswhere%" (
|
|
||||||
echo ERROR: Failed to find vswhere.exe>&2
|
|
||||||
endlocal & exit /b 1
|
|
||||||
)
|
|
||||||
rem Find VC tools
|
|
||||||
for /f "usebackq tokens=*" %%i in (`"%vswhere%" -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath`) do (
|
|
||||||
set vc_dir=%%i
|
|
||||||
)
|
|
||||||
if not exist "%vc_dir%\Common7\Tools\vsdevcmd.bat" (
|
|
||||||
echo ERROR: Failed to find MSVC.>&2
|
|
||||||
endlocal & exit /b 1
|
|
||||||
)
|
|
||||||
endlocal & set "%out_var%=%vc_dir%"
|
|
||||||
goto :eof
|
|
||||||
|
|
||||||
:activate_msvc
|
|
||||||
where cl.exe > nul 2>&1 && goto :eof || cmd /c exit 0
|
|
||||||
call :find_msvc vc_dir || goto :eof
|
|
||||||
call "%vc_dir%\Common7\Tools\vsdevcmd.bat" -no_logo -arch=%~1 || goto :eof
|
|
||||||
goto :eof
|
|
||||||
|
|
||||||
|
|
||||||
:main
|
|
||||||
call :get_host_arch host_arch || exit /b
|
|
||||||
if not defined TARGET_ARCH (
|
|
||||||
rem Target architecture is by default the same as the host architecture
|
|
||||||
set target_arch=%host_arch%
|
|
||||||
)
|
|
||||||
call :activate_msvc "%target_arch%" || goto :eof
|
|
||||||
msbuild ..\build\x86_xp\LunaHook.sln -p:Configuration=Release
|
|
||||||
msbuild ..\build\x86_zh_xp\LunaHook.sln -p:Configuration=Release
|
|
||||||
goto :eof
|
|
3
scripts/buildxpen.bat
Normal file
3
scripts/buildxpen.bat
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
cmake -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
|
4
scripts/buildxpzh.bat
Normal file
4
scripts/buildxpzh.bat
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
|
||||||
|
cmake -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,8 +1,3 @@
|
|||||||
cmake -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
|
|
||||||
|
|
||||||
cmake -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
|
|
||||||
python edit_target.py
|
python edit_target.py
|
||||||
|
|
||||||
@echo off
|
@echo off
|
Loading…
Reference in New Issue
Block a user