summaryrefslogtreecommitdiff
path: root/edksetup.bat
diff options
context:
space:
mode:
authorLiming Gao <liming.gao@intel.com>2015-10-08 09:29:09 +0000
committerlgao4 <lgao4@Edk2>2015-10-08 09:29:09 +0000
commitdcc807869986f9e4e5afdf62206f467bec261bc8 (patch)
tree5dd7f3249321a4526cce7824f322b05f5907cbe9 /edksetup.bat
parentc4f52e128fef070954e34e91fb4e9c458d9fc1e7 (diff)
downloadedk2-dcc807869986f9e4e5afdf62206f467bec261bc8.zip
edk2-dcc807869986f9e4e5afdf62206f467bec261bc8.tar.gz
edk2-dcc807869986f9e4e5afdf62206f467bec261bc8.tar.bz2
BaseTools: Update edksetup.bat to support multiple workspaces
1. Update edksetup.bat and toolsetup.bat to handle PACKAGES_PATH. BaseTools directory may be in PACKAGES_PATH instead of WORKSAPCE. 2. Introduce EDK_TOOLS_BIN env points to the windows binary tools dir. Windows BaseTools Win32 may be a separate directory. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Wu Hao A <hao.a.wu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18582 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'edksetup.bat')
-rwxr-xr-xedksetup.bat30
1 files changed, 26 insertions, 4 deletions
diff --git a/edksetup.bat b/edksetup.bat
index 25a5a6e..b63c299 100755
--- a/edksetup.bat
+++ b/edksetup.bat
@@ -42,9 +42,11 @@ if %WORKSPACE% == %CD% (
: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 @@ if not defined VCINSTALLDIR (
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