]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools/toolsetup.bat: fixed the error when the path contains space
authorYonghong Zhu <yonghong.zhu@intel.com>
Mon, 30 Nov 2015 03:43:25 +0000 (03:43 +0000)
committeryzhu52 <yzhu52@Edk2>
Mon, 30 Nov 2015 03:43:25 +0000 (03:43 +0000)
We have a new simple and effective method to resolve the original issue
that the PATH env's update error when the path contains space, so this
patch remove the last check in and use the new method to fix the original
issue.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19028 6f19259b-4bc3-4df7-8a09-765794883524

BaseTools/toolsetup.bat

index 310ddd030c077debab1e0c3b88e1c9ff1324515a..76fd8bb6ef9e78188f73c4d93c3511e72dc2ba7f 100755 (executable)
@@ -322,24 +322,13 @@ goto end
       echo !!! WARNING !!! Will not be able to compile Python programs to .exe\r
       echo Will setup environment to run Python scripts directly.\r
       echo.\r
-      goto UpdatePATH\r
+      set "PATH=%BASETOOLS_PYTHON_SOURCE%\Trim;%PATH%"\r
+      set "PATH=%BASETOOLS_PYTHON_SOURCE%\GenFds;%PATH%"\r
+      set "PATH=%BASETOOLS_PYTHON_SOURCE%\build;%PATH%"\r
+      set PATHEXT=%PATHEXT%;.py\r
     )\r
-    else (\r
-      goto UpdateEnv\r
-    )\r
-  )\r
-  else (\r
-    goto UpdateEnv\r
   )\r
\r
-:UpdatePATH\r
-  set PATH=%BASETOOLS_PYTHON_SOURCE%\Trim;%PATH%\r
-  set PATH=%BASETOOLS_PYTHON_SOURCE%\GenFds;%PATH%\r
-  set PATH=%BASETOOLS_PYTHON_SOURCE%\build;%PATH%\r
-  set PATHEXT=%PATHEXT%;.py\r
-  goto UpdateEnv\r
\r
-:UpdateEnv\r
+  \r
   echo BASE_TOOLS_PATH     = %BASE_TOOLS_PATH%\r
   echo     PYTHON_PATH     = %PYTHON_PATH%\r
   echo PYTHON_FREEZER_PATH = %PYTHON_FREEZER_PATH%\r