- if exist %WORKSPACE%\BaseTools (\r
- set EDK_TOOLS_PATH=%WORKSPACE%\BaseTools\r
- ) else (\r
- if defined PACKAGES_PATH (\r
- for %%i IN (%PACKAGES_PATH%) DO (\r
- if exist %%~fi\BaseTools (\r
- set EDK_TOOLS_PATH=%%~fi\BaseTools\r
- goto checkNt32Flag\r
- )\r
+ goto SetEdkToolsPath\r
+) else (\r
+ goto checkNt32Flag\r
+)\r
+\r
+:SetEdkToolsPath\r
+if %WORKSPACE:~-1% EQU \ (\r
+ @set EDK_BASETOOLS=%WORKSPACE%BaseTools\r
+) else (\r
+ @set EDK_BASETOOLS=%WORKSPACE%\BaseTools\r
+)\r
+if exist %EDK_BASETOOLS% (\r
+ set EDK_TOOLS_PATH=%EDK_BASETOOLS%\r
+ set EDK_BASETOOLS=\r
+) else (\r
+ if defined PACKAGES_PATH (\r
+ for %%i IN (%PACKAGES_PATH%) DO (\r
+ if exist %%~fi\BaseTools (\r
+ set EDK_TOOLS_PATH=%%~fi\BaseTools\r
+ goto checkNt32Flag\r