]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/set_vsprefix_envs.bat
BaseTool: Add cache for the result of SkipAutogen.
[mirror_edk2.git] / BaseTools / set_vsprefix_envs.bat
index b05b1d222083cfcc712afdc99d8b537ebda93607..ed83222a24c89b99c5fe807c4b5c454d984ce9a8 100644 (file)
@@ -3,7 +3,7 @@
 @REM   however it may be executed directly from the BaseTools project folder\r
 @REM   if the file is not executed within a WORKSPACE\BaseTools folder.\r
 @REM\r
-@REM Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>\r
+@REM Copyright (c) 2016-2017, Intel Corporation. All rights reserved.<BR>\r
 @REM\r
 @REM This program and the accompanying materials are licensed and made available\r
 @REM under the terms and conditions of the BSD License which accompanies this\r
@@ -90,6 +90,37 @@ if defined VS140COMNTOOLS (
   )\r
 )\r
 \r
+@REM set VS2017\r
+if not defined VS150COMNTOOLS (\r
+  if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" (\r
+    for /f "usebackq tokens=1* delims=: " %%i in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"`) do (\r
+      if /i "%%i"=="installationPath" call "%%j\VC\Auxiliary\Build\vcvars32.bat"\r
+    )\r
+  ) else if exist "%ProgramFiles%\Microsoft Visual Studio\Installer\vswhere.exe" (\r
+    for /f "usebackq tokens=1* delims=: " %%i in (`"%ProgramFiles%\Microsoft Visual Studio\Installer\vswhere.exe"`) do (\r
+      if /i "%%i"=="installationPath" call "%%j\VC\Auxiliary\Build\vcvars32.bat"\r
+    )\r
+  ) else (\r
+    goto SetWinDDK\r
+  )\r
+)\r
+\r
+if defined VCToolsInstallDir (\r
+  if not defined VS2017_PREFIX (\r
+    set "VS2017_PREFIX=%VCToolsInstallDir%"\r
+  )\r
+)\r
+if not defined WINSDK10_PREFIX (\r
+  if defined WindowsSdkVerBinPath (\r
+    set "WINSDK10_PREFIX=%WindowsSdkVerBinPath%"\r
+  ) else if exist "%ProgramFiles(x86)%\Windows Kits\10\bin" (\r
+    set "WINSDK10_PREFIX=%ProgramFiles(x86)%\Windows Kits\10\bin\"\r
+  ) else if exist "%ProgramFiles%\Windows Kits\10\bin" (\r
+    set "WINSDK10_PREFIX=%ProgramFiles%\Windows Kits\10\bin\"\r
+  )\r
+)\r
+\r
+:SetWinDDK\r
 if not defined WINDDK3790_PREFIX (\r
   set WINDDK3790_PREFIX=C:\WINDDK\3790.1830\bin\\r
 )\r