-
Notifications
You must be signed in to change notification settings - Fork 13
/
debug-OpposingForce.bat
29 lines (20 loc) · 1.32 KB
/
debug-OpposingForce.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
echo off
set LauncherExe=metahook.exe
set LauncherMod=gearbox
for /f "delims=" %%a in ('"%~dp0SteamAppsLocation/SteamAppsLocation" 50 InstallDir') do set GameDir=%%a
if "%GameDir%"=="" goto fail
echo -----------------------------------------------------
echo Writing debug configuration...
copy global_template.props global.props /y
call powershell -Command "(gc global.props) -replace '<MetaHookLaunchName>.*</MetaHookLaunchName>', '<MetaHookLaunchName>%LauncherExe%</MetaHookLaunchName>' | Out-File global.props"
call powershell -Command "(gc global.props) -replace '<MetaHookLaunchCommnand>.*</MetaHookLaunchCommnand>', '<MetaHookLaunchCommnand>-game %LauncherMod%</MetaHookLaunchCommnand>' | Out-File global.props"
call powershell -Command "(gc global.props) -replace '<MetaHookGameDirectory>.*</MetaHookGameDirectory>', '<MetaHookGameDirectory>%GameDir%\</MetaHookGameDirectory>' | Out-File global.props"
call powershell -Command "(gc global.props) -replace '<MetaHookModName>.*</MetaHookModName>', '<MetaHookModName>%LauncherMod%</MetaHookModName>' | Out-File global.props"
echo -----------------------------------------------------
echo done
pause
exit
:fail
echo Failed to locate GameInstallDir of Half-Life : Opposing Force, please make sure Steam is running and you have Half-Life : Opposing Force installed correctly.
pause
exit