X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=BaseTools%2Fget_vsvars.bat;h=ba3e54d588cfb708f1cb5acb8a14a52cf1589c54;hb=ff1d0fbfbaec55038ccf888759588fa4e21516f4;hp=7649e1dccf4701e2bca23f26c4ab85bd4ffac45e;hpb=4e06673dbc165cc54824210c05ba70793b5a2e95;p=mirror_edk2.git diff --git a/BaseTools/get_vsvars.bat b/BaseTools/get_vsvars.bat index 7649e1dccf..ba3e54d588 100644 --- a/BaseTools/get_vsvars.bat +++ b/BaseTools/get_vsvars.bat @@ -16,6 +16,12 @@ @echo off goto :main +:set_vsvars +for /f "usebackq tokens=1* delims=: " %%i in (`%*`) do ( + if /i "%%i"=="installationPath" call "%%j\VC\Auxiliary\Build\vcvars32.bat" +) +goto :EOF + :read_vsvars @rem Do nothing if already found, otherwise call vsvars32.bat if there if defined VCINSTALLDIR goto :EOF @@ -33,6 +39,8 @@ REM (Or invoke the relevant vsvars32 file beforehand). :main if defined VCINSTALLDIR goto :done + if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" call :set_vsvars "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" + if exist "%ProgramFiles%\Microsoft Visual Studio\Installer\vswhere.exe" call :set_vsvars "%ProgramFiles%\Microsoft Visual Studio\Installer\vswhere.exe" if defined VS140COMNTOOLS call :read_vsvars "%VS140COMNTOOLS%" if defined VS120COMNTOOLS call :read_vsvars "%VS120COMNTOOLS%" if defined VS110COMNTOOLS call :read_vsvars "%VS110COMNTOOLS%"