-
Notifications
You must be signed in to change notification settings - Fork 0
/
debug.bat
44 lines (35 loc) · 846 Bytes
/
debug.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
setlocal
cd /d "%~dp0"
chcp 65001 > nul
rem unpack arguments
for %%a in (%*) do (
for /f "tokens=1,2 delims=:" %%b IN ("%%a") do (
if [%%c] == [] (set %%b=1) else (set %%b=%%c)
)
)
rem prepare
if [%toolset%] == [] set toolset=remedybg
if [%target%] == [] set target=main.exe
if not exist "build/%target%" (exit /b 1)
rem debug
call :debug_%toolset%
endlocal
rem declare functions
goto :eof
:debug_remedybg
where -q "remedybg.exe" || (
echo.please, install "RemedyBG", https://remedybg.itch.io/remedybg
exit /b 1
)
echo.[debug with remedybg]
call remedybg -g -q "build/%target%"
goto :eof
:debug_raddbg
where -q "raddbg.exe" || (
echo.please, install "RAD Debugger", https://github.com/EpicGamesExt/raddebugger/releases
exit /b 1
)
echo.[debug with raddbg]
call raddbg --auto_run "build/%target%"
goto :eof