diff options
-rwxr-xr-x | BaseTools/Conf/tools_def.template | 4 | ||||
-rw-r--r-- | BaseTools/set_vsprefix_envs.bat | 12 |
2 files changed, 12 insertions, 4 deletions
diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template index 13cf0f91b6..76aaae7261 100755 --- a/BaseTools/Conf/tools_def.template +++ b/BaseTools/Conf/tools_def.template @@ -67,8 +67,8 @@ DEFINE WINSDK_BIN = ENV(WINSDK_PREFIX) DEFINE WINSDKx86_BIN = ENV(WINSDKx86_PREFIX)
# Microsoft Visual Studio 2015 Professional Edition
-DEFINE WINSDK81_BIN = ENV(WINSDK81_PREFIX)x86\
-DEFINE WINSDK81x86_BIN = ENV(WINSDK81x86_PREFIX)x64
+DEFINE WINSDK81_BIN = ENV(WINSDK81_PREFIX)x64
+DEFINE WINSDK81x86_BIN = ENV(WINSDK81x86_PREFIX)x86
# Microsoft Visual Studio 2017/2019/2022 Professional Edition
DEFINE WINSDK10_BIN = ENV(WINSDK10_PREFIX)DEF(VS_HOST)
diff --git a/BaseTools/set_vsprefix_envs.bat b/BaseTools/set_vsprefix_envs.bat index 39e4e004b5..df2c771951 100644 --- a/BaseTools/set_vsprefix_envs.bat +++ b/BaseTools/set_vsprefix_envs.bat @@ -35,10 +35,18 @@ if defined VS140COMNTOOLS ( set "VS2015_PREFIX=%VS140COMNTOOLS:~0,-14%"
)
if not defined WINSDK81_PREFIX (
- set "WINSDK81_PREFIX=c:\Program Files\Windows Kits\8.1\bin\"
+ if exist "%ProgramFiles%\Windows Kits\8.1\bin" (
+ set "WINSDK81_PREFIX=%ProgramFiles%\Windows Kits\8.1\bin\"
+ ) else if exist "%ProgramFiles(x86)%\Windows Kits\8.1\bin" (
+ set "WINSDK81_PREFIX=%ProgramFiles(x86)%\Windows Kits\8.1\bin\"
+ )
)
if not defined WINSDK81x86_PREFIX (
- set "WINSDK81x86_PREFIX=c:\Program Files (x86)\Windows Kits\8.1\bin\"
+ if exist "%ProgramFiles(x86)%\Windows Kits\8.1\bin" (
+ set "WINSDK81x86_PREFIX=%ProgramFiles(x86)%\Windows Kits\8.1\bin\"
+ ) else if exist "%ProgramFiles%\Windows Kits\8.1\bin" (
+ set "WINSDK81x86_PREFIX=%ProgramFiles%\Windows Kits\8.1\bin\"
+ )
)
) else (
if /I "%1"=="VS2015" goto ToolNotInstall
|