-
Notifications
You must be signed in to change notification settings - Fork 366
/
MasterBuild.bat
97 lines (66 loc) · 3.86 KB
/
MasterBuild.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
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
88
89
90
91
92
93
94
95
96
97
@ECHO OFF
REM Point SHFBROOT at the development folder so that all help files are built using the latest version of the tools.
SETLOCAL
REM We need to use MSBuild 15.0 or later in order to support the new VSIX format in VS2017 and later
IF EXIST "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\MSBuild\15.0" SET "MSBUILD=%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\MSBuild\15.0\bin\MSBuild.exe"
IF EXIST "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Professional\MSBuild\15.0" SET "MSBUILD=%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\bin\MSBuild.exe"
IF EXIST "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0" SET "MSBUILD=%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\bin\MSBuild.exe"
IF EXIST "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Community\MSBuild\Current" SET "MSBUILD=%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Community\MSBuild\Current\bin\MSBuild.exe"
IF EXIST "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Professional\MSBuild\Current" SET "MSBUILD=%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Professional\MSBuild\Current\bin\MSBuild.exe"
IF EXIST "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current" SET "MSBUILD=%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\bin\MSBuild.exe"
IF EXIST "%ProgramFiles%\Microsoft Visual Studio\2022\Community\MSBuild\Current" SET "MSBUILD2022=%ProgramFiles%\Microsoft Visual Studio\2022\Community\MSBuild\Current\bin\MSBuild.exe"
IF EXIST "%ProgramFiles%\Microsoft Visual Studio\2022\Professional\MSBuild\Current" SET "MSBUILD2022=%ProgramFiles%\Microsoft Visual Studio\2022\Professional\MSBuild\Current\bin\MSBuild.exe"
IF EXIST "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current" SET "MSBUILD2022=%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\bin\MSBuild.exe"
SET SHFBROOT=%CD%\SHFB\Deploy\
SET BuildConfig=%1
IF '%BuildConfig%'=='' SET BuildConfig=Release
CD SHFB\Source
ECHO *
ECHO * Core tools
ECHO *
"%MSBUILD2022%" /nr:false /r /nologo /v:m /m "SandcastleTools.sln" /t:Clean;Build "/p:Configuration=%BuildConfig%;Platform=Any CPU"
IF ERRORLEVEL 1 GOTO End
ECHO *
ECHO * VS2017/2019 package
ECHO *
"%MSBUILD%" /nr:false /r /nologo /v:m /m "VSIX_VS2017.sln" /t:Clean;Build "/p:Configuration=%BuildConfig%;Platform=Any CPU"
IF ERRORLEVEL 1 GOTO End
ECHO *
ECHO * VS2022 and later package
ECHO *
IF NOT "%MSBUILD2022%"=="" "%MSBUILD2022%" /nr:false /r /nologo /v:m /m "VSIX_VS2022.sln" /t:Clean;Build "/p:Configuration=%BuildConfig%;Platform=Any CPU"
IF ERRORLEVEL 1 GOTO End
:BuildDocs
REM Skip help file and setup build if there is no reflection data yet
IF EXIST %SHFBROOT%\Data\.NETFramework\*.xml GOTO ReflectionDataExists
ECHO *
ECHO *
ECHO * Reflection data does not exist for the frameworks. Building default
ECHO * set for the latest version of the .NETFramework platform on this
ECHO * system. See the System Requirements and Building the Code wiki topic
ECHO * for topic for more information:
ECHO *
ECHO * https://github.com/EWSoftware/SHFB/wiki/System-Requirements-and-Building-the-Code
ECHO *
ECHO *
%SHFBROOT%ReflectionDataManager /platform:.NETFramework
IF ERRORLEVEL 1 GOTO End
:ReflectionDataExists
CD ..\..\Documentation
IF EXIST .\WebHelp\*.* RD /S /Q .\WebHelp
ECHO *
ECHO * Documentation
ECHO *
"%MSBUILD%" /nr:false /nologo /v:m /m "AllDocumentation.sln" /t:Clean;Build "/p:Configuration=%BuildConfig%;Platform=Any CPU"
IF ERRORLEVEL 1 GOTO End
CD ..\SHFB\Source
"%MSBUILD%" /nr:false /nologo /v:m /m "SHFBSetup.sln" /t:Clean;Build "/p:Configuration=%BuildConfig%;Platform=Any CPU"
IF ERRORLEVEL 1 GOTO End
ECHO *
ECHO * All builds completed successfully.
ECHO *
CD ..\..\NuGet
BuildNuGet.bat
CD ..
:End
ENDLOCAL