-@if /I "%1"=="-h" goto Usage\r
-@if /I "%1"=="-help" goto Usage\r
-@if /I "%1"=="--help" goto Usage\r
-@if /I "%1"=="/h" goto Usage\r
-@if /I "%1"=="/?" goto Usage\r
-@if /I "%1"=="/help" goto Usage\r
+if /I "%1"=="-h" goto Usage\r
+if /I "%1"=="-help" goto Usage\r
+if /I "%1"=="--help" goto Usage\r
+if /I "%1"=="/h" goto Usage\r
+if /I "%1"=="/?" goto Usage\r
+if /I "%1"=="/help" goto Usage\r
+\r
+if /I "%1"=="NewBuild" shift\r
+if not defined EDK_TOOLS_PATH (\r
+ 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
+ )\r
+ ) else (\r
+ echo.\r
+ echo !!! ERROR !!! Cannot find BaseTools !!!\r
+ echo. \r
+ goto BadBaseTools\r
+ )\r
+ )\r
+)\r