summaryrefslogtreecommitdiff
path: root/BaseTools/toolsetup.bat
diff options
context:
space:
mode:
authorYonghong Zhu <yonghong.zhu@intel.com>2015-11-17 07:45:04 +0000
committeryzhu52 <yzhu52@Edk2>2015-11-17 07:45:04 +0000
commit1834aeeac68677cb2040b101428966a5654d73dc (patch)
treec0449be71c8f69866f32446521b199ae8defe3b8 /BaseTools/toolsetup.bat
parent868c9c35a6cf0ceec4056e348c3157d8226925ec (diff)
downloadedk2-1834aeeac68677cb2040b101428966a5654d73dc.zip
edk2-1834aeeac68677cb2040b101428966a5654d73dc.tar.gz
edk2-1834aeeac68677cb2040b101428966a5654d73dc.tar.bz2
BaseTools/toolsetup.bat: fixed the error when the path contains space
when the path contains space, it will report error for PATH Environment update. 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@18852 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools/toolsetup.bat')
-rwxr-xr-xBaseTools/toolsetup.bat21
1 files changed, 16 insertions, 5 deletions
diff --git a/BaseTools/toolsetup.bat b/BaseTools/toolsetup.bat
index 59874c5..310ddd0 100755
--- a/BaseTools/toolsetup.bat
+++ b/BaseTools/toolsetup.bat
@@ -322,13 +322,24 @@ goto end
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%