-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.bat
More file actions
44 lines (36 loc) · 927 Bytes
/
build.bat
File metadata and controls
44 lines (36 loc) · 927 Bytes
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 enabledelayedexpansion
where cmake >nul 2>nul
if %ERRORLEVEL% neq 0 (
echo CMake is not installed or not in PATH
echo Please install CMake from https://cmake.org/download/
exit /b 1
)
set GENERATOR="MinGW Makefiles"
echo Using MinGW Generator...
if not exist build mkdir build
echo Configuring CMake with generator: %GENERATOR%
cd build
cmake -G %GENERATOR% ..
if %ERRORLEVEL% neq 0 (
echo CMake configuration failed
exit /b 1
)
echo Building project...
cmake --build . --config Release
if %ERRORLEVEL% neq 0 (
echo Build failed
exit /b 1
)
echo Copying executable...
if exist bin\Release\SentinelCore.exe (
copy bin\Release\SentinelCore.exe ..\SentinelCore.exe
) else if exist bin\SentinelCore.exe (
copy bin\SentinelCore.exe ..\SentinelCore.exe
)
echo Build completed successfully!
cd ..
if "%1"=="--run" (
echo Running SentinelCore...
SentinelCore.exe
)