forked from NETMF/netmf-interpreter
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build_sdk.cmd
69 lines (53 loc) · 2.76 KB
/
build_sdk.cmd
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
@ECHO OFF
@REM The automated build process can, and should, set the following environment variables prior to calling this command script
@REM SignBuild=true ; Submits the resulting binaries for signing, this will fail if the user does not have CODESIGN permissions
@REM AUTOMATED_BUILD=true ; Indicates to the build that this is an automated build process, there are a few references to this and we hope to eliminate them in the future
if "%1" == "/?" goto :ShowUsage
if "%1" == "-?" goto :ShowUsage
if /i "%1" == "/h" goto :ShowUsage
if /i "%1" == "-h" goto :ShowUsage
if "%FLAVOR_SDK%" == "" set FLAVOR_SDK=RTM
if /i "%VSSDK140Install%"=="" goto :MissingVSSDK
if NOT EXIST "%VSSDK140Install%" goto :MissingVSSDK
SET BUILD_VERSION=%1
if "%BUILD_VERSION%"=="" set BUILD_VERSION=0
SET BUILD_SHARE=%~2
if "%BUILD_SHARE%"=="" set BUILD_SHARE=%SPOCLIENT%
SET BUILD_BRANCH=%~3
SET RELEASENAME=%4
if "%RELEASENAME%"=="" set RELEASENAME="(%USERNAME%)"
SET WixMsiBuildNumberOverride=%5
SET PRODVER_MAJOR=4
SET PRODVER_MINOR=4
IF "%WixMsiBuildNumberOverride%"=="" set WixMsiBuildNumberOverride=%BUILD_VERSION%
set COMMON_BUILD_ROOT=%BUILD_SHARE%
if NOT "%BUILD_BRANCH%"=="" set COMMON_BUILD_ROOT=%COMMON_BUILD_ROOT%\%BUILD_BRANCH%
call setenv_vs.cmd 14
SET PORT_BUILD=
ECHO Building PreSDK ...
call Msbuild sdk.dirproj /nr:false /t:Build /p:BuildNumber=%BUILD_VERSION% /p:FLAVOR=%FLAVOR_SDK% /clp:verbosity=minimal /flp:verbosity=detailed;LogFile=sdkpre.log
if %ERRORLEVEL% NEQ 0 exit /B %ERRORLEVEL%
ECHO Building SDK ...
call Msbuild setup\ProductSDK\Product.wixproj /m /t:Build /p:BuildNumber=%BUILD_VERSION% /p:FLAVOR=%FLAVOR_SDK% /clp:verbosity=minimal /flp:verbosity=detailed;LogFile=sdk.log
if %ERRORLEVEL% NEQ 0 exit /B %ERRORLEVEL%
ECHO Building VSIX packages ...
call Msbuild setup\ProductSDK\VsixPackages.dirproj /t:Build /p:BuildNumber=%BUILD_VERSION% /p:FLAVOR=%FLAVOR_SDK% /clp:verbosity=minimal /flp:verbosity=detailed;LogFile=vsixpkg.log
if %ERRORLEVEL% NEQ 0 exit /B %ERRORLEVEL%
SET PORT_BUILD=
GOTO :EOF
:ShowUsage
@ECHO usage:
@ECHO build_sdk.cmd [BUILD_NUMBER] [BUILD_SHARE] [BUILD_BRANCH] [RELEASE_NAME]
@ECHO or
@ECHO build_sdk.cmd
@ECHO where:
@ECHO BUILD_NUMBER = Build portion of the version quad [Default = 0 ]
@ECHO BUILD_SHARE = Root of the build output [ Default = SPOCLIENT ]
@ECHO BUILD_BRANCH = Branch used for the build [ Default = client_vNext ]
@ECHO RELEASE_NAME = Name for the release [ Default = "(%%USERNAME%%)"]
@echo example:
@ECHO build_sdk.cmd 1234 \\NETMFBLD02\Builds\69423 client_vNext "(RC1)"
goto :EOF
:MissingVSSDK
@ECHO ERROR: Visual Studio 2015 SDK (VSSDK) was not detected, this SDK is required to build the .NET Micro Framework SDK source code
goto :EOF