summaryrefslogtreecommitdiffstats
path: root/BaseTools/set_vsprefix_envs.bat
diff options
context:
space:
mode:
authorwilson_chen <wilson_chen@phoenix.com>2024-07-26 17:31:46 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2024-07-30 11:15:27 +0000
commit91a822749a6664dcaf0f67a837dcf0cd05783d17 (patch)
tree22ec48d9d914c8582e48a91ea302897fbdddef82 /BaseTools/set_vsprefix_envs.bat
parent621a30c676d55bfe0049f65e98f65104528218db (diff)
downloadedk2-91a822749a6664dcaf0f67a837dcf0cd05783d17.tar.gz
edk2-91a822749a6664dcaf0f67a837dcf0cd05783d17.tar.bz2
edk2-91a822749a6664dcaf0f67a837dcf0cd05783d17.zip
BaseTools: fix build error with TOOL_CHAIN_TAG VS2015 & VS2015x86
Start the build with TOOL_CHAIN_TAG VS2015 by launch: Build -t VS2015 ERROR: Would get following build error message: 'c:\Program' is not recognized as an internal or external command, operable program or batch file. NMAKE : fatal error U1077: '"c:\Program Files\Windows Kits\8.1\bin\x86\\rc.exe' : return code '0x1' Stop. Fix the build error, Tested : TOOL_CHAIN_TAG = VS2015 (>Build -t VS2015) TOOL_CHAIN_TAG = VS2015x86 (>Build -t VS2015x86) Signed-off-by: wilson_chen <wilson_chen@phoenix.com>
Diffstat (limited to 'BaseTools/set_vsprefix_envs.bat')
-rw-r--r--BaseTools/set_vsprefix_envs.bat12
1 files changed, 10 insertions, 2 deletions
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