]> git.proxmox.com Git - mirror_edk2.git/blobdiff - edksetup.bat
Regenerate Fat binaries for the bug fix of LookupUnicodeString2() in UefiLib (r4655).
[mirror_edk2.git] / edksetup.bat
index 74f4117b1a936e65cbbf763f77468a8b5f34454a..91b83c637d21ead17e07639b06bc7b6b9af383bf 100644 (file)
 \r
 @echo off\r
 \r
+@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
+if not defined VCINSTALLDIR (\r
+  if defined VS71COMNTOOLS (\r
+    call "%VS71COMNTOOLS%\vsvars32.bat"\r
+  ) else (\r
+    if defined VS80COMNTOOLS (\r
+      call "%VS80COMNTOOLS%\vsvars32.bat"\r
+    ) else (\r
+      echo.\r
+      echo !!! WARNING !!! Cannot find Visual Studio !!!\r
+      echo.\r
+    )\r
+  )\r
+)\r
+shift\r
+\r
+:check_new_build\r
+@if /I "%1"=="NewBuild" goto NewBuild\r
+\r
+:AntBuild\r
 @REM\r
 @REM Check the required system environment variables\r
 @REM\r
 :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 !!! WARNING !!! Cannot find Visual Studio !!!\r
   echo.\r
 )\r
 \r
@@ -45,7 +78,7 @@ if exist c:\cygwin (
   set CYGWIN_HOME=c:\cygwin\r
 ) else (\r
   echo.\r
-  echo !!! WARNING !!!! Not set CYGWIN_HOME, gcc build may not be used !!!\r
+  echo !!! WARNING !!! No CYGWIN_HOME set, gcc build may not be used !!!\r
   echo.\r
 )\r
 \r
@@ -60,11 +93,6 @@ if not exist %ANT_HOME%\lib\ant-contrib.jar goto no_antcontrib
 if "%XMLBEANS_HOME%"=="" goto no_xmlbeans\r
 if not exist %XMLBEANS_HOME%\lib\saxon8.jar goto no_saxon8\r
 \r
-@REM\r
-@REM Set the WORKSPACE to the current working directory\r
-@REM\r
-set WORKSPACE=%CD%\r
-\r
 set FRAMEWORK_TOOLS_PATH=%WORKSPACE%\Tools\bin\r
 \r
 if not defined ORIGINAL_CLASSPATH set ORIGINAL_CLASSPATH=%CLASSPATH%\r
@@ -84,12 +112,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
@@ -239,6 +261,8 @@ set CLASSPATH=%XMLBEANS_HOME%\lib\xbean.jar;%CLASSPATH%
 set CLASSPATH=%XMLBEANS_HOME%\lib\xbean_xpath.jar;%CLASSPATH%\r
 set CLASSPATH=%XMLBEANS_HOME%\lib\xmlpublic.jar;%CLASSPATH%\r
 set CLASSPATH=%XMLBEANS_HOME%\lib\saxon8.jar;%CLASSPATH%\r
+set CLASSPATH=%XMLBEANS_HOME%\lib\saxon8-dom.jar;%CLASSPATH%\r
+set CLASSPATH=%XMLBEANS_HOME%\lib\saxon8-xpath.jar;%CLASSPATH%\r
 set CLASSPATH=%XMLBEANS_HOME%\lib\resolver.jar;%CLASSPATH%\r
 set CLASSPATH=%WORKSPACE%\Tools\Jars\SurfaceArea.jar;%CLASSPATH%\r
 set CLASSPATH=%WORKSPACE%\Tools\Jars\Common.jar;%CLASSPATH%\r
@@ -260,16 +284,26 @@ goto end
 \r
 :Usage\r
 echo.\r
-echo  Usage: %0 [Rebuild] [ForceRebuild] [Reconfig]\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
+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 (Ant build only)\r
+echo         ForceRebuild   Rebuild all tools neither updated or not (Ant build only)\r
+echo         Reconfig       Reinstall target.txt, tools_def.txt, FrameworkDatabase.db (Ant build only) \r
 echo.\r
 echo  Note that target.template, tools_def.template, FrameworkDatabase.template will be\r
 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
+if not defined EDK_TOOLS_PATH set EDK_TOOLS_PATH=%WORKSPACE%\BaseTools\r
+@call BaseTools\toolsetup.bat\r
+@goto end\r
 \r
 :end\r
+@popd\r
 @echo on\r
 \r