From b830dba1ffd4f6af90fbfd94bad589861fbd4523 Mon Sep 17 00:00:00 2001 From: LAGonauta Date: Sun, 19 Nov 2023 11:22:30 -0500 Subject: [PATCH] Download metahook --- .github/workflows/build.yml | 17 +++++++++++------ .github/workflows/release.yml | 11 +++++++++++ install-to-BlueShift.bat | 4 ++-- install-to-CSCZDeletedScenes.bat | 4 ++-- install-to-ConditionZero.bat | 4 ++-- install-to-CounterStrike.bat | 4 ++-- install-to-DayOfDefeat.bat | 4 ++-- install-to-HalfLife.bat | 4 ++-- install-to-OpposingForce.bat | 4 ++-- 9 files changed, 36 insertions(+), 20 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ebc8dc6..cc15a9b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -65,13 +65,18 @@ jobs: copy "install-to-BlueShift.bat" "Output" /y shell: cmd - - name: Zipping All - uses: vimtor/action-zip@v1.1 - with: - files: Output/ - dest: MetaAudio-windows-x86.zip + - name: Download MetaHook + run: | + Invoke-WebRequest -Uri https://github.com/hzqst/MetaHookSv/releases/download/v20231119b/MetaHookSv-windows-x86.zip -OutFile MetaHook.zip + if (!(Get-FileHash ./MetaHook.zip).Hash.Equals("BEC1D222274B43B2A2F1E2BFA619BE59A3361F8C0AB1FEA08A375ECC6FBB4ED4")) { + Exit -1 + } + Expand-Archive ./MetaHook.zip -DestinationPath MetaHook/ + New-Item -Type dir ./Output/Release + Copy-Item ./MetaHook/Build/svencoop.exe ./Output/Release/metahook.exe + shell: pwsh - uses: actions/upload-artifact@v3 with: name: MetaAudio - path: MetaAudio-windows-x86.zip + path: Output/ diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 719cabf..cb29db6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -71,6 +71,17 @@ jobs: copy "install-to-BlueShift.bat" "Output" /y shell: cmd + - name: Download MetaHook + run: | + Invoke-WebRequest -Uri https://github.com/hzqst/MetaHookSv/releases/download/v20231119b/MetaHookSv-windows-x86.zip -OutFile MetaHook.zip + if (!(Get-FileHash ./MetaHook.zip).Hash.Equals("BEC1D222274B43B2A2F1E2BFA619BE59A3361F8C0AB1FEA08A375ECC6FBB4ED4")) { + Exit -1 + } + Expand-Archive ./MetaHook.zip -DestinationPath MetaHook/ + New-Item -Type dir ./Output/Release + Copy-Item ./MetaHook/Build/svencoop.exe ./Output/Release/metahook.exe + shell: pwsh + - name: Zipping All uses: vimtor/action-zip@v1.1 with: diff --git a/install-to-BlueShift.bat b/install-to-BlueShift.bat index 4080763..19c0d66 100644 --- a/install-to-BlueShift.bat +++ b/install-to-BlueShift.bat @@ -1,6 +1,6 @@ echo off -if not exist "%~dp0build\externals\metahook\Release\metahook.exe" goto fail_nobuild +if not exist "%~dp0build\Release\metahook.exe" goto fail_nobuild if not exist "%~dp0build\Release\MetaAudio.dll" goto fail_nobuild set LauncherExe=metahook.exe @@ -14,7 +14,7 @@ echo ----------------------------------------------------- echo Copying files... -if not exist "%GameDir%\%LauncherExe%" copy "%~dp0build\externals\metahook\Release\metahook.exe" "%GameDir%\%LauncherExe%" /y +if not exist "%GameDir%\%LauncherExe%" copy "%~dp0build\Release\metahook.exe" "%GameDir%\%LauncherExe%" /y copy "%~dp0externals\libsndfile\bin\sndfile.dll" "%GameDir%\" /y md "%GameDir%\%LauncherMod%\metahook\plugins" copy "%~dp0build\Release\MetaAudio.dll" "%GameDir%\%LauncherMod%\metahook\plugins" /y diff --git a/install-to-CSCZDeletedScenes.bat b/install-to-CSCZDeletedScenes.bat index 46f5369..43c5c2b 100644 --- a/install-to-CSCZDeletedScenes.bat +++ b/install-to-CSCZDeletedScenes.bat @@ -1,6 +1,6 @@ echo off -if not exist "%~dp0build\externals\metahook\Release\metahook.exe" goto fail_nobuild +if not exist "%~dp0build\Release\metahook.exe" goto fail_nobuild if not exist "%~dp0build\Release\MetaAudio.dll" goto fail_nobuild set LauncherExe=metahook.exe @@ -14,7 +14,7 @@ echo ----------------------------------------------------- echo Copying files... -if not exist "%GameDir%\%LauncherExe%" copy "%~dp0build\externals\metahook\Release\metahook.exe" "%GameDir%\%LauncherExe%" /y +if not exist "%GameDir%\%LauncherExe%" copy "%~dp0build\Release\metahook.exe" "%GameDir%\%LauncherExe%" /y copy "%~dp0externals\libsndfile\bin\sndfile.dll" "%GameDir%\" /y md "%GameDir%\%LauncherMod%\metahook\plugins" copy "%~dp0build\Release\MetaAudio.dll" "%GameDir%\%LauncherMod%\metahook\plugins" /y diff --git a/install-to-ConditionZero.bat b/install-to-ConditionZero.bat index 693c7f1..0c4910a 100644 --- a/install-to-ConditionZero.bat +++ b/install-to-ConditionZero.bat @@ -1,6 +1,6 @@ echo off -if not exist "%~dp0build\externals\metahook\Release\metahook.exe" goto fail_nobuild +if not exist "%~dp0build\Release\metahook.exe" goto fail_nobuild if not exist "%~dp0build\Release\MetaAudio.dll" goto fail_nobuild set LauncherExe=metahook.exe @@ -14,7 +14,7 @@ echo ----------------------------------------------------- echo Copying files... -if not exist "%GameDir%\%LauncherExe%" copy "%~dp0build\externals\metahook\Release\metahook.exe" "%GameDir%\%LauncherExe%" /y +if not exist "%GameDir%\%LauncherExe%" copy "%~dp0build\Release\metahook.exe" "%GameDir%\%LauncherExe%" /y copy "%~dp0externals\libsndfile\bin\sndfile.dll" "%GameDir%\" /y md "%GameDir%\%LauncherMod%\metahook\plugins" copy "%~dp0build\Release\MetaAudio.dll" "%GameDir%\%LauncherMod%\metahook\plugins" /y diff --git a/install-to-CounterStrike.bat b/install-to-CounterStrike.bat index ce9d86e..83da311 100644 --- a/install-to-CounterStrike.bat +++ b/install-to-CounterStrike.bat @@ -1,6 +1,6 @@ echo off -if not exist "%~dp0build\externals\metahook\Release\metahook.exe" goto fail_nobuild +if not exist "%~dp0build\Release\metahook.exe" goto fail_nobuild if not exist "%~dp0build\Release\MetaAudio.dll" goto fail_nobuild set LauncherExe=metahook.exe @@ -14,7 +14,7 @@ echo ----------------------------------------------------- echo Copying files... -if not exist "%GameDir%\%LauncherExe%" copy "%~dp0build\externals\metahook\Release\metahook.exe" "%GameDir%\%LauncherExe%" /y +if not exist "%GameDir%\%LauncherExe%" copy "%~dp0build\Release\metahook.exe" "%GameDir%\%LauncherExe%" /y copy "%~dp0externals\libsndfile\bin\sndfile.dll" "%GameDir%\" /y md "%GameDir%\%LauncherMod%\metahook\plugins" copy "%~dp0build\Release\MetaAudio.dll" "%GameDir%\%LauncherMod%\metahook\plugins" /y diff --git a/install-to-DayOfDefeat.bat b/install-to-DayOfDefeat.bat index 45cf9fd..d41ac53 100644 --- a/install-to-DayOfDefeat.bat +++ b/install-to-DayOfDefeat.bat @@ -1,6 +1,6 @@ echo off -if not exist "%~dp0build\externals\metahook\Release\metahook.exe" goto fail_nobuild +if not exist "%~dp0build\Release\metahook.exe" goto fail_nobuild if not exist "%~dp0build\Release\MetaAudio.dll" goto fail_nobuild set LauncherExe=metahook.exe @@ -14,7 +14,7 @@ echo ----------------------------------------------------- echo Copying files... -if not exist "%GameDir%\%LauncherExe%" copy "%~dp0build\externals\metahook\Release\metahook.exe" "%GameDir%\%LauncherExe%" /y +if not exist "%GameDir%\%LauncherExe%" copy "%~dp0build\Release\metahook.exe" "%GameDir%\%LauncherExe%" /y copy "%~dp0externals\libsndfile\bin\sndfile.dll" "%GameDir%\" /y md "%GameDir%\%LauncherMod%\metahook\plugins" copy "%~dp0build\Release\MetaAudio.dll" "%GameDir%\%LauncherMod%\metahook\plugins" /y diff --git a/install-to-HalfLife.bat b/install-to-HalfLife.bat index adc0494..e948739 100644 --- a/install-to-HalfLife.bat +++ b/install-to-HalfLife.bat @@ -1,6 +1,6 @@ echo off -if not exist "%~dp0build\externals\metahook\Release\metahook.exe" goto fail_nobuild +if not exist "%~dp0build\Release\metahook.exe" goto fail_nobuild if not exist "%~dp0build\Release\MetaAudio.dll" goto fail_nobuild set LauncherExe=metahook.exe @@ -14,7 +14,7 @@ echo ----------------------------------------------------- echo Copying files... -if not exist "%GameDir%\%LauncherExe%" copy "%~dp0build\externals\metahook\Release\metahook.exe" "%GameDir%\%LauncherExe%" /y +if not exist "%GameDir%\%LauncherExe%" copy "%~dp0build\Release\metahook.exe" "%GameDir%\%LauncherExe%" /y copy "%~dp0externals\libsndfile\bin\sndfile.dll" "%GameDir%\" /y md "%GameDir%\%LauncherMod%\metahook\plugins" copy "%~dp0build\Release\MetaAudio.dll" "%GameDir%\%LauncherMod%\metahook\plugins" /y diff --git a/install-to-OpposingForce.bat b/install-to-OpposingForce.bat index 505b2a1..469c485 100644 --- a/install-to-OpposingForce.bat +++ b/install-to-OpposingForce.bat @@ -1,6 +1,6 @@ echo off -if not exist "%~dp0build\externals\metahook\Release\metahook.exe" goto fail_nobuild +if not exist "%~dp0build\Release\metahook.exe" goto fail_nobuild if not exist "%~dp0build\Release\MetaAudio.dll" goto fail_nobuild set LauncherExe=metahook.exe @@ -14,7 +14,7 @@ echo ----------------------------------------------------- echo Copying files... -if not exist "%GameDir%\%LauncherExe%" copy "%~dp0build\externals\metahook\Release\metahook.exe" "%GameDir%\%LauncherExe%" /y +if not exist "%GameDir%\%LauncherExe%" copy "%~dp0build\Release\metahook.exe" "%GameDir%\%LauncherExe%" /y copy "%~dp0externals\libsndfile\bin\sndfile.dll" "%GameDir%\" /y md "%GameDir%\%LauncherMod%\metahook\plugins" copy "%~dp0build\Release\MetaAudio.dll" "%GameDir%\%LauncherMod%\metahook\plugins" /y