X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=edksetup.bat;h=8f3e1ec94f27528e0bbb0a41aac886787145cc42;hb=2347330465e8b882f2904e603e9b81c395cd9266;hp=8dc4a94f2651fa34b831c10cb2b0845a8a2173de;hpb=d2f9b39f43b4bc4890a77f44c72cc6ffc1ee48a0;p=mirror_edk2.git diff --git a/edksetup.bat b/edksetup.bat index 8dc4a94f26..8f3e1ec94f 100644 --- a/edksetup.bat +++ b/edksetup.bat @@ -25,21 +25,50 @@ @echo off +@REM +@REM Set the WORKSPACE to the current working directory +@REM +pushd . +cd %~dp0 +set WORKSPACE=%CD% + +@if /I "%1"=="-h" goto Usage +@if /I "%1"=="-help" goto Usage +@if /I "%1"=="--help" goto Usage +@if /I "%1"=="/h" goto Usage +@if /I "%1"=="/?" goto Usage +@if /I "%1"=="/help" goto Usage +@if /I not "%1"=="--nt32" goto check_new_build +shift +goto check_vc + +:check_new_build +@if /I "%1"=="NewBuild" goto NewBuild + +:AntBuild @REM @REM Check the required system environment variables @REM :check_vc +@REM The following setup is required for building the Nt32Pkg\Nt32.dsc +@REM platform emulation environment. if defined VCINSTALLDIR goto check_cygwin if defined VS71COMNTOOLS ( + @REM Use Visual Studio .NET 2003 if it is installed call "%VS71COMNTOOLS%\vsvars32.bat" +) else if defined VS80COMNTOOLS ( + @REM Use Visual Studio 2005 iff Visual Studio .NET 2003 is not installed. + call "%VS80COMNTOOLS%\vsvars32.bat" ) else ( echo. echo !!! WARNING !!!! Cannot find Visual Studio !!! echo. ) +goto check_new_build :check_cygwin +@if /I "%1"=="NewBuild" goto NewBuild if defined CYGWIN_HOME goto check_java if exist c:\cygwin ( set CYGWIN_HOME=c:\cygwin @@ -60,14 +89,9 @@ if not exist %ANT_HOME%\lib\ant-contrib.jar goto no_antcontrib if "%XMLBEANS_HOME%"=="" goto no_xmlbeans if not exist %XMLBEANS_HOME%\lib\saxon8.jar goto no_saxon8 -@REM -@REM Set the WORKSPACE to the current working directory -@REM -set WORKSPACE=%CD% - set FRAMEWORK_TOOLS_PATH=%WORKSPACE%\Tools\bin -if not defined ORIGINAL_CLASSPATH set ORIGINAL_CLASSPATH= %CLASSPATH% +if not defined ORIGINAL_CLASSPATH set ORIGINAL_CLASSPATH=%CLASSPATH% set CLASSPATH=%ORIGINAL_CLASSPATH% if defined WORKSPACE_TOOLS_PATH goto check_path @@ -84,14 +108,8 @@ echo Resetting the PATH variable to include the FRAMEWORK_TOOLS_PATH for this WO :path_ok -@if "%1"=="-h" goto Usage -@if "%1"=="-help" goto Usage -@if "%1"=="--help" goto Usage -@if "%1"=="/h" goto Usage -@if "%1"=="/?" goto Usage -@if "%1"=="/help" goto Usage -@if "%1"=="ForceRebuild" goto ForceBuild -@if "%1"=="Reconfig" goto Reconfig +@if /I "%1"=="ForceRebuild" goto ForceBuild +@if /I "%1"=="Reconfig" goto Reconfig @IF NOT EXIST "Tools\Jars\Common.jar" goto NormalBuild @IF NOT EXIST "Tools\Jars\PcdTools.jar" goto NormalBuild @@ -132,7 +150,7 @@ echo Resetting the PATH variable to include the FRAMEWORK_TOOLS_PATH for this WO @IF NOT EXIST "Tools\bin\antlr.exe" goto NormalBuild @IF NOT EXIST "Tools\bin\dlg.exe" goto NormalBuild -@if "%1"=="Rebuild" goto NormalBuild +@if /I "%1"=="Rebuild" goto NormalBuild @if NOT "%1"=="" goto Usage goto skipbuild @@ -239,6 +257,8 @@ set CLASSPATH=%XMLBEANS_HOME%\lib\xbean.jar;%CLASSPATH% set CLASSPATH=%XMLBEANS_HOME%\lib\xbean_xpath.jar;%CLASSPATH% set CLASSPATH=%XMLBEANS_HOME%\lib\xmlpublic.jar;%CLASSPATH% set CLASSPATH=%XMLBEANS_HOME%\lib\saxon8.jar;%CLASSPATH% +set CLASSPATH=%XMLBEANS_HOME%\lib\saxon8-dom.jar;%CLASSPATH% +set CLASSPATH=%XMLBEANS_HOME%\lib\saxon8-xpath.jar;%CLASSPATH% set CLASSPATH=%XMLBEANS_HOME%\lib\resolver.jar;%CLASSPATH% set CLASSPATH=%WORKSPACE%\Tools\Jars\SurfaceArea.jar;%CLASSPATH% set CLASSPATH=%WORKSPACE%\Tools\Jars\Common.jar;%CLASSPATH% @@ -260,7 +280,9 @@ goto end :Usage echo. -echo Usage: %0 [Rebuild] [ForceRebuild] [Reconfig] +echo Usage: %0 [--nt32] [NewBuild] [Rebuild] [ForceRebuild] [Reconfig] +echo --nt32 Call vsvars32.bat for NT32 platform build +echo NewBuild Using new build tools in BaseTools package echo Rebuild: Incremental build, only build those updated tools; echo ForceRebuild: Rebuild all tools neither updated or not; echo Reconfig: Reinstall target.txt, tools_def.txt, FrameworkDatabase.db. @@ -269,7 +291,15 @@ echo Note that target.template, tools_def.template, FrameworkDatabase.template echo only copied to target.txt, tools_def.txt, FrameworkDatabase.db respectively if they echo are not existed. Using option [Reconfig] to do the force copy. echo. +@goto end + +:NewBuild +@IF NOT EXIST "BaseTools\toolsetup.bat" goto AntBuild +if not defined EDK_TOOLS_PATH set EDK_TOOLS_PATH=%WORKSPACE%\BaseTools +@call BaseTools\toolsetup.bat +@goto end :end +@popd @echo on