Revision: 19081
          http://sourceforge.net/p/edk2/code/19081
Author:   vanjeff
Date:     2015-12-01 06:13:41 +0000 (Tue, 01 Dec 2015)
Log Message:
-----------
Sync the files in root dirctory from main trunk r19027.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <[email protected]>

Revision Links:
--------------
    http://sourceforge.net/p/edk2/code/19027

Modified Paths:
--------------
    branches/UDK2015/Edk2Setup.bat
    branches/UDK2015/Maintainers.txt
    branches/UDK2015/edksetup.bat
    branches/UDK2015/edksetup.sh

Modified: branches/UDK2015/Edk2Setup.bat
===================================================================
--- branches/UDK2015/Edk2Setup.bat      2015-12-01 04:22:16 UTC (rev 19080)
+++ branches/UDK2015/Edk2Setup.bat      2015-12-01 06:13:41 UTC (rev 19081)
@@ -62,14 +62,33 @@
 
 @if not defined ORIGINAL_PATH set "ORIGINAL_PATH=%PATH%"
 @REM Always set the WORKSPACE environment variable to the current directory
-@set "WORKSPACE=%CD%"
-@if exist "%WORKSPACE%\BaseTools" @set "BASE_TOOLS_PATH=%WORKSPACE%\BaseTools"
+@if not defined WORKSPACE (
+  @set "WORKSPACE=%CD%"
+)
+@if not exist "%BASE_TOOLS_PATH%" (
+  @if exist "%WORKSPACE%\BaseTools" (
+    set "BASE_TOOLS_PATH=%WORKSPACE%\BaseTools"
+  ) else (
+    @if defined PACKAGES_PATH (
+      @for %%i IN (%PACKAGES_PATH%) DO (
+        @if exist %%~fi\BaseTools (
+          @set BASE_TOOLS_PATH=%%~fi\BaseTools
+          @goto checkBaseTools
+        )
+      )
+    )
+  )
+)
+:checkBaseTools
+@if not defined BASE_TOOLS_PATH (
+  @echo.
+  @echo !!! ERROR !!! The BaseTools Package was not found !!!
+  @echo.
+  @goto ExitFailure
+)
 @if not exist "%WORKSPACE%\Conf" @mkdir "%WORKSPACE%\Conf"
 
-@@if not defined EDK_TOOLS_PATH @set "EDK_TOOLS_PATH=%WORKSPACE%\BaseTools"
-@rem   @set "PATH=%WORKSPACE%\BaseTools\Bin\Win32;%PATH%"
-@rem   @set WORKSPACE_TOOLS_PATH=%WORKSPACE%\BaseTools
-@rem )
+@@if not defined EDK_TOOLS_PATH @set "EDK_TOOLS_PATH=%BASE_TOOLS_PATH%"
 
 @REM Keep the existing EDK_TOOLS_PATH value, the --reset flag will set it
 @REM back to WORKSPACE\BaseTools while the --location DIRECTORY flag will
@@ -259,7 +278,7 @@
 @echo %SCRIPT_NAME% Version: %SCRIPT_VERSION%%SVN_REVISION:~11,-1%
 @echo Copyright(c) 2014, Intel Corporation. All rights reserved.
 @set HIDE_PATH=TRUE
-@call "%WORKSPACE%\BaseTools\Scripts\ShowEnvironment.bat"
+@call "%BASE_TOOLS_PATH%\Scripts\ShowEnvironment.bat"
 @set HIDE_PATH=
 @goto ExitSuccess
 
@@ -352,8 +371,8 @@
 @REM copied or replaced from the WORKSPACE\BaseTools\Conf directories' 
