Re: [edk2] [Patch] BaseTools/toolsetup.bat: fixed the error when the path contains space
Hi Carl, Your original fix is : set PATH="%BASETOOLS_PYTHON_SOURCE%\Trim;%PATH%" Now the fix is: set "PATH=%BASETOOLS_PYTHON_SOURCE%\Trim;%PATH%" The difference is the quotation's location. You may have a try on the cmd like: set PATH="%PATH%", then you would find the original works tool cannot work, eg: build Best Regards, Zhu Yonghong -Original Message- From: Miller, Carl H [mailto:carl.mil...@pnnl.gov] Sent: Saturday, November 21, 2015 5:17 AM To: Gao, Liming; Zhu, Yonghong; edk2-devel@lists.01.org Cc: Hauch, Larry; Thompson, James J Subject: RE: [edk2] [Patch] BaseTools/toolsetup.bat: fixed the error when the path contains space looks like my original fix submittal, which Mr. Gao said caused failure on his system. -Original Message- From: Gao, Liming [mailto:liming@intel.com] Sent: Friday, November 20, 2015 1:10 AM To: Zhu, Yonghong; edk2-devel@lists.01.org Cc: Hauch, Larry; Miller, Carl H Subject: RE: [edk2] [Patch] BaseTools/toolsetup.bat: fixed the error when the path contains space Reviewed-by: Liming Gao <liming@intel.com> -Original Message- From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Yonghong Zhu Sent: Friday, November 20, 2015 5:08 PM To: edk2-devel@lists.01.org Cc: Hauch, Larry; carl.mil...@pnnl.gov Subject: [edk2] [Patch] 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. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong@intel.com> --- toolsetup.bat | 21 + 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/toolsetup.bat b/toolsetup.bat index 310ddd0..76fd8bb 100755 --- a/toolsetup.bat +++ b/toolsetup.bat @@ -320,28 +320,17 @@ goto end if not defined PYTHON_FREEZER_PATH ( echo. 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% echo. -- 2.6.1.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [Patch] BaseTools/toolsetup.bat: fixed the error when the path contains space
looks like my original fix submittal, which Mr. Gao said caused failure on his system. -Original Message- From: Gao, Liming [mailto:liming@intel.com] Sent: Friday, November 20, 2015 1:10 AM To: Zhu, Yonghong; edk2-devel@lists.01.org Cc: Hauch, Larry; Miller, Carl H Subject: RE: [edk2] [Patch] BaseTools/toolsetup.bat: fixed the error when the path contains space Reviewed-by: Liming Gao <liming@intel.com> -Original Message- From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Yonghong Zhu Sent: Friday, November 20, 2015 5:08 PM To: edk2-devel@lists.01.org Cc: Hauch, Larry; carl.mil...@pnnl.gov Subject: [edk2] [Patch] 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. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong@intel.com> --- toolsetup.bat | 21 + 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/toolsetup.bat b/toolsetup.bat index 310ddd0..76fd8bb 100755 --- a/toolsetup.bat +++ b/toolsetup.bat @@ -320,28 +320,17 @@ goto end if not defined PYTHON_FREEZER_PATH ( echo. 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% echo. -- 2.6.1.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [Patch] BaseTools/toolsetup.bat: fixed the error when the path contains space
Reviewed-by: Liming Gao-Original Message- From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Yonghong Zhu Sent: Friday, November 20, 2015 5:08 PM To: edk2-devel@lists.01.org Cc: Hauch, Larry; carl.mil...@pnnl.gov Subject: [edk2] [Patch] 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. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu --- toolsetup.bat | 21 + 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/toolsetup.bat b/toolsetup.bat index 310ddd0..76fd8bb 100755 --- a/toolsetup.bat +++ b/toolsetup.bat @@ -320,28 +320,17 @@ goto end if not defined PYTHON_FREEZER_PATH ( echo. 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% echo. -- 2.6.1.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [Patch] BaseTools/toolsetup.bat: fixed the error when the path contains space
Reviewed-by: Liming Gao-Original Message- From: Zhu, Yonghong Sent: Thursday, November 12, 2015 4:24 PM To: edk2-devel@lists.01.org Cc: Gao, Liming; carl.mil...@pnnl.gov Subject: [Patch] 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 --- toolsetup.bat | 21 - 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/toolsetup.bat b/toolsetup.bat index 59874c5..310ddd0 100755 --- a/toolsetup.bat +++ b/toolsetup.bat @@ -320,17 +320,28 @@ goto end if not defined PYTHON_FREEZER_PATH ( echo. 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% echo. -- 2.6.1.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel