-
Notifications
You must be signed in to change notification settings - Fork 13
/
debug-DayOfDefeat.bat
29 lines (20 loc) · 1.29 KB
/
debug-DayOfDefeat.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=dod
for /f "delims=" %%a in ('"%~dp0SteamAppsLocation/SteamAppsLocation" 30 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 Day of Defeat, please make sure Steam is running and you have Day of Defeat installed correctly.
pause
exit