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 <[email protected]> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <[email protected]> --- edksetup.bat | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/edksetup.bat b/edksetup.bat index e065b64..f066d86 100755 --- a/edksetup.bat +++ b/edksetup.bat @@ -123,10 +123,11 @@ if exist %EDK_TOOLS_PATH%\Source set BASE_TOOLS_PATH=%EDK_TOOLS_PATH% :checkBaseTools 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 @REM REM Need the BaseTools Package in order to build @@ -139,10 +140,19 @@ goto check_cygwin @echo set EDK_TOOLS_PATH=C:\MyTools\BaseTools @echo The setup script, toolsetup.bat must reside in this folder. @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%" ( @echo. @echo !!! WARNING !!! CYGWIN_HOME not found, gcc build may not be used !!! -- 2.6.1.windows.1 _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

