forked from microsoft/Win2D
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.cmd
More file actions
87 lines (65 loc) · 1.73 KB
/
build.cmd
File metadata and controls
87 lines (65 loc) · 1.73 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
@echo off
SETLOCAL
IF "%VisualStudioVersion%" LSS "12.0" (
GOTO WRONG_COMMAND_PROMPT
)
SET NOUAP=
IF "%1" NEQ "" (
IF "%1" == "nouap" (
SET NOUAP=1
) ELSE (
GOTO SHOW_USAGE
)
)
IF NOT "%NOUAP%" == "1" (
IF "%VisualStudioVersion%" LSS "14.0" (
ECHO Warning: Visual Studio 2015 or higher required to build with Windows universal app platform support.
ECHO Building without universal app platform support.
ECHO.
SET NOUAP=1
)
)
WHERE /Q msbuild >NUL
IF %ERRORLEVEL% NEQ 0 (
ECHO Error: It appears that 'msbuild' is not available in this environment.
ECHO.
GOTO WRONG_COMMAND_PROMPT
)
SET BUILD_UAP=
IF "%NOUAP%" == "1" (
SET BUILD_UAP=/p:BuildUAP=false
)
msbuild "%~dp0Win2D.proj" /v:m /maxcpucount /nr:false /p:BuildTests=false /p:BuildTools=false /p:BuildDocs=false %BUILD_UAP%
IF %ERRORLEVEL% NEQ 0 (
ECHO Build failed; aborting.
GOTO END
)
msbuild "%~dp0tools\docs\BuildDocs.proj" /nologo /v:m /p:IntellisenseOnly=true
IF %ERRORLEVEL% NEQ 0 (
ECHO Build failed; aborting.
GOTO END
)
ECHO.
SET OVERRIDE_NUGET_PACKAGE=
IF "%NOUAP%" == "1" (
SET OVERRIDE_NUGET_PACKAGE=Win2D-NoUAP
)
CALL "%~dp0build\nuget\build-nupkg.cmd" local
GOTO END
:SHOW_USAGE
ECHO %0 [nouap]
ECHO.
ECHO nouap: pass this to disable building Windows universal app platform support
GOTO END
:WRONG_COMMAND_PROMPT
ECHO Please run this script from the appropriate command prompt:
ECHO.
ECHO For Visual Studio 2013, building for Windows / Phone 8.1:
ECHO - Visual Studio 2013 Command Prompt
ECHO.
ECHO For Visual Studio 2015, building for Windows / Phone 8.1 and Windows universal app platform:
ECHO - MSBuild Command Prompt for VS2015
ECHO.
PAUSE
GOTO END
:END