-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.bat
More file actions
48 lines (37 loc) · 946 Bytes
/
build.bat
File metadata and controls
48 lines (37 loc) · 946 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
45
46
47
48
@echo off
setlocal
REM === CONFIG ===
set BUILD_TYPE=Release
set GENERATOR="Visual Studio 17 2022"
set BUILD_DIR=build
set BUILD_DOC=voltray-docs
REM === GENERATE PROJECT FILES ===
echo Configuring project with CMake...
cmake -B %BUILD_DIR% -G %GENERATOR% -A x64 -DCMAKE_BUILD_TYPE=%BUILD_TYPE%
if errorlevel 1 (
echo Failed to configure the project.
exit /b 1
)
REM === BUILD PROJECT ===
echo Building project...
cmake --build %BUILD_DIR% --config %BUILD_TYPE%
if errorlevel 1 (
echo Build failed.
exit /b 1
)
echo Build successful!
echo Generating documentation...
cmake --build %BUILD_DIR% --target doc --config %BUILD_TYPE%
REM === RUN THE ENGINE ===
set EXE_PATH=%BUILD_DIR%\%BUILD_TYPE%\Voltray.exe
set EXE_DIR=%BUILD_DIR%\%BUILD_TYPE%
if exist "%EXE_PATH%" (
echo Running Voltray...
pushd "%EXE_DIR%"
Voltray.exe
popd
) else (
echo Error: Voltray.exe not found at %EXE_PATH%
)
endlocal
pause