-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.bat
More file actions
52 lines (43 loc) · 1.14 KB
/
build.bat
File metadata and controls
52 lines (43 loc) · 1.14 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
48
49
50
51
52
@echo off
setlocal EnableDelayedExpansion
set configuration=Debug
set "flags="
for %%A in (%*) do (
if "%%A"=="-r" set configuration=Release
if "%%A"=="/r" set configuration=Release
if "%%A"=="--release" set configuration=Release
if "%%A"=="-h" goto HELP
if "%%A"=="/h" goto HELP
if "%%A"=="--help" goto HELP
if "%%A"=="-c" goto CLEAN
if "%%A"=="/c" goto CLEAN
if "%%A"=="--clean" goto CLEAN
)
set defs=
for %%A in (%flags%) do (
set defs=!defs!%%A;
)
set command=msbuild /p:Configuration=%configuration% /p:Constants="%defs%" /t:Rebuild /m:1
@echo on
call %%command%%
@echo off
echo.
echo %command%
echo.
echo Configuration: %configuration%
echo Flags: %flags%
goto END
:CLEAN
@echo on
msbuild /property:Configuration=Debug /t:Clean /m
msbuild /property:Configuration=Release /t:Clean /m
@echo off
goto END
:HELP
echo Usage:
echo "> build [OPTION]"
echo Options:
echo -r /r --release - Build in release mode.
echo -c /c --clean - Remove all binaries.
echo -h /h --help - Show this message.
:END