diff options
author | Yonghong Zhu <yonghong.zhu@intel.com> | 2015-12-18 06:41:38 +0000 |
---|---|---|
committer | vanjeff <vanjeff@Edk2> | 2015-12-18 06:41:38 +0000 |
commit | 818e60d95106bd68679bf4be1cef67f0d0af4b6c (patch) | |
tree | c8949344fc746af067f9dc44e7a9d2c1493861f6 | |
parent | 36f30d41c5ade03206d9f1d5fdb652a382322dac (diff) | |
download | edk2-platforms-818e60d95106bd68679bf4be1cef67f0d0af4b6c.tar.xz |
BaseTools/toolsetup.bat: fixed the error when the path contains space
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.
(Sync patch r19028 from main trunk.)
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/branches/UDK2015@19368 6f19259b-4bc3-4df7-8a09-765794883524
-rwxr-xr-x | BaseTools/toolsetup.bat | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/BaseTools/toolsetup.bat b/BaseTools/toolsetup.bat index 310ddd030c..76fd8bb6ef 100755 --- a/BaseTools/toolsetup.bat +++ b/BaseTools/toolsetup.bat @@ -322,24 +322,13 @@ goto end echo !!! WARNING !!! Will not be able to compile Python programs to .exe
echo Will setup environment to run Python scripts directly.
echo.
- goto 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
)
- 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%
|