diff options
author | lhauch <lhauch@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-06-09 18:07:09 +0000 |
---|---|---|
committer | lhauch <lhauch@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-06-09 18:07:09 +0000 |
commit | 6de5f959d627648b33a2a7275c35bb9fd6856a26 (patch) | |
tree | 83c1064d7a58fe515b1cc2d5ad50787032a7a1e0 | |
parent | 8742c000dc639af1d7eb49b5791315298869d191 (diff) | |
download | edk2-platforms-6de5f959d627648b33a2a7275c35bb9fd6856a26.tar.xz |
Added an environment variable test to bypass setting the path multiple times, it checks the FRAMEWORK_TOOLS_PATH to make sure that it has not changed. If it has, it prepends the new FRAMEWORK_TOOLS_PATH setting to the PATH environment variable.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@458 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r-- | edksetup.bat | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/edksetup.bat b/edksetup.bat index 03fe4e6713..60c55c4e4f 100644 --- a/edksetup.bat +++ b/edksetup.bat @@ -29,8 +29,6 @@ @REM Check the required system environment variables
@REM
-if "%1"=="skip" goto skipbuild
-
:check_vc
if defined VCINSTALLDIR goto check_cygwin
if defined VS71COMNTOOLS (
@@ -68,14 +66,29 @@ if not exist %XMLBEANS_HOME%\lib\saxon8.jar goto no_saxon8 set WORKSPACE=%CD%
set FRAMEWORK_TOOLS_PATH=%WORKSPACE%\Tools\bin
-set PATH=%JAVA_HOME%\bin;%ANT_HOME%\bin;%XMLBEANS_HOME%\bin;%Framework_Tools_Path%;%PATH%
+
+if defined WORKSPACE_TOOLS_PATH goto check_path
+set PATH=%FRAMEWORK_TOOLS_PATH%;%JAVA_HOME%\bin;%ANT_HOME%\bin;%XMLBEANS_HOME%\bin;%PATH%
+set WORKSPACE_TOOLS_PATH=%FRAMEWORK_TOOLS_PATH%
+echo Setting the PATH variable to include the Framework_Tools_Path for this WORKSPACE
+goto path_ok
+
+:check_path
+if "%FRAMEWORK_TOOLS_PATH%"=="%WORKSPACE_TOOLS_PATH%" goto path_ok
+set PATH=%FRAMEWORK_TOOLS_PATH%;%PATH%
+set WORKSPACE_PATH=%WORKSPACE%
+echo Resetting the PATH variable to include the Framework_Tools_Path for this WORKSPACE
+
+:path_ok
+
+if "%1"=="skip" goto skipbuild
echo.
+echo WORKSPACE: %WORKSPACE%
echo JAVA_HOME: %JAVA_HOME%
echo ANT_HOME: %ANT_HOME%
echo XMLBEANS_HOME: %XMLBEANS_HOME%
echo CYGWIN_HOME: %CYGWIN_HOME%
-echo WORKSPACE: %WORKSPACE%
echo PATH: %PATH%
echo.
@@ -155,15 +168,12 @@ goto end @REM
@REM This just sets up the CLASSPATH, the rest of the environment should have been set already.
@REM
-set WORKSPACE=%CD%
-set FRAMEWORK_TOOLS_PATH=%WORKSPACE%\Tools\bin
-if exist c:\cygwin set CYGWIN_HOME=c:\cygwin
echo.
+echo WORKSPACE: %WORKSPACE%
echo JAVA_HOME: %JAVA_HOME%
echo ANT_HOME: %ANT_HOME%
echo XMLBEANS_HOME: %XMLBEANS_HOME%
echo CYGWIN_HOME: %CYGWIN_HOME%
-echo WORKSPACE: %WORKSPACE%
echo PATH: %PATH%
echo.
set CLASSPATH=%XMLBEANS_HOME%\lib\jsr173_1.0_api.jar;%XMLBEANS_HOME%\lib\xbean.jar
|