]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/set_vsprefix_envs.bat
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / BaseTools / set_vsprefix_envs.bat
index 38fb0eb260658bdc79445b464997324056db5a10..d4eb84f0648d54ec9dfde9111f0239275ba44d5e 100644 (file)
@@ -110,6 +110,9 @@ if /I "%1"=="VS2015" goto SetWinDDK
 \r
 :SetVS2017\r
 if not defined VS150COMNTOOLS (\r
+  @REM clear two envs so that vcvars32.bat can run successfully.\r
+  set VSINSTALLDIR=\r
+  set VCToolsVersion=\r
   if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" (\r
     if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\BuildTools" (\r
       call "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -products Microsoft.VisualStudio.Product.BuildTools -version 15,16 > vswhereInfo\r
@@ -164,8 +167,13 @@ if not defined WINSDK_PATH_FOR_RC_EXE (
   )\r
 )\r
 \r
+if /I "%1"=="VS2017" goto SetWinDDK\r
+\r
 :SetVS2019\r
 if not defined VS160COMNTOOLS (\r
+  @REM clear two envs so that vcvars32.bat can run successfully.\r
+  set VSINSTALLDIR=\r
+  set VCToolsVersion=\r
   if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" (\r
     if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\BuildTools" (\r
       call "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -products Microsoft.VisualStudio.Product.BuildTools -version 16,17 > vswhereInfo\r
@@ -220,6 +228,8 @@ if not defined WINSDK_PATH_FOR_RC_EXE (
   )\r
 )\r
 \r
+if /I "%1"=="VS2019" goto SetWinDDK\r
+\r
 :SetWinDDK\r
 if not defined WINDDK3790_PREFIX (\r
   set WINDDK3790_PREFIX=C:\WINDDK\3790.1830\bin\\r