-
Notifications
You must be signed in to change notification settings - Fork 187
Expand file tree
/
Copy pathbuild-sln.bat
More file actions
63 lines (55 loc) · 1.52 KB
/
build-sln.bat
File metadata and controls
63 lines (55 loc) · 1.52 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
53
54
55
56
57
58
59
60
61
62
63
@echo off
set platform=%1
set configuration=%2
if "%platform%" == "Win32" (
@rem OK
) else if "%platform%" == "x64" (
@rem OK
) else (
call :showhelp %0
exit /b 1
)
if "%configuration%" == "Release" (
@rem OK
) else if "%configuration%" == "Debug" (
@rem OK
) else (
call :showhelp %0
exit /b 1
)
if not defined CMD_MSBUILD call %~dp0tools\find-tools.bat
if not defined CMD_MSBUILD (
echo msbuild.exe was not found.
exit /b 1
)
set SLN_FILE=sakura.sln
set EXTRA_CMD=
set LOG_FILE=msbuild-%platform%-%configuration%.log
@rem https://msdn.microsoft.com/ja-jp/library/ms171470.aspx
set LOG_OPTION=/flp:logfile=%LOG_FILE%
@echo "%CMD_MSBUILD%" %SLN_FILE% /p:Platform=%platform% /p:Configuration=%configuration% /t:"Build" %EXTRA_CMD% %LOG_OPTION%
"%CMD_MSBUILD%" %SLN_FILE% /p:Platform=%platform% /p:Configuration=%configuration% /t:"Build" %EXTRA_CMD% %LOG_OPTION%
if errorlevel 1 (
echo ERROR in msbuild.exe errorlevel %errorlevel%
exit /b 1
)
exit /b 0
@rem ------------------------------------------------------------------------------
@rem show help
@rem see http://orangeclover.hatenablog.com/entry/20101004/1286120668
@rem ------------------------------------------------------------------------------
:showhelp
@echo off
@echo usage
@echo %~nx1 platform configuration
@echo.
@echo parameter
@echo platform : Win32 or x64
@echo configuration : Release or Debug
@echo.
@echo example
@echo %~nx1 Win32 Release
@echo %~nx1 Win32 Debug
@echo %~nx1 x64 Release
@echo %~nx1 x64 Debug
exit /b 0