template files.
 :SetConf
 @if not exist "%EDK_TOOLS_PATH%\Conf" (
-    @if exist "%WORKSPACE%\BaseTools\Conf" (
-        @set "SRC_CONF=%WORKSPACE%\BaseTools\Conf"
+    @if exist "%BASE_TOOLS_PATH%\Conf" (
+        @set "SRC_CONF=%BASE_TOOLS_PATH%\Conf"
     )
 ) else (
     @set "SRC_CONF=%EDK_TOOLS_PATH%\Conf"
@@ -365,7 +384,7 @@
 
 @REM The script will test to see if the files exist, and also use the 
RESET_ENVIRONMENT flag
 @REM to overwrite the WORKSPACE\Conf *.txt files.
-@call "%WORKSPACE%\BaseTools\Scripts\ShowEnvironment.bat"
+@call "%BASE_TOOLS_PATH%\Scripts\ShowEnvironment.bat"
 @if errorlevel 1 (
     @echo Unable to copy the template files from "%SRC_CONF%" to 
"%WORKSPACE%\Conf"
     @goto ExitFailure
@@ -375,22 +394,34 @@
 @REM Set up Visual Studio if required to build the Nt32Pkg/Nt32Pkg.dsc emulator
 @if "%NT32PKG%"=="TRUE" (
     @if not defined VSINSTALLDIR @set "PATH=%ORIGINAL_PATH%"
-    @if not defined NT32_X64 @call "%WORKSPACE%\BaseTools\get_vsvars.bat"
-    @if defined NT32_X64 call 
"%WORKSPACE%\BaseTools\Scripts\SetVisualStudio.bat"
+    @if not defined NT32_X64 @call "%BASE_TOOLS_PATH%\get_vsvars.bat"
+    @if defined NT32_X64 call "%BASE_TOOLS_PATH%\Scripts\SetVisualStudio.bat"
 )
 @if "%NT32PKG%"=="TRUE" (
     @if not defined VS_PATH set "VS_PATH=%PATH%"
 )
 @if defined VS_PATH @set "PATH=%VS_PATH%"
 @if not defined VS_PATH @set "PATH=%ORIGINAL_PATH%"
-@set "PATH=%EDK_TOOLS_PATH%\Bin\Win32;%PATH%"
+@if not defined EDK_TOOLS_BIN (
+  @if exist %EDK_TOOLS_PATH%\Bin\Win32 (
+    @set EDK_TOOLS_BIN=%EDK_TOOLS_PATH%\Bin\Win32
+  ) else (
+    @echo.
+    @echo !!! ERROR !!! Cannot find BaseTools Bin Win32!!!
+    @echo Please check the directory %EDK_TOOLS_PATH%\Bin\Win32
+    @echo Or configure EDK_TOOLS_BIN env to point Win32 directory.
+    @echo. 
+    @goto ExitFailure
+  )
+)
+@set "PATH=%EDK_TOOLS_BIN%;%PATH%"
 
 @if "%REBUILD_TOOLS%"=="TRUE" @goto Rebuild
 @if "%SVN_PULL%"== "TRUE" (
     if defined PYTHONHOME (
         @REM Use the python script if possible to test is the svn command is 
available, if it fails, the user may be
         @REM able to rebuild the Win32 binaries
-        @call "%WORKSPACE%\BaseTools\Scripts\UpdateBuildVersions.py" 
--svn-test -v
+        @call "%BASE_TOOLS_PATH%\Scripts\UpdateBuildVersions.py" --svn-test -v
         @if errorlevel 1 (
             @echo ERROR : The command-line svn tool is not available and the 
Win32 binaries do not exist
             @echo         Please re-run this script again with the --rebuild 
option to attempt to build 
@@ -417,7 +448,6 @@
 
 @REM The following code is used to rebuild the Win32 BaseTools binaries - 
check that required tools are available
 :Rebuild
-@if not defined BASE_TOOLS_PATH @set "BASE_TOOLS_PATH=%WORKSPACE%\BaseTools"
 @if not exist "%BASE_TOOLS_PATH%\Source" @goto NoBaseTools
 @endlocal
 @if not defined VCINSTALLDIR @goto NoVisualStudio
@@ -430,11 +460,11 @@
     @if not exist "%PYTHONHOME%\Scripts\cxfreeze.bat" @goto NoCxFreeze
     @set "PYTHON_FREEZER_PATH=%PYTHONHOME%\Scripts"
 )
-@call "%WORKSPACE%\BaseTools\Scripts\SetVisualStudio.bat"
+@call "%BASE_TOOLS_PATH%\Scripts\SetVisualStudio.bat"
 @if errorlevel 1 @goto ExitFailure
 
 :ShowAndExit
-@call "%WORKSPACE%\BaseTools\Scripts\ShowEnvironment.bat"
+@call "%BASE_TOOLS_PATH%\Scripts\ShowEnvironment.bat"
 
 @REM 
#########################################################################################
 @REM EXIT ROUTINES

Modified: branches/UDK2015/Maintainers.txt
===================================================================
--- branches/UDK2015/Maintainers.txt    2015-12-01 04:22:16 UTC (rev 19080)
+++ branches/UDK2015/Maintainers.txt    2015-12-01 06:13:41 UTC (rev 19081)
@@ -68,7 +68,8 @@
 
 BaseTools
 W: https://github.com/tianocore/tianocore.github.io/wiki/BaseTools
-M: Yingke D Liu <[email protected]>
+M: Yonghong Zhu <[email protected]>
+M: Liming Gao <[email protected]>
 
 BeagleBoardPkg
 W: https://github.com/tianocore/tianocore.github.io/wiki/BeagleBoardPkg

Modified: branches/UDK2015/edksetup.bat
===================================================================
--- branches/UDK2015/edksetup.bat       2015-12-01 04:22:16 UTC (rev 19080)
+++ branches/UDK2015/edksetup.bat       2015-12-01 06:13:41 UTC (rev 19081)
@@ -42,9 +42,11 @@
 :SetWorkSpace
 @REM set new workspace
 @REM clear EFI_SOURCE and EDK_SOURCE for the new workspace
-set WORKSPACE=%CD%
-set EFI_SOURCE=
-set EDK_SOURCE=
+if not defined WORKSPACE (
+  set WORKSPACE=%CD%
+  set EFI_SOURCE=
+  set EDK_SOURCE=
+)
 
 :ParseArgs
 if /I "%1"=="-h" goto Usage
@@ -92,8 +94,28 @@
 shift
 
 :no_nt32
+
 if /I "%1"=="NewBuild" shift
-set EDK_TOOLS_PATH=%WORKSPACE%\BaseTools
+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
+  )
+)
+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

Modified: branches/UDK2015/edksetup.sh
===================================================================
--- branches/UDK2015/edksetup.sh        2015-12-01 04:22:16 UTC (rev 19080)
+++ branches/UDK2015/edksetup.sh        2015-12-01 06:13:41 UTC (rev 19081)
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
 # This program and the accompanying materials
 # are licensed and made available under the terms and conditions of the BSD 
License
 # which accompanies this distribution.  The full text of the license may be 
found at
@@ -78,10 +78,23 @@
   elif [ -f "$WORKSPACE/BaseTools/BuildEnv" ]
   then
     . $WORKSPACE/BaseTools/BuildEnv $*
+  elif [ -n "$PACKAGES_PATH" ]
+  then 
+    PATH_LIST=$PACKAGES_PATH
+    PATH_LIST=${PATH_LIST//:/ }
+    for DIR in $PATH_LIST
+    do
+      if [ -f "$DIR/BaseTools/BuildEnv" ]
+      then
+        export EDK_TOOLS_PATH=$DIR/BaseTools
+        . $DIR/BaseTools/BuildEnv $*
+        break
+      fi
+    done
   else
     echo BaseTools not found in your tree, and EDK_TOOLS_PATH is not set.
-    echo Please check that WORKSPACE is not set incorrectly in your
-    echo shell, or point EDK_TOOLS_PATH at the directory that contains
+    echo Please check that WORKSPACE or PACKAGES_PATH is not set incorrectly
+    echo in your shell, or point EDK_TOOLS_PATH at the directory that contains
     echo the EDK2 BuildEnv script.
     return 1
   fi


------------------------------------------------------------------------------
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741911&iu=/4140
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to