forked from ubisoft/Sharpmake
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootstrap.bat
43 lines (34 loc) · 966 Bytes
/
bootstrap.bat
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
@echo off
:: Clear previous run status
COLOR
:: set batch file directory as current
pushd "%~dp0"
set SHARPMAKE_EXECUTABLE=bin\debug\Sharpmake.Application.exe
call CompileSharpmake.bat Sharpmake.Application/Sharpmake.Application.csproj Debug AnyCPU
if %errorlevel% NEQ 0 goto error
set SHARPMAKE_MAIN="Sharpmake.Main.sharpmake.cs"
if not "%~1" == "" (
set SHARPMAKE_MAIN="%~1"
)
set SM_CMD=%SHARPMAKE_EXECUTABLE% /sources(%SHARPMAKE_MAIN%) /verbose
echo %SM_CMD%
%SM_CMD%
if %errorlevel% NEQ 0 goto error
goto success
@REM -----------------------------------------------------------------------
:success
COLOR 2F
echo Bootstrap succeeded^!
set ERROR_CODE=0
goto end
@REM -----------------------------------------------------------------------
:error
COLOR 4F
echo Bootstrap failed^!
set ERROR_CODE=1
goto end
@REM -----------------------------------------------------------------------
:end
:: restore caller current directory
popd
exit /b %ERROR_CODE%