Daan De Meyer | f972602 | 2019-10-10 22:16:49 +0200 | [diff] [blame] | 1 | @echo off |
| 2 | |
| 3 | SET VSWHERE="C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere" |
| 4 | |
| 5 | :: See https://github.com/microsoft/vswhere/wiki/Find-VC |
| 6 | for /f "usebackq delims=*" %%i in (`%VSWHERE% -latest -property installationPath`) do ( |
| 7 | call "%%i"\Common7\Tools\vsdevcmd.bat %* |
| 8 | ) |
| 9 | |
| 10 | :: Loop over all environment variables and make them global using set-env. |
| 11 | :: See: https://help.github.com/en/articles/development-tools-for-github-actions#set-an-environment-variable-set-env |
| 12 | :: See: https://stackoverflow.com/questions/39183272/loop-through-all-environmental-variables-and-take-actions-depending-on-prefix |
| 13 | setlocal |
| 14 | for /f "delims== tokens=1,2" %%a in ('set') do ( |
| 15 | echo ::set-env name=%%a::%%b |
| 16 | ) |
| 17 | endlocal |