aboutsummaryrefslogtreecommitdiff
path: root/src/build_all.cmd
blob: 5f3ba14ecc6728c72dc54fd93e5d147f5213b6ed (plain)
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
98
99
100
@setlocal
@pushd %~dp0

@set _C=Debug
:parse_args
@if /i "%1"=="release" set _C=Release
@if not "%1"=="" shift & goto parse_args

@if "%VCToolsVersion%"=="" call :StartDeveloperCommandPrompt || exit /b

@echo build %_C%

:: Initialize required files/folders

call build_init.cmd

:: DTF

call dtf\dtf.cmd %_C% || exit /b


:: internal

call internal\internal.cmd %_C% || exit /b


:: libs

call libs\libs.cmd %_C% || exit /b


:: api

call api\api.cmd %_C% || exit /b


:: burn

call burn\burn.cmd %_C% || exit /b


:: wix

call wix\wix.cmd %_C% || exit /b


:: tools

call tools\tools.cmd %_C% || exit /b


:: ext

call ext\ext.cmd %_C% || exit /b


:: setup

call setup\setup.cmd %_C% || exit /b


:: integration tests

call test\test.cmd %_C% || exit /b


:: finalize build

call internal\finalize.cmd %_C% || exit /b


goto LExit

:StartDeveloperCommandPrompt
if not "%WixSkipVsDevCmd%"=="" (
  echo Skipping initializing developer command prompt
  exit /b
)

echo Initializing developer command prompt

if not exist "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" (
  "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"
  exit /b 2
)

for /f "usebackq delims=" %%i in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -version [17.0^,18.0^) -property installationPath`) do (
  if exist "%%i\Common7\Tools\vsdevcmd.bat" (
    call "%%i\Common7\Tools\vsdevcmd.bat" -no_logo
    exit /b
  )
  echo developer command prompt not found in %%i
)

echo No versions of developer command prompt found
exit /b 2

:LExit
@popd
@endlocal