diff options
| author | Rob Mensching <rob@firegiant.com> | 2021-10-19 19:30:02 -0700 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2021-10-20 10:28:27 -0700 |
| commit | 4ca1a77e321c48078a0060ac116db4e755dff417 (patch) | |
| tree | 4d1ab710b078c0525446334ab68677a8bc7e7f77 /src | |
| parent | 54ebab73cd3254c97ed1bc8e1abeed0b5d239177 (diff) | |
| download | wix-4ca1a77e321c48078a0060ac116db4e755dff417.tar.gz wix-4ca1a77e321c48078a0060ac116db4e755dff417.tar.bz2 wix-4ca1a77e321c48078a0060ac116db4e755dff417.zip | |
Import vsdevcmd environment variables if missing during build
Diffstat (limited to 'src')
| -rw-r--r-- | src/build_all.cmd | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/build_all.cmd b/src/build_all.cmd index 7c62be74..8f7e7514 100644 --- a/src/build_all.cmd +++ b/src/build_all.cmd | |||
| @@ -6,6 +6,8 @@ | |||
| 6 | @if /i "%1"=="release" set _C=Release | 6 | @if /i "%1"=="release" set _C=Release |
| 7 | @if not "%1"=="" shift & goto parse_args | 7 | @if not "%1"=="" shift & goto parse_args |
| 8 | 8 | ||
| 9 | @if "%VCToolsVersion%"=="" call :StartDeveloperCommandPrompt | ||
| 10 | |||
| 9 | @echo build %_C% | 11 | @echo build %_C% |
| 10 | 12 | ||
| 11 | :: Initialize required files/folders | 13 | :: Initialize required files/folders |
| @@ -56,5 +58,19 @@ call ext\ext.cmd %_C% || exit /b | |||
| 56 | 58 | ||
| 57 | call test\test.cmd %_C% || exit /b | 59 | call test\test.cmd %_C% || exit /b |
| 58 | 60 | ||
| 61 | goto LExit | ||
| 62 | |||
| 63 | :StartDeveloperCommandPrompt | ||
| 64 | echo Initializing developer command prompt | ||
| 65 | for /f "usebackq delims=" %%i in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath`) do ( | ||
| 66 | if exist "%%i\Common7\Tools\vsdevcmd.bat" ( | ||
| 67 | call "%%i\Common7\Tools\vsdevcmd.bat" -no_logo | ||
| 68 | exit /b | ||
| 69 | ) | ||
| 70 | ) | ||
| 71 | |||
| 72 | exit /b 2 | ||
| 73 | |||
| 74 | :LExit | ||
| 59 | @popd | 75 | @popd |
| 60 | @endlocal | 76 | @endlocal |
