]> git.proxmox.com Git - mirror_edk2.git/blobdiff - edksetup.bat
Rename Crc32GuidedSectionExtractLib to DxeCrc32GuidedSectionExtractLib.
[mirror_edk2.git] / edksetup.bat
index 2f7fedef3337230e9b2b1b1d38ae6b42c5ac92a7..475d830db936031d6da60992ec4d1750931efd7b 100644 (file)
 @REM\r
 @REM Set the WORKSPACE to the current working directory\r
 @REM\r
+pushd .\r
+cd %~dp0\r
 set WORKSPACE=%CD%\r
 \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
+@if /I not "%1"=="--nt32" goto check_new_build\r
+shift\r
+goto check_vc\r
+\r
+:check_new_build\r
 @if /I "%1"=="NewBuild" goto NewBuild\r
 \r
 :AntBuild\r
@@ -40,12 +53,13 @@ set WORKSPACE=%CD%
 :check_vc\r
 if defined VCINSTALLDIR goto check_cygwin\r
 if defined VS71COMNTOOLS (\r
 call "%VS71COMNTOOLS%\vsvars32.bat"\r
+ call "%VS71COMNTOOLS%\vsvars32.bat"\r
 ) else (\r
   echo.\r
   echo !!! WARNING !!!! Cannot find Visual Studio !!!\r
   echo.\r
 )\r
+goto check_new_build\r
 \r
 :check_cygwin\r
 if defined CYGWIN_HOME goto check_java\r
@@ -87,12 +101,6 @@ echo Resetting the PATH variable to include the FRAMEWORK_TOOLS_PATH for this WO
 \r
 :path_ok\r
 \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
 @if /I "%1"=="ForceRebuild" goto ForceBuild\r
 @if /I "%1"=="Reconfig" goto Reconfig\r
 \r
@@ -265,7 +273,9 @@ goto end
 \r
 :Usage\r
 echo.\r
-echo  Usage: %0 [Rebuild] [ForceRebuild] [Reconfig]\r
+echo  Usage: %0 [--nt32] [NewBuild] [Rebuild] [ForceRebuild] [Reconfig]\r
+echo         --nt32         Call vsvars32.bat for NT32 platform build\r
+echo         NewBuild       Using new build tools in BaseTools package\r
 echo         Rebuild:       Incremental build, only build those updated tools; \r
 echo         ForceRebuild:  Rebuild all tools neither updated or not; \r
 echo         Reconfig:      Reinstall target.txt, tools_def.txt, FrameworkDatabase.db. \r
@@ -274,6 +284,7 @@ echo  Note that target.template, tools_def.template, FrameworkDatabase.template
 echo  only copied to target.txt, tools_def.txt, FrameworkDatabase.db respectively if they\r
 echo  are not existed. Using option [Reconfig] to do the force copy. \r
 echo.\r
+@goto end\r
 \r
 :NewBuild\r
 @IF NOT EXIST "BaseTools\toolsetup.bat" goto AntBuild\r
@@ -282,5 +293,6 @@ if not defined EDK_TOOLS_PATH set EDK_TOOLS_PATH=%WORKSPACE%\BaseTools
 @goto end\r
 \r
 :end\r
+@popd\r
 @echo on\r
 \r