-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathinstall-to-ConditionZero.bat
44 lines (29 loc) · 1.68 KB
/
install-to-ConditionZero.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
echo off
if not exist "%~dp0build\Release\metahook.exe" goto fail_nobuild
if not exist "%~dp0build\Release\MetaAudio.dll" goto fail_nobuild
set LauncherExe=metahook.exe
set LauncherMod=czero
for /f "delims=" %%a in ('"%~dp0SteamAppsLocation/SteamAppsLocation" 80 InstallDir') do set GameDir=%%a
if "%GameDir%"=="" goto fail
echo -----------------------------------------------------
echo Copying files...
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
powershell $shell = New-Object -ComObject WScript.Shell;$shortcut = $shell.CreateShortcut(\"MetaHook for ConditionZero.lnk\");$shortcut.TargetPath = \"%GameDir%\%LauncherExe%\";$shortcut.WorkingDirectory = \"%GameDir%\";$shortcut.Arguments = \"-steam -insecure -game %LauncherMod%\";$shortcut.Save();
notepad "%GameDir%\%LauncherMod%\metahook\configs\plugins.lst"
echo -----------------------------------------------------
echo Done
echo Make sure that "MetaAudio.dll" is in the metahook plugin load list (plugins.lst) and it's on top of any other plugins.
echo Launch game from "MetaHook for ConditionZero" shortcut.
pause
exit
:fail
echo Failed to locate GameInstallDir of Counter-Strike : Condition Zero, please make sure Steam is running and you have Counter-Strike : Condition Zero installed correctly.
pause
exit
:fail_nobuild
echo Compiled binaries not found ! You have to download compiled zip from github release page or compile the sources by yourself before installing !!!
pause
exit