-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.bat
More file actions
47 lines (40 loc) · 1.03 KB
/
Copy pathbuild.bat
File metadata and controls
47 lines (40 loc) · 1.03 KB
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
45
46
47
@echo off
setlocal enabledelayedexpansion
echo ============================================
echo Alley Cat - Build Script
echo ============================================
echo.
set "BUILD_DIR=build"
set "CONFIG=Release"
where cmake >nul 2>&1
if %ERRORLEVEL% neq 0 (
echo [ERROR] CMake not found. Install from https://cmake.org/download/
pause
exit /b 1
)
echo [1/2] Configuring and generating...
cmake -B %BUILD_DIR% -S . -Wno-dev
if %ERRORLEVEL% neq 0 (
echo [ERROR] Configuration failed.
pause
exit /b %ERRORLEVEL%
)
echo [2/2] Building %CONFIG%...
cmake --build %BUILD_DIR% --config %CONFIG%
if %ERRORLEVEL% neq 0 (
echo [ERROR] Build failed.
pause
exit /b %ERRORLEVEL%
)
echo.
echo ============================================
echo Build succeeded.
echo %CD%\%BUILD_DIR%\%CONFIG%\alleycat.exe
echo ============================================
echo.
set /p RUN="Run now? [Y/N]: "
if /i "!RUN!"=="Y" (
echo Launching Alley Cat...
start "" "%BUILD_DIR%\%CONFIG%\alleycat.exe"
)
endlocal