summaryrefslogtreecommitdiffstats
path: root/edksetup.bat
diff options
context:
space:
mode:
authorYonghong Zhu <yonghong.zhu@intel.com>2016-07-15 17:41:17 +0800
committerYonghong Zhu <yonghong.zhu@intel.com>2016-07-26 10:16:48 +0800
commit910e206238e83be352e840d2e668266257fcf7fa (patch)
treecc0f2637c2e9e09daf78b668f7a105ee8209b63f /edksetup.bat
parentdaea123d247aebb01f6c54e10ed1e0b10dfae957 (diff)
downloadedk2-910e206238e83be352e840d2e668266257fcf7fa.tar.gz
edk2-910e206238e83be352e840d2e668266257fcf7fa.tar.bz2
edk2-910e206238e83be352e840d2e668266257fcf7fa.zip
Update edksetup.bat to check NASM system environment variable
If the NASM_PREFIX variable is not set, it would report warning message. If there exist the C:\nasm\nasm.exe file, it would set the NASM_PREFIX variable to C:\nasm\. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'edksetup.bat')
-rwxr-xr-xedksetup.bat10
1 files changed, 10 insertions, 0 deletions
diff --git a/edksetup.bat b/edksetup.bat
index e065b6470a..f066d869e1 100755
--- a/edksetup.bat
+++ b/edksetup.bat
@@ -125,6 +125,7 @@ if exist %EDK_TOOLS_PATH%\Source set BASE_TOOLS_PATH=%EDK_TOOLS_PATH%
IF NOT EXIST "%EDK_TOOLS_PATH%\toolsetup.bat" goto BadBaseTools
call %EDK_TOOLS_PATH%\toolsetup.bat %*
if /I "%1"=="Reconfig" shift
+goto check_NASM
goto check_cygwin
:BadBaseTools
@@ -141,6 +142,15 @@ goto check_cygwin
@echo.
goto end
+:check_NASM
+if not defined NASM_PREFIX (
+ @echo.
+ @echo !!! WARNING !!! NASM_PREFIX environment variable is not set
+ @if exist "C:\nasm\nasm.exe" @set "NASM_PREFIX=C:\nasm\"
+ @if exist "C:\nasm\nasm.exe" @echo Found nasm.exe, setting the environment variable to C:\nasm\
+ @if not exist "C:\nasm\nasm.exe" echo Attempting to build modules that require NASM will fail.
+)
+
:check_cygwin
if defined CYGWIN_HOME (
if not exist "%CYGWIN_HOME%" (