]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools: Update toolsetup.bat to support the case without EDK_TOOLS_BIN
authorLiming Gao <liming.gao@intel.com>
Fri, 25 Aug 2017 08:51:49 +0000 (16:51 +0800)
committerLiming Gao <liming.gao@intel.com>
Tue, 29 Aug 2017 01:30:32 +0000 (09:30 +0800)
When EDK_TOOLS_BIN is not set, %EDK_TOOLS_PATH%\Bin\Win32 will be used as the
binary tool directory. But, %EDK_TOOLS_PATH%\Bin\Win32 may not exist. On this
case, toolsetup.bat should continue to do the other setting, such VS tool
chain and tool conf file copy.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
BaseTools/toolsetup.bat

index 3801ce033ff619d50df66cb2bf296f6c26359151..51c276060ddb5be71bed57b335ca8cde716ebac8 100755 (executable)
@@ -118,16 +118,13 @@ if /I "%1"=="/?" goto Usage
 :set_PATH\r
   if defined WORKSPACE_TOOLS_PATH goto check_PATH\r
   if not defined EDK_TOOLS_BIN (\r
 :set_PATH\r
   if defined WORKSPACE_TOOLS_PATH goto check_PATH\r
   if not defined EDK_TOOLS_BIN (\r
-    if exist %EDK_TOOLS_PATH%\Bin\Win32 (\r
-      set EDK_TOOLS_BIN=%EDK_TOOLS_PATH%\Bin\Win32\r
-    ) else (\r
-      set "PATH=%EDK_TOOLS_PATH%\Bin\Win32;%PATH%"\r
+    set EDK_TOOLS_BIN=%EDK_TOOLS_PATH%\Bin\Win32\r
+    if not exist %EDK_TOOLS_PATH%\Bin\Win32 (\r
       echo.\r
       echo !!! ERROR !!! Cannot find BaseTools Bin Win32!!!\r
       echo Please check the directory %EDK_TOOLS_PATH%\Bin\Win32\r
       echo Or configure EDK_TOOLS_BIN env to point Win32 directory.\r
       echo. \r
       echo.\r
       echo !!! ERROR !!! Cannot find BaseTools Bin Win32!!!\r
       echo Please check the directory %EDK_TOOLS_PATH%\Bin\Win32\r
       echo Or configure EDK_TOOLS_BIN env to point Win32 directory.\r
       echo. \r
-      goto check_build_environment\r
     )\r
   )\r
   set PATH=%EDK_TOOLS_BIN%;%PATH%\r
     )\r
   )\r
   set PATH=%EDK_TOOLS_BIN%;%PATH%\r
@@ -137,16 +134,13 @@ if /I "%1"=="/?" goto Usage
 :check_PATH\r
   if "%EDK_TOOLS_PATH%"=="%WORKSPACE_TOOLS_PATH%" goto PATH_ok\r
   if not defined EDK_TOOLS_BIN (\r
 :check_PATH\r
   if "%EDK_TOOLS_PATH%"=="%WORKSPACE_TOOLS_PATH%" goto PATH_ok\r
   if not defined EDK_TOOLS_BIN (\r
-    if exist %EDK_TOOLS_PATH%\Bin\Win32 (\r
-      set EDK_TOOLS_BIN=%EDK_TOOLS_PATH%\Bin\Win32\r
-    ) else (\r
-      set "PATH=%EDK_TOOLS_PATH%\Bin\Win32;%PATH%"\r
+    set EDK_TOOLS_BIN=%EDK_TOOLS_PATH%\Bin\Win32\r
+    if not exist %EDK_TOOLS_PATH%\Bin\Win32 (\r
       echo.\r
       echo !!! ERROR !!! Cannot find BaseTools Bin Win32!!!\r
       echo Please check the directory %EDK_TOOLS_PATH%\Bin\Win32\r
       echo Or configure EDK_TOOLS_BIN env to point Win32 directory.\r
       echo. \r
       echo.\r
       echo !!! ERROR !!! Cannot find BaseTools Bin Win32!!!\r
       echo Please check the directory %EDK_TOOLS_PATH%\Bin\Win32\r
       echo Or configure EDK_TOOLS_BIN env to point Win32 directory.\r
       echo. \r
-      goto check_build_environment\r
     )\r
   )\r
   set PATH=%EDK_TOOLS_BIN%;%PATH%\r
     )\r
   )\r
   set PATH=%EDK_TOOLS_BIN%;%PATH%\r
@@ -260,6 +254,7 @@ echo.
 if defined FORCE_REBUILD goto check_build_environment\r
 if defined REBUILD goto check_build_environment\r
 if not exist "%EDK_TOOLS_PATH%" goto check_build_environment\r
 if defined FORCE_REBUILD goto check_build_environment\r
 if defined REBUILD goto check_build_environment\r
 if not exist "%EDK_TOOLS_PATH%" goto check_build_environment\r
+if not exist "%EDK_TOOLS_BIN%"  goto check_build_environment\r
 \r
 IF NOT EXIST "%EDK_TOOLS_BIN%\BootSectImage.exe" goto check_c_tools\r
 IF NOT EXIST "%EDK_TOOLS_BIN%\EfiLdrImage.exe" goto check_c_tools\r
 \r
 IF NOT EXIST "%EDK_TOOLS_BIN%\BootSectImage.exe" goto check_c_tools\r
 IF NOT EXIST "%EDK_TOOLS_BIN%\EfiLdrImage.exe" goto check_c_tools\r