X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=edksetup.bat;h=f066d869e1e3f8e146dc8e64a554e50c638da84d;hp=b69bd26857f573bc37c9e05437d6adb513bd0380;hb=3e14edf82031845233f3825ac9239609c0ee98fc;hpb=5d9cd24ede010b95b4e7ca891de1c9c10a0faa2e diff --git a/edksetup.bat b/edksetup.bat index b69bd26857..f066d869e1 100755 --- a/edksetup.bat +++ b/edksetup.bat @@ -1,7 +1,7 @@ @REM @file @REM Windows batch file to setup a WORKSPACE environment @REM -@REM Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.
+@REM Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
@REM This program and the accompanying materials @REM are licensed and made available under the terms and conditions of the BSD License @REM which accompanies this distribution. The full text of the license may be found at @@ -100,21 +100,23 @@ shift :no_nt32 if /I "%1"=="NewBuild" shift -if exist %WORKSPACE%\BaseTools ( - set EDK_TOOLS_PATH=%WORKSPACE%\BaseTools -) else ( - if defined PACKAGES_PATH ( - for %%i IN (%PACKAGES_PATH%) DO ( - if exist %%~fi\BaseTools ( - set EDK_TOOLS_PATH=%%~fi\BaseTools - goto checkBaseTools +if not defined EDK_TOOLS_PATH ( + if exist %WORKSPACE%\BaseTools ( + set EDK_TOOLS_PATH=%WORKSPACE%\BaseTools + ) else ( + if defined PACKAGES_PATH ( + for %%i IN (%PACKAGES_PATH%) DO ( + if exist %%~fi\BaseTools ( + set EDK_TOOLS_PATH=%%~fi\BaseTools + goto checkBaseTools + ) ) + ) else ( + echo. + echo !!! ERROR !!! Cannot find BaseTools !!! + echo. + goto BadBaseTools ) - ) else ( - echo. - echo !!! ERROR !!! Cannot find BaseTools !!! - echo. - goto BadBaseTools ) ) if exist %EDK_TOOLS_PATH%\Source set BASE_TOOLS_PATH=%EDK_TOOLS_PATH% @@ -123,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 @@ -139,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%" (