mirror of https://github.com/acidanthera/audk.git
BaseTools: Move VS2019 env setting after VS2017 env setting
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2896 Keep the latest VS version as the last one Signed-off-by: Liming Gao <liming.gao@intel.com> Cc: Bob Feng <bob.c.feng@intel.com> Cc: Yuwei Chen <yuwei.chen@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
This commit is contained in:
parent
43bec9ea3d
commit
a5110b8955
|
@ -3,7 +3,7 @@
|
|||
@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-2019, Intel Corporation. All rights reserved.<BR>
|
||||
@REM Copyright (c) 2016-2020, Intel Corporation. All rights reserved.<BR>
|
||||
@REM
|
||||
@REM SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
@REM
|
||||
|
@ -108,62 +108,6 @@ if defined VS140COMNTOOLS (
|
|||
)
|
||||
if /I "%1"=="VS2015" goto SetWinDDK
|
||||
|
||||
:SetVS2019
|
||||
if not defined VS160COMNTOOLS (
|
||||
if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" (
|
||||
if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\BuildTools" (
|
||||
call "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -products Microsoft.VisualStudio.Product.BuildTools -version 16,17 > vswhereInfo
|
||||
for /f "usebackq tokens=1* delims=: " %%i in (vswhereInfo) do (
|
||||
if /i "%%i"=="installationPath" call "%%j\VC\Auxiliary\Build\vcvars32.bat"
|
||||
)
|
||||
del vswhereInfo
|
||||
) else (
|
||||
call "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -version 16,17 > vswhereInfo
|
||||
for /f "usebackq tokens=1* delims=: " %%i in (vswhereInfo) do (
|
||||
if /i "%%i"=="installationPath" call "%%j\VC\Auxiliary\Build\vcvars32.bat"
|
||||
)
|
||||
del vswhereInfo
|
||||
)
|
||||
) else if exist "%ProgramFiles%\Microsoft Visual Studio\Installer\vswhere.exe" (
|
||||
if exist "%ProgramFiles%\Microsoft Visual Studio\2019\BuildTools" (
|
||||
call "%ProgramFiles%\Microsoft Visual Studio\Installer\vswhere.exe" -products Microsoft.VisualStudio.Product.BuildTools -version 16,17 > vswhereInfo
|
||||
for /f "usebackq tokens=1* delims=: " %%i in (vswhereInfo) do (
|
||||
if /i "%%i"=="installationPath" call "%%j\VC\Auxiliary\Build\vcvars32.bat"
|
||||
)
|
||||
del vswhereInfo
|
||||
) else (
|
||||
call "%ProgramFiles%\Microsoft Visual Studio\Installer\vswhere.exe" -version 16,17 > vswhereInfo
|
||||
for /f "usebackq tokens=1* delims=: " %%i in (vswhereInfo) do (
|
||||
if /i "%%i"=="installationPath" call "%%j\VC\Auxiliary\Build\vcvars32.bat"
|
||||
)
|
||||
del vswhereInfo
|
||||
)
|
||||
) else (
|
||||
if /I "%1"=="VS2019" goto ToolNotInstall
|
||||
goto SetWinDDK
|
||||
)
|
||||
)
|
||||
|
||||
if defined VCToolsInstallDir (
|
||||
if not defined VS2019_PREFIX (
|
||||
set "VS2019_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\"
|
||||
)
|
||||
)
|
||||
)
|
||||
if not defined WINSDK_PATH_FOR_RC_EXE (
|
||||
if defined WINSDK10_PREFIX (
|
||||
set "WINSDK_PATH_FOR_RC_EXE=%WINSDK10_PREFIX%x86"
|
||||
)
|
||||
)
|
||||
|
||||
:SetVS2017
|
||||
if not defined VS150COMNTOOLS (
|
||||
if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" (
|
||||
|
@ -220,6 +164,62 @@ if not defined WINSDK_PATH_FOR_RC_EXE (
|
|||
)
|
||||
)
|
||||
|
||||
:SetVS2019
|
||||
if not defined VS160COMNTOOLS (
|
||||
if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" (
|
||||
if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\BuildTools" (
|
||||
call "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -products Microsoft.VisualStudio.Product.BuildTools -version 16,17 > vswhereInfo
|
||||
for /f "usebackq tokens=1* delims=: " %%i in (vswhereInfo) do (
|
||||
if /i "%%i"=="installationPath" call "%%j\VC\Auxiliary\Build\vcvars32.bat"
|
||||
)
|
||||
del vswhereInfo
|
||||
) else (
|
||||
call "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -version 16,17 > vswhereInfo
|
||||
for /f "usebackq tokens=1* delims=: " %%i in (vswhereInfo) do (
|
||||
if /i "%%i"=="installationPath" call "%%j\VC\Auxiliary\Build\vcvars32.bat"
|
||||
)
|
||||
del vswhereInfo
|
||||
)
|
||||
) else if exist "%ProgramFiles%\Microsoft Visual Studio\Installer\vswhere.exe" (
|
||||
if exist "%ProgramFiles%\Microsoft Visual Studio\2019\BuildTools" (
|
||||
call "%ProgramFiles%\Microsoft Visual Studio\Installer\vswhere.exe" -products Microsoft.VisualStudio.Product.BuildTools -version 16,17 > vswhereInfo
|
||||
for /f "usebackq tokens=1* delims=: " %%i in (vswhereInfo) do (
|
||||
if /i "%%i"=="installationPath" call "%%j\VC\Auxiliary\Build\vcvars32.bat"
|
||||
)
|
||||
del vswhereInfo
|
||||
) else (
|
||||
call "%ProgramFiles%\Microsoft Visual Studio\Installer\vswhere.exe" -version 16,17 > vswhereInfo
|
||||
for /f "usebackq tokens=1* delims=: " %%i in (vswhereInfo) do (
|
||||
if /i "%%i"=="installationPath" call "%%j\VC\Auxiliary\Build\vcvars32.bat"
|
||||
)
|
||||
del vswhereInfo
|
||||
)
|
||||
) else (
|
||||
if /I "%1"=="VS2019" goto ToolNotInstall
|
||||
goto SetWinDDK
|
||||
)
|
||||
)
|
||||
|
||||
if defined VCToolsInstallDir (
|
||||
if not defined VS2019_PREFIX (
|
||||
set "VS2019_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\"
|
||||
)
|
||||
)
|
||||
)
|
||||
if not defined WINSDK_PATH_FOR_RC_EXE (
|
||||
if defined WINSDK10_PREFIX (
|
||||
set "WINSDK_PATH_FOR_RC_EXE=%WINSDK10_PREFIX%x86"
|
||||
)
|
||||
)
|
||||
|
||||
:SetWinDDK
|
||||
if not defined WINDDK3790_PREFIX (
|
||||
set WINDDK3790_PREFIX=C:\WINDDK\3790.1830\bin\
|
||||
|
|
Loading…
Reference in New Issue