Revision: 19074
          http://sourceforge.net/p/edk2/code/19074
Author:   vanjeff
Date:     2015-12-01 02:30:36 +0000 (Tue, 01 Dec 2015)
Log Message:
-----------
BaseTools/toolsetup.bat: fixed the error when the path contains space

when the path contains space, it will report error for PATH Environment
update.

(Sync patch r18852 from main trunk.)

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <[email protected]>
Reviewed-by: Liming Gao <[email protected]>

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

Modified Paths:
--------------
    branches/UDK2015/BaseTools/toolsetup.bat

Modified: branches/UDK2015/BaseTools/toolsetup.bat
===================================================================
--- branches/UDK2015/BaseTools/toolsetup.bat    2015-12-01 02:30:17 UTC (rev 
19073)
+++ branches/UDK2015/BaseTools/toolsetup.bat    2015-12-01 02:30:36 UTC (rev 
19074)
@@ -322,13 +322,24 @@
       echo !!! WARNING !!! Will not be able to compile Python programs to .exe
       echo Will setup environment to run Python scripts directly.
       echo.
-      set PATH=%BASETOOLS_PYTHON_SOURCE%\Trim;%PATH%
-      set PATH=%BASETOOLS_PYTHON_SOURCE%\GenFds;%PATH%
-      set PATH=%BASETOOLS_PYTHON_SOURCE%\build;%PATH%
-      set PATHEXT=%PATHEXT%;.py
+      goto UpdatePATH
     )
+    else (
+      goto UpdateEnv
+    )
   )
-  
+  else (
+    goto UpdateEnv
+  )
+ 
+:UpdatePATH
+  set PATH=%BASETOOLS_PYTHON_SOURCE%\Trim;%PATH%
+  set PATH=%BASETOOLS_PYTHON_SOURCE%\GenFds;%PATH%
+  set PATH=%BASETOOLS_PYTHON_SOURCE%\build;%PATH%
+  set PATHEXT=%PATHEXT%;.py
+  goto UpdateEnv
+ 
+:UpdateEnv
   echo BASE_TOOLS_PATH     = %BASE_TOOLS_PATH%
   echo     PYTHON_PATH     = %PYTHON_PATH%
   echo PYTHON_FREEZER_PATH = %PYTHON_FREEZER_PATH%


------------------------------------------------------------------------------
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