X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=BaseTools%2Fset_vsprefix_envs.bat;h=95f30f7aefb108d3b7e7de4fea40f45f743ef4ca;hb=f03859ea6c8fddeaa3a5cc3d9a3461728ce538aa;hp=b05b1d222083cfcc712afdc99d8b537ebda93607;hpb=40d7406f6e151ccbcbebd5dae1e137d6fb0ac981;p=mirror_edk2.git diff --git a/BaseTools/set_vsprefix_envs.bat b/BaseTools/set_vsprefix_envs.bat index b05b1d2220..95f30f7aef 100644 --- a/BaseTools/set_vsprefix_envs.bat +++ b/BaseTools/set_vsprefix_envs.bat @@ -3,16 +3,9 @@ @REM however it may be executed directly from the BaseTools project folder @REM if the file is not executed within a WORKSPACE\BaseTools folder. @REM -@REM Copyright (c) 2016, Intel Corporation. All rights reserved.
+@REM Copyright (c) 2016-2017, Intel Corporation. All rights reserved.
@REM -@REM This program and the accompanying materials are licensed and made available -@REM under the terms and conditions of the BSD License which accompanies this -@REM distribution. The full text of the license may be found at: -@REM http://opensource.org/licenses/bsd-license.php -@REM -@REM THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -@REM WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR -@REM IMPLIED. +@REM SPDX-License-Identifier: BSD-2-Clause-Patent @REM @echo off @@ -90,6 +83,37 @@ if defined VS140COMNTOOLS ( ) ) +@REM set VS2017 +if not defined VS150COMNTOOLS ( + if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" ( + for /f "usebackq tokens=1* delims=: " %%i in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"`) do ( + if /i "%%i"=="installationPath" call "%%j\VC\Auxiliary\Build\vcvars32.bat" + ) + ) else if exist "%ProgramFiles%\Microsoft Visual Studio\Installer\vswhere.exe" ( + for /f "usebackq tokens=1* delims=: " %%i in (`"%ProgramFiles%\Microsoft Visual Studio\Installer\vswhere.exe"`) do ( + if /i "%%i"=="installationPath" call "%%j\VC\Auxiliary\Build\vcvars32.bat" + ) + ) else ( + goto SetWinDDK + ) +) + +if defined VCToolsInstallDir ( + if not defined VS2017_PREFIX ( + set "VS2017_PREFIX=%VCToolsInstallDir%" + ) +) +if not defined WINSDK10_PREFIX ( + if defined WindowsSdkVerBinPath ( + set "WINSDK10_PREFIX=%WindowsSdkVerBinPath%" + ) else if exist "%ProgramFiles(x86)%\Windows Kits\10\bin" ( + set "WINSDK10_PREFIX=%ProgramFiles(x86)%\Windows Kits\10\bin\" + ) else if exist "%ProgramFiles%\Windows Kits\10\bin" ( + set "WINSDK10_PREFIX=%ProgramFiles%\Windows Kits\10\bin\" + ) +) + +:SetWinDDK if not defined WINDDK3790_PREFIX ( set WINDDK3790_PREFIX=C:\WINDDK\3790.1830\bin\ )