lhauch | 8014e7c | 2008-02-22 16:31:23 +0000 | [diff] [blame] | 1 | @REM @file
|
| 2 | @REM Windows batch file to setup a WORKSPACE environment
|
bbahnsen | 878ddf1 | 2006-04-21 22:54:32 +0000 | [diff] [blame] | 3 | @REM
|
lhauch | 8014e7c | 2008-02-22 16:31:23 +0000 | [diff] [blame] | 4 | @REM Copyright (c) 2006 - 2008, Intel Corporation
|
bbahnsen | 878ddf1 | 2006-04-21 22:54:32 +0000 | [diff] [blame] | 5 | @REM All rights reserved. This program and the accompanying materials
|
| 6 | @REM are licensed and made available under the terms and conditions of the BSD License
|
| 7 | @REM which accompanies this distribution. The full text of the license may be found at
|
| 8 | @REM http://opensource.org/licenses/bsd-license.php
|
yshi8 | a29212b | 2006-05-09 06:11:05 +0000 | [diff] [blame] | 9 | @REM
|
bbahnsen | 878ddf1 | 2006-04-21 22:54:32 +0000 | [diff] [blame] | 10 | @REM THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
| 11 | @REM WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
| 12 | @REM
|
| 13 |
|
lhauch | 8014e7c | 2008-02-22 16:31:23 +0000 | [diff] [blame] | 14 | @REM set following environment in this file or in command shell for the older,
|
| 15 | @REM JAVA/Ant build
|
lhauch | 9dac0c3 | 2006-10-10 23:03:33 +0000 | [diff] [blame] | 16 | @REM set JAVA_HOME=C:\Java\jdk1.5.0_06
|
yshi8 | a29212b | 2006-05-09 06:11:05 +0000 | [diff] [blame] | 17 | @REM set ANT_HOME=C:\ANT
|
| 18 | @REM set XMLBEANS_HOME=C:\xmlbeans
|
| 19 | @REM set CYGWIN_HOME=C:\cygwin
|
bbahnsen | 878ddf1 | 2006-04-21 22:54:32 +0000 | [diff] [blame] | 20 |
|
lhauch | 8014e7c | 2008-02-22 16:31:23 +0000 | [diff] [blame] | 21 | @REM usage:
|
| 22 | @REM edksetup.bat [--nt32] [AntBuild] [Rebuild] [ForceRebuild] [Reconfig]
|
lhauch | 302e0e4 | 2006-06-09 15:26:28 +0000 | [diff] [blame] | 23 | @REM if the argument, skip is present, only the paths and the
|
| 24 | @REM test and set of environment settings are performed.
|
bbahnsen | 878ddf1 | 2006-04-21 22:54:32 +0000 | [diff] [blame] | 25 |
|
| 26 | @REM ##############################################################
|
| 27 | @REM # You should not have to modify anything below this line
|
| 28 | @REM #
|
| 29 |
|
| 30 | @echo off
|
| 31 |
|
yshi8 | a29212b | 2006-05-09 06:11:05 +0000 | [diff] [blame] | 32 | @REM
|
jwang36 | 3fab94e | 2007-06-22 06:25:37 +0000 | [diff] [blame] | 33 | @REM Set the WORKSPACE to the current working directory
|
| 34 | @REM
|
jwang36 | b750908 | 2007-10-11 08:58:33 +0000 | [diff] [blame] | 35 | pushd .
|
| 36 | cd %~dp0
|
jwang36 | 3fab94e | 2007-06-22 06:25:37 +0000 | [diff] [blame] | 37 | set WORKSPACE=%CD%
|
| 38 |
|
jwang36 | 26096d3 | 2007-10-15 01:58:41 +0000 | [diff] [blame] | 39 | @if /I "%1"=="-h" goto Usage
|
| 40 | @if /I "%1"=="-help" goto Usage
|
| 41 | @if /I "%1"=="--help" goto Usage
|
| 42 | @if /I "%1"=="/h" goto Usage
|
| 43 | @if /I "%1"=="/?" goto Usage
|
| 44 | @if /I "%1"=="/help" goto Usage
|
lhauch | 8014e7c | 2008-02-22 16:31:23 +0000 | [diff] [blame] | 45 |
|
| 46 | @if /I not "%1"=="--nt32" goto check_Ant_build
|
| 47 |
|
| 48 | @REM Flag, --nt32 is set
|
| 49 | @REM The Nt32 Emluation Platform requires Microsoft Libraries
|
| 50 | @REM and headers to interface with Windows.
|
| 51 |
|
jwang36 | 402bbc7 | 2007-10-31 09:12:54 +0000 | [diff] [blame] | 52 | if not defined VCINSTALLDIR (
|
| 53 | if defined VS71COMNTOOLS (
|
| 54 | call "%VS71COMNTOOLS%\vsvars32.bat"
|
| 55 | ) else (
|
| 56 | if defined VS80COMNTOOLS (
|
| 57 | call "%VS80COMNTOOLS%\vsvars32.bat"
|
| 58 | ) else (
|
| 59 | echo.
|
| 60 | echo !!! WARNING !!! Cannot find Visual Studio !!!
|
| 61 | echo.
|
| 62 | )
|
| 63 | )
|
| 64 | )
|
jwang36 | b750908 | 2007-10-11 08:58:33 +0000 | [diff] [blame] | 65 | shift
|
jwang36 | b750908 | 2007-10-11 08:58:33 +0000 | [diff] [blame] | 66 |
|
lhauch | 8014e7c | 2008-02-22 16:31:23 +0000 | [diff] [blame] | 67 | :check_Ant_build
|
| 68 | @if /I "%1"=="AntBuild" goto AntBuild
|
| 69 |
|
| 70 | @REM
|
| 71 | @REM Default is new, Makefile Base Build
|
| 72 | @REM
|
| 73 |
|
| 74 | @if /I "%1"=="NewBuild" shift
|
| 75 | @if not defined EDK_TOOLS_PATH set EDK_TOOLS_PATH=%WORKSPACE%\BaseTools
|
| 76 | @IF NOT EXIST "%EDK_TOOLS_PATH%\toolsetup.bat" goto BadBaseTools
|
| 77 | @call %EDK_TOOLS_PATH%\toolsetup.bat %*
|
| 78 | @goto end
|
| 79 |
|
| 80 | :BadBaseTools
|
| 81 | @REM
|
| 82 | @REM Need the BaseTools Package in order to build
|
| 83 | @REM
|
| 84 | echo.
|
| 85 | echo !!! ERROR !!! The BaseTools Package was not found !!!
|
| 86 | echo.
|
| 87 | echo Set the system environment variable, EDK_TOOLS_PATH to the BaseTools,
|
| 88 | echo For example,
|
| 89 | echo set EDK_TOOLS_PATH=C:\MyTools\BaseTools
|
| 90 | echo The setup script, toolsetup.bat must reside in this folder.
|
| 91 | echo.
|
| 92 | @goto end
|
| 93 |
|
| 94 | @REM With the exception of the :end and :Usage tags, all information below
|
| 95 | @REM these lines is for the JAVA/Ant Build!
|
jwang36 | 3fab94e | 2007-06-22 06:25:37 +0000 | [diff] [blame] | 96 |
|
| 97 | :AntBuild
|
lhauch | 8014e7c | 2008-02-22 16:31:23 +0000 | [diff] [blame] | 98 | @REM
|
| 99 | @REM Check the required system environment variables
|
| 100 | @REM
|
| 101 | @if /I "%1"=="AntBuild" shift
|
| 102 |
|
| 103 | set FOUND="FALSE"
|
| 104 | if exist "Tools\Jars" set FOUND="TRUE"
|
| 105 | if exist "%EDK_TOOLS_PATH%\Tools\Jars" set FOUND="TRUE"
|
| 106 | if %FOUND%=="FALSE" (
|
| 107 | echo.
|
| 108 | echo !!! ERROR !!! You have selected the Java/Ant build, however those tools
|
| 109 | echo cannot be found in this WORKSPACE.
|
| 110 | echo.
|
| 111 | echo Please double check that the AntTools project is installed
|
| 112 | echo in this WORKSPACE.
|
| 113 | echo.
|
| 114 | set FOUND=""
|
| 115 | goto end
|
| 116 | )
|
| 117 | set FOUND=""
|
yshi8 | a29212b | 2006-05-09 06:11:05 +0000 | [diff] [blame] | 118 |
|
bbahnsen | 878ddf1 | 2006-04-21 22:54:32 +0000 | [diff] [blame] | 119 | :check_vc
|
lhauch | 8014e7c | 2008-02-22 16:31:23 +0000 | [diff] [blame] | 120 | if defined VCINSTALLDIR goto check_cygwin
|
| 121 | if defined VS71COMNTOOLS (
|
| 122 | call "%VS71COMNTOOLS%\vsvars32.bat"
|
| 123 | ) else (
|
| 124 | echo.
|
| 125 | echo !!! WARNING !!! Cannot find Visual Studio !!!
|
| 126 | echo.
|
| 127 | )
|
bbahnsen | 878ddf1 | 2006-04-21 22:54:32 +0000 | [diff] [blame] | 128 |
|
yshi8 | a29212b | 2006-05-09 06:11:05 +0000 | [diff] [blame] | 129 | :check_cygwin
|
lhauch | 8014e7c | 2008-02-22 16:31:23 +0000 | [diff] [blame] | 130 | if defined CYGWIN_HOME goto check_java
|
| 131 | if exist c:\cygwin (
|
| 132 | set CYGWIN_HOME=c:\cygwin
|
| 133 | ) else (
|
| 134 | echo.
|
| 135 | echo !!! WARNING !!! No CYGWIN_HOME set, gcc build may not be used !!!
|
| 136 | echo.
|
| 137 | )
|
bbahnsen | 878ddf1 | 2006-04-21 22:54:32 +0000 | [diff] [blame] | 138 |
|
yshi8 | a29212b | 2006-05-09 06:11:05 +0000 | [diff] [blame] | 139 | :check_java
|
lhauch | 8014e7c | 2008-02-22 16:31:23 +0000 | [diff] [blame] | 140 | if "%JAVA_HOME%"=="" goto no_jdk
|
yshi8 | a29212b | 2006-05-09 06:11:05 +0000 | [diff] [blame] | 141 |
|
| 142 | :check_ant
|
lhauch | 8014e7c | 2008-02-22 16:31:23 +0000 | [diff] [blame] | 143 | if "%ANT_HOME%"=="" goto no_ant
|
| 144 | if not exist %ANT_HOME%\lib\ant-contrib.jar goto no_antcontrib
|
lhauch | 42b67fc | 2006-04-25 19:59:29 +0000 | [diff] [blame] | 145 |
|
yshi8 | a29212b | 2006-05-09 06:11:05 +0000 | [diff] [blame] | 146 | :check_xmlbeans
|
lhauch | 8014e7c | 2008-02-22 16:31:23 +0000 | [diff] [blame] | 147 | if "%XMLBEANS_HOME%"=="" goto no_xmlbeans
|
| 148 | if not exist %XMLBEANS_HOME%\lib\saxon8.jar goto no_saxon8
|
lhauch | 42b67fc | 2006-04-25 19:59:29 +0000 | [diff] [blame] | 149 |
|
qouyang | 2da8968 | 2006-06-08 09:11:56 +0000 | [diff] [blame] | 150 | set FRAMEWORK_TOOLS_PATH=%WORKSPACE%\Tools\bin
|
lhauch | 6de5f95 | 2006-06-09 18:07:09 +0000 | [diff] [blame] | 151 |
|
wuyizhong | a9008cd | 2006-11-01 03:12:47 +0000 | [diff] [blame] | 152 | if not defined ORIGINAL_CLASSPATH set ORIGINAL_CLASSPATH=%CLASSPATH%
|
jwang36 | eb614e7 | 2006-10-17 06:24:21 +0000 | [diff] [blame] | 153 | set CLASSPATH=%ORIGINAL_CLASSPATH%
|
| 154 |
|
lhauch | 6de5f95 | 2006-06-09 18:07:09 +0000 | [diff] [blame] | 155 | if defined WORKSPACE_TOOLS_PATH goto check_path
|
| 156 | set PATH=%FRAMEWORK_TOOLS_PATH%;%JAVA_HOME%\bin;%ANT_HOME%\bin;%XMLBEANS_HOME%\bin;%PATH%
|
| 157 | set WORKSPACE_TOOLS_PATH=%FRAMEWORK_TOOLS_PATH%
|
lhauch | 11f009f | 2006-07-24 16:03:47 +0000 | [diff] [blame] | 158 | echo Setting the PATH variable to include the FRAMEWORK_TOOLS_PATH for this WORKSPACE
|
lhauch | 6de5f95 | 2006-06-09 18:07:09 +0000 | [diff] [blame] | 159 | goto path_ok
|
| 160 |
|
| 161 | :check_path
|
lhauch | 8014e7c | 2008-02-22 16:31:23 +0000 | [diff] [blame] | 162 | if "%FRAMEWORK_TOOLS_PATH%"=="%WORKSPACE_TOOLS_PATH%" goto path_ok
|
| 163 | set PATH=%FRAMEWORK_TOOLS_PATH%;%PATH%
|
| 164 | set WORKSPACE_TOOLS_PATH=%WORKSPACE%\Tools\bin
|
| 165 | echo Resetting the PATH variable to include the FRAMEWORK_TOOLS_PATH for this WORKSPACE
|
lhauch | 6de5f95 | 2006-06-09 18:07:09 +0000 | [diff] [blame] | 166 |
|
| 167 | :path_ok
|
| 168 |
|
lhauch | 8014e7c | 2008-02-22 16:31:23 +0000 | [diff] [blame] | 169 | @if /I "%1"=="ForceRebuild" goto ForceBuild
|
| 170 | @if /I "%1"=="Reconfig" goto Reconfig
|
yshi8 | a29212b | 2006-05-09 06:11:05 +0000 | [diff] [blame] | 171 |
|
lhauch | 70edbc3 | 2006-07-14 06:46:15 +0000 | [diff] [blame] | 172 | @IF NOT EXIST "Tools\Jars\Common.jar" goto NormalBuild
|
klu2 | fb10251 | 2006-07-31 19:06:25 +0000 | [diff] [blame] | 173 | @IF NOT EXIST "Tools\Jars\PcdTools.jar" goto NormalBuild
|
lhauch | 70edbc3 | 2006-07-14 06:46:15 +0000 | [diff] [blame] | 174 | @IF NOT EXIST "Tools\Jars\GenBuild.jar" goto NormalBuild
|
| 175 | @IF NOT EXIST "Tools\Jars\SurfaceArea.jar" goto NormalBuild
|
| 176 | @IF NOT EXIST "Tools\Jars\cpptasks.jar" goto NormalBuild
|
| 177 | @IF NOT EXIST "Tools\Jars\frameworktasks.jar" goto NormalBuild
|
| 178 | @IF NOT EXIST "Tools\bin\FrameworkWizard.jar" goto NormalBuild
|
| 179 | @IF NOT EXIST "Tools\bin\CompressDll.dll" goto NormalBuild
|
| 180 | @IF NOT EXIST "Tools\bin\CompressDll.lib" goto NormalBuild
|
| 181 | @IF NOT EXIST "Tools\bin\CreateMtFile.exe" goto NormalBuild
|
| 182 | @IF NOT EXIST "Tools\bin\EfiCompress.exe" goto NormalBuild
|
| 183 | @IF NOT EXIST "Tools\bin\EfiRom.exe" goto NormalBuild
|
| 184 | @IF NOT EXIST "Tools\bin\FlashMap.exe" goto NormalBuild
|
| 185 | @IF NOT EXIST "Tools\bin\FwImage.exe" goto NormalBuild
|
| 186 | @IF NOT EXIST "Tools\bin\GenAcpiTable.exe" goto NormalBuild
|
| 187 | @IF NOT EXIST "Tools\bin\GenCRC32Section.exe" goto NormalBuild
|
| 188 | @IF NOT EXIST "Tools\bin\GenCapsuleHdr.exe" goto NormalBuild
|
| 189 | @IF NOT EXIST "Tools\bin\GenDepex.exe" goto NormalBuild
|
| 190 | @IF NOT EXIST "Tools\bin\GenFfsFile.exe" goto NormalBuild
|
| 191 | @IF NOT EXIST "Tools\bin\GenFvImage.exe" goto NormalBuild
|
lhauch | 70edbc3 | 2006-07-14 06:46:15 +0000 | [diff] [blame] | 192 | @IF NOT EXIST "Tools\bin\GenSection.exe" goto NormalBuild
|
| 193 | @IF NOT EXIST "Tools\bin\GenTEImage.exe" goto NormalBuild
|
| 194 | @IF NOT EXIST "Tools\bin\GuidChk.exe" goto NormalBuild
|
| 195 | @IF NOT EXIST "Tools\bin\MakeDeps.exe" goto NormalBuild
|
| 196 | @IF NOT EXIST "Tools\bin\ModifyInf.exe" goto NormalBuild
|
| 197 | @IF NOT EXIST "Tools\bin\PeiRebase_Ia32.exe" goto NormalBuild
|
| 198 | @IF NOT EXIST "Tools\bin\PeiRebase_Ipf.exe" goto NormalBuild
|
| 199 | @IF NOT EXIST "Tools\bin\PeiRebase_X64.exe" goto NormalBuild
|
| 200 | @IF NOT EXIST "Tools\bin\SecApResetVectorFixup.exe" goto NormalBuild
|
| 201 | @IF NOT EXIST "Tools\bin\SecFixup.exe" goto NormalBuild
|
| 202 | @IF NOT EXIST "Tools\bin\SetStamp.exe" goto NormalBuild
|
| 203 | @IF NOT EXIST "Tools\bin\SplitFile.exe" goto NormalBuild
|
| 204 | @IF NOT EXIST "Tools\bin\StrGather.exe" goto NormalBuild
|
| 205 | @IF NOT EXIST "Tools\bin\Strip.exe" goto NormalBuild
|
| 206 | @IF NOT EXIST "Tools\bin\VfrCompile.exe" goto NormalBuild
|
| 207 | @IF NOT EXIST "Tools\bin\ZeroDebugData.exe" goto NormalBuild
|
| 208 | @IF NOT EXIST "Tools\bin\antlr.exe" goto NormalBuild
|
| 209 | @IF NOT EXIST "Tools\bin\dlg.exe" goto NormalBuild
|
yshi8 | a29212b | 2006-05-09 06:11:05 +0000 | [diff] [blame] | 210 |
|
wuyizhong | d02920e | 2006-12-12 05:35:03 +0000 | [diff] [blame] | 211 | @if /I "%1"=="Rebuild" goto NormalBuild
|
lhauch | 11f009f | 2006-07-24 16:03:47 +0000 | [diff] [blame] | 212 | @if NOT "%1"=="" goto Usage
|
lhauch | 70edbc3 | 2006-07-14 06:46:15 +0000 | [diff] [blame] | 213 |
|
| 214 | goto skipbuild
|
| 215 |
|
qouyang | 3a9b722 | 2006-08-28 13:06:24 +0000 | [diff] [blame] | 216 | :ForceBuild
|
lhauch | 8014e7c | 2008-02-22 16:31:23 +0000 | [diff] [blame] | 217 | call ant -f %WORKSPACE%\Tools\build.xml -noclasspath cleanall
|
lhauch | 70edbc3 | 2006-07-14 06:46:15 +0000 | [diff] [blame] | 218 |
|
| 219 | :NormalBuild
|
lhauch | 8014e7c | 2008-02-22 16:31:23 +0000 | [diff] [blame] | 220 | @REM
|
| 221 | @REM Start to build the Framework Tools
|
| 222 | @REM
|
yshi8 | a29212b | 2006-05-09 06:11:05 +0000 | [diff] [blame] | 223 |
|
lhauch | 8014e7c | 2008-02-22 16:31:23 +0000 | [diff] [blame] | 224 | echo.
|
| 225 | echo Building the Framework Tools
|
| 226 | echo.
|
yshi8 | a29212b | 2006-05-09 06:11:05 +0000 | [diff] [blame] | 227 |
|
lhauch | 8014e7c | 2008-02-22 16:31:23 +0000 | [diff] [blame] | 228 | @REM
|
| 229 | @REM We are going to create the SurfaceArea.jar file first so that the other
|
| 230 | @REM Java Programs can use it.
|
| 231 | @REM It needs the XMLBEANS libraries in order to compile.
|
| 232 | @REM
|
| 233 | set CLASSPATH=%XMLBEANS_HOME%\lib;%CLASSPATH%
|
| 234 | set CLASSPATH=%XMLBEANS_HOME%\lib\jsr173_1.0_api.jar;%CLASSPATH%
|
| 235 | set CLASSPATH=%XMLBEANS_HOME%\lib\xbean.jar;%CLASSPATH%
|
| 236 | set CLASSPATH=%XMLBEANS_HOME%\lib\xbean_xpath.jar;%CLASSPATH%
|
| 237 | set CLASSPATH=%XMLBEANS_HOME%\lib\xmlpublic.jar;%CLASSPATH%
|
| 238 | set CLASSPATH=%XMLBEANS_HOME%\lib\saxon8.jar;%CLASSPATH%
|
| 239 | set CLASSPATH=%XMLBEANS_HOME%\lib\resolver.jar;%CLASSPATH%
|
bbahnsen | 878ddf1 | 2006-04-21 22:54:32 +0000 | [diff] [blame] | 240 |
|
lhauch | 8014e7c | 2008-02-22 16:31:23 +0000 | [diff] [blame] | 241 | call ant -f %WORKSPACE%\Tools\build.xml SurfaceArea
|
bbahnsen | 878ddf1 | 2006-04-21 22:54:32 +0000 | [diff] [blame] | 242 |
|
lhauch | 8014e7c | 2008-02-22 16:31:23 +0000 | [diff] [blame] | 243 | @REM
|
| 244 | @REM Now we can make the other Java Programs
|
| 245 | @REM All of the remaining Java Programs require the SurfaceArea library to compile
|
| 246 | @REM
|
| 247 | set CLASSPATH=%WORKSPACE%\Tools\Jars\SurfaceArea.jar;%CLASSPATH%
|
qouyang | b9546cc | 2006-06-20 11:57:17 +0000 | [diff] [blame] | 248 |
|
lhauch | 8014e7c | 2008-02-22 16:31:23 +0000 | [diff] [blame] | 249 | call ant -f %WORKSPACE%\Tools\build.xml JavaCode
|
bbahnsen | 878ddf1 | 2006-04-21 22:54:32 +0000 | [diff] [blame] | 250 |
|
lhauch | 8014e7c | 2008-02-22 16:31:23 +0000 | [diff] [blame] | 251 | @REM
|
| 252 | @REM We have all of the Java Programs and add-in classes created, so we can start
|
| 253 | @REM using the cpp-tasks to create our tools
|
| 254 | @REM
|
| 255 | set CLASSPATH=%WORKSPACE%\Tools\Jars\Common.jar;%CLASSPATH%
|
| 256 | set CLASSPATH=%WORKSPACE%\Tools\Jars\PcdTools.jar;%CLASSPATH%
|
| 257 | set CLASSPATH=%WORKSPACE%\Tools\Jars\GenBuild.jar;%CLASSPATH%
|
| 258 | set CLASSPATH=%WORKSPACE%\Tools\Jars\cpptasks.jar;%CLASSPATH%
|
| 259 | set CLASSPATH=%WORKSPACE%\Tools\Jars\frameworktasks.jar;%CLASSPATH%
|
| 260 | set CLASSPATH=%WORKSPACE%\Tools\Bin\FrameworkWizard.jar;%CLASSPATH%
|
| 261 | set CLASSPATH=%WORKSPACE%\Tools\Bin\MigrationTools.jar;%CLASSPATH%
|
bbahnsen | 878ddf1 | 2006-04-21 22:54:32 +0000 | [diff] [blame] | 262 |
|
lhauch | 8014e7c | 2008-02-22 16:31:23 +0000 | [diff] [blame] | 263 | call ant -f %WORKSPACE%\Tools\build.xml C_Code
|
bbahnsen | 878ddf1 | 2006-04-21 22:54:32 +0000 | [diff] [blame] | 264 |
|
lhauch | 8014e7c | 2008-02-22 16:31:23 +0000 | [diff] [blame] | 265 | @REM
|
| 266 | @REM Done!!!
|
| 267 | @REM
|
| 268 | goto end
|
bbahnsen | 878ddf1 | 2006-04-21 22:54:32 +0000 | [diff] [blame] | 269 |
|
| 270 | :no_jdk
|
lhauch | 8014e7c | 2008-02-22 16:31:23 +0000 | [diff] [blame] | 271 | echo.
|
| 272 | echo !!! Please install Java, and set JAVA_HOME !!!
|
| 273 | echo.
|
| 274 | goto end
|
bbahnsen | 0299684 | 2006-04-21 23:36:37 +0000 | [diff] [blame] | 275 |
|
| 276 | :no_ant
|
lhauch | 8014e7c | 2008-02-22 16:31:23 +0000 | [diff] [blame] | 277 | echo.
|
| 278 | echo !!! Please install Apache Ant, and set ANT_HOME !!!
|
| 279 | echo.
|
| 280 | goto end
|
bbahnsen | 0299684 | 2006-04-21 23:36:37 +0000 | [diff] [blame] | 281 |
|
lhauch | 42b67fc | 2006-04-25 19:59:29 +0000 | [diff] [blame] | 282 | :no_antcontrib
|
lhauch | 8014e7c | 2008-02-22 16:31:23 +0000 | [diff] [blame] | 283 | echo.
|
| 284 | echo !!! Please install Ant-contrib to ANT_HOME !!!
|
| 285 | echo.
|
| 286 | goto end
|
lhauch | 42b67fc | 2006-04-25 19:59:29 +0000 | [diff] [blame] | 287 |
|
bbahnsen | 0299684 | 2006-04-21 23:36:37 +0000 | [diff] [blame] | 288 | :no_xmlbeans
|
lhauch | 8014e7c | 2008-02-22 16:31:23 +0000 | [diff] [blame] | 289 | echo.
|
| 290 | echo !!! Please install XML Beans, and set XMLBEANS_HOME !!!
|
| 291 | echo.
|
| 292 | goto end
|
bbahnsen | 878ddf1 | 2006-04-21 22:54:32 +0000 | [diff] [blame] | 293 |
|
lhauch | 42b67fc | 2006-04-25 19:59:29 +0000 | [diff] [blame] | 294 | :no_saxon8
|
lhauch | 8014e7c | 2008-02-22 16:31:23 +0000 | [diff] [blame] | 295 | echo.
|
| 296 | echo !!! Please copy saxon8.jar file to XMLBEANS_HOME\lib !!!
|
| 297 | echo.
|
| 298 | goto end
|
lhauch | 42b67fc | 2006-04-25 19:59:29 +0000 | [diff] [blame] | 299 |
|
lhauch | 302e0e4 | 2006-06-09 15:26:28 +0000 | [diff] [blame] | 300 | :skipbuild
|
lhauch | 8014e7c | 2008-02-22 16:31:23 +0000 | [diff] [blame] | 301 | @REM
|
| 302 | @REM This just sets up the CLASSPATH, the rest of the environment should have been set already.
|
| 303 | @REM
|
| 304 | echo.
|
| 305 | echo WORKSPACE: %WORKSPACE%
|
| 306 | echo JAVA_HOME: %JAVA_HOME%
|
| 307 | echo ANT_HOME: %ANT_HOME%
|
| 308 | echo XMLBEANS_HOME: %XMLBEANS_HOME%
|
| 309 | echo CYGWIN_HOME: %CYGWIN_HOME%
|
| 310 | echo PATH: %PATH%
|
| 311 | echo.
|
| 312 | set CLASSPATH=%XMLBEANS_HOME%\lib;%CLASSPATH%
|
| 313 | set CLASSPATH=%XMLBEANS_HOME%\lib\jsr173_1.0_api.jar;%CLASSPATH%
|
| 314 | set CLASSPATH=%XMLBEANS_HOME%\lib\xbean.jar;%CLASSPATH%
|
| 315 | set CLASSPATH=%XMLBEANS_HOME%\lib\xbean_xpath.jar;%CLASSPATH%
|
| 316 | set CLASSPATH=%XMLBEANS_HOME%\lib\xmlpublic.jar;%CLASSPATH%
|
| 317 | set CLASSPATH=%XMLBEANS_HOME%\lib\saxon8.jar;%CLASSPATH%
|
| 318 | set CLASSPATH=%XMLBEANS_HOME%\lib\saxon8-dom.jar;%CLASSPATH%
|
| 319 | set CLASSPATH=%XMLBEANS_HOME%\lib\saxon8-xpath.jar;%CLASSPATH%
|
| 320 | set CLASSPATH=%XMLBEANS_HOME%\lib\resolver.jar;%CLASSPATH%
|
| 321 | set CLASSPATH=%WORKSPACE%\Tools\Jars\SurfaceArea.jar;%CLASSPATH%
|
| 322 | set CLASSPATH=%WORKSPACE%\Tools\Jars\Common.jar;%CLASSPATH%
|
| 323 | set CLASSPATH=%WORKSPACE%\Tools\Jars\PcdTools.jar;%CLASSPATH%
|
| 324 | set CLASSPATH=%WORKSPACE%\Tools\Jars\GenBuild.jar;%CLASSPATH%
|
| 325 | set CLASSPATH=%WORKSPACE%\Tools\Jars\cpptasks.jar;%CLASSPATH%
|
| 326 | set CLASSPATH=%WORKSPACE%\Tools\Jars\frameworktasks.jar;%CLASSPATH%
|
| 327 | set CLASSPATH=%WORKSPACE%\Tools\Bin\FrameworkWizard.jar;%CLASSPATH%
|
| 328 | set CLASSPATH=%WORKSPACE%\Tools\Bin\MigrationTools.jar;%CLASSPATH%
|
| 329 | echo CLASSPATH: %CLASSPATH%
|
| 330 | goto end
|
lhauch | 302e0e4 | 2006-06-09 15:26:28 +0000 | [diff] [blame] | 331 |
|
wuyizhong | 2fcfed3 | 2006-10-17 07:07:24 +0000 | [diff] [blame] | 332 | :Reconfig
|
lhauch | 8014e7c | 2008-02-22 16:31:23 +0000 | [diff] [blame] | 333 | @REM
|
| 334 | @REM Reinstall all config files
|
| 335 | @REM
|
| 336 | call ant -f %WORKSPACE%\Tools\build.xml reconfig
|
| 337 | goto end
|
wuyizhong | 2fcfed3 | 2006-10-17 07:07:24 +0000 | [diff] [blame] | 338 |
|
lhauch | 70edbc3 | 2006-07-14 06:46:15 +0000 | [diff] [blame] | 339 | :Usage
|
lhauch | 8014e7c | 2008-02-22 16:31:23 +0000 | [diff] [blame] | 340 | echo.
|
| 341 | echo Usage: "%0 [-h | -help | --help | /h | /help | /?] [--nt32] [AntBuild | Rebuild | ForceRebuild ] [Reconfig]"
|
| 342 | echo --nt32 Call vsvars32.bat for NT32 platform build.
|
| 343 | echo.
|
| 344 | echo Rebuild If sources are available perform an Incremental build, only
|
| 345 | echo build those updated tools.
|
| 346 | echo ForceRebuild If sources are available, rebuild all tools regardless of
|
| 347 | echo whether they have been updated or not.
|
| 348 | echo Reconfig Reinstall target.txt, tools_def.txt and build_rule.txt.
|
| 349 | echo.
|
| 350 | echo JAVA/ANT Build
|
| 351 | echo AntBuild Using older Java/ANT build tools in Tools directory.
|
| 352 | echo Rebuild Incremental build, only build those updated tools.
|
| 353 | echo ForceRebuild Rebuild all tools regardless of whether they have been updated or not.
|
| 354 | echo Reconfig Reinstall target.txt, tools_def.txt and FrameworkDatabase.db.
|
| 355 | echo.
|
| 356 | echo Note that target.template, tools_def.template, build_rules.template and the
|
| 357 | echo FrameworkDatabase.template will be only copied to target.txt, tools_def.txt, build_rule.txt and
|
| 358 | echo FrameworkDatabase.db respectively if they do not exist. Using option [Reconfig] to force the copy.
|
| 359 | echo.
|
| 360 | @goto end
|
jwang36 | 3fab94e | 2007-06-22 06:25:37 +0000 | [diff] [blame] | 361 |
|
bbahnsen | 878ddf1 | 2006-04-21 22:54:32 +0000 | [diff] [blame] | 362 | :end
|
lhauch | 8014e7c | 2008-02-22 16:31:23 +0000 | [diff] [blame] | 363 | @popd
|
| 364 | @echo on
|
bbahnsen | 878ddf1 | 2006-04-21 22:54:32 +0000 | [diff] [blame] | 365 |
|