bat that allow to launch the game fast without debugger
This commit is contained in:
53
misc/launch.bat
Normal file
53
misc/launch.bat
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
@echo off
|
||||||
|
setlocal
|
||||||
|
|
||||||
|
:: --- 1. Argument Parsing Logic ---
|
||||||
|
set "ARG1=%~1"
|
||||||
|
set "ARG2=%~2"
|
||||||
|
|
||||||
|
:: Set Defaults
|
||||||
|
set "COMPILER_TYPE=clang"
|
||||||
|
set "CONFIG=Debug"
|
||||||
|
|
||||||
|
:: Check if the first argument is a Configuration instead of a Compiler
|
||||||
|
if /I "%ARG1%"=="Release" (
|
||||||
|
set "CONFIG=Release"
|
||||||
|
) else if /I "%ARG1%"=="Profile" (
|
||||||
|
set "CONFIG=Profile"
|
||||||
|
) else if /I "%ARG1%"=="Debug" (
|
||||||
|
set "CONFIG=Debug"
|
||||||
|
) else if /I "%ARG1%"=="msvc" (
|
||||||
|
set "COMPILER_TYPE=msvc"
|
||||||
|
if not "%ARG2%"=="" set "CONFIG=%ARG2%"
|
||||||
|
) else if /I "%ARG1%"=="clang" (
|
||||||
|
set "COMPILER_TYPE=clang"
|
||||||
|
if not "%ARG2%"=="" set "CONFIG=%ARG2%"
|
||||||
|
)
|
||||||
|
|
||||||
|
:: --- 2. Map Compiler to Platform ---
|
||||||
|
if /I "%COMPILER_TYPE%"=="clang" (
|
||||||
|
set "PLATFORM=x64Clang"
|
||||||
|
) else (
|
||||||
|
set "PLATFORM=x64"
|
||||||
|
)
|
||||||
|
|
||||||
|
:: --- 3. Construct Paths ---
|
||||||
|
set "APP_DIR=bin\%PLATFORM%-%CONFIG%"
|
||||||
|
set "APP_EXE=JulietApp.exe"
|
||||||
|
|
||||||
|
echo --- Launching %APP_EXE% ---
|
||||||
|
echo Platform: %PLATFORM%
|
||||||
|
echo Config: %CONFIG%
|
||||||
|
|
||||||
|
:: --- 4. Execution ---
|
||||||
|
if exist "%APP_DIR%\%APP_EXE%" (
|
||||||
|
pushd "%APP_DIR%"
|
||||||
|
start "" "%APP_EXE%"
|
||||||
|
popd
|
||||||
|
) else (
|
||||||
|
echo [ERROR] Executable not found at: %APP_DIR%\%APP_EXE%
|
||||||
|
echo Please build first: fbuild JulietApp-%PLATFORM%-%CONFIG%
|
||||||
|
pause
|
||||||
|
)
|
||||||
|
|
||||||
|
endlocal
|
||||||
Reference in New Issue
Block a user