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
86 lines (66 loc) · 1.83 KB
/
Copy pathbuild.cmd
File metadata and controls
86 lines (66 loc) · 1.83 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
@echo off
SETLOCAL
IF "%VisualStudioVersion%" LSS "12.0" (
GOTO WRONG_COMMAND_PROMPT
)
SET NO81=
SET NOUAP=
IF "%1" == "no81" (
SET NO81=1
) ELSE IF "%1" == "nouap" (
SET NOUAP=1
) ELSE IF "%1" NEQ "" (
GOTO SHOW_USAGE
)
IF NOT "%NOUAP%" == "1" (
IF "%VisualStudioVersion%" LSS "15.0" (
ECHO Warning: Visual Studio 2017 or higher required to build with Universal Windows Platform support.
ECHO Building without Universal Windows 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_ARGS=
IF "%NO81%" == "1" (
SET BUILD_ARGS=/p:BuildWindows=false /p:BuildPhone=false
)
IF "%NOUAP%" == "1" (
SET BUILD_ARGS=/p:BuildUAP=false
)
msbuild "%~dp0Win2D.proj" /v:m /maxcpucount /nr:false /p:BuildTests=false /p:BuildTools=false /p:BuildDocs=false %BUILD_ARGS%
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.
CALL "%~dp0build\nuget\build-nupkg.cmd" %* local
GOTO END
:SHOW_USAGE
ECHO %0 [no81^|nouap]
ECHO.
ECHO no81: pass this to disable building Windows 8.1 and Windows Phone 8.1 support
ECHO nouap: pass this to disable building Universal Windows 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 2017, building for Windows / Phone 8.1 and Universal Windows Platform:
ECHO - Developer Command Prompt for VS2017
ECHO.
PAUSE
GOTO END
:END