bbahnsen | 878ddf1 | 2006-04-21 22:54:32 +0000 | [diff] [blame] | 1 | @REM
|
| 2 | @REM Copyright (c) 2006, Intel Corporation
|
| 3 | @REM All rights reserved. This program and the accompanying materials
|
| 4 | @REM are licensed and made available under the terms and conditions of the BSD License
|
| 5 | @REM which accompanies this distribution. The full text of the license may be found at
|
| 6 | @REM http://opensource.org/licenses/bsd-license.php
|
yshi8 | a29212b | 2006-05-09 06:11:05 +0000 | [diff] [blame] | 7 | @REM
|
bbahnsen | 878ddf1 | 2006-04-21 22:54:32 +0000 | [diff] [blame] | 8 | @REM THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
| 9 | @REM WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
| 10 | @REM
|
| 11 |
|
| 12 | @REM set following environment in this file or in command shell
|
| 13 | @REM set JAVA_HOME=C:\Java\jdk1.5.0_04
|
yshi8 | a29212b | 2006-05-09 06:11:05 +0000 | [diff] [blame] | 14 | @REM set ANT_HOME=C:\ANT
|
| 15 | @REM set XMLBEANS_HOME=C:\xmlbeans
|
| 16 | @REM set CYGWIN_HOME=C:\cygwin
|
bbahnsen | 878ddf1 | 2006-04-21 22:54:32 +0000 | [diff] [blame] | 17 |
|
lhauch | 302e0e4 | 2006-06-09 15:26:28 +0000 | [diff] [blame] | 18 | @REM usage: edksetup.bat [skip]
|
| 19 | @REM if the argument, skip is present, only the paths and the
|
| 20 | @REM test and set of environment settings are performed.
|
bbahnsen | 878ddf1 | 2006-04-21 22:54:32 +0000 | [diff] [blame] | 21 |
|
| 22 | @REM ##############################################################
|
| 23 | @REM # You should not have to modify anything below this line
|
| 24 | @REM #
|
| 25 |
|
| 26 | @echo off
|
| 27 |
|
yshi8 | a29212b | 2006-05-09 06:11:05 +0000 | [diff] [blame] | 28 | @REM
|
| 29 | @REM Check the required system environment variables
|
| 30 | @REM
|
| 31 |
|
bbahnsen | 878ddf1 | 2006-04-21 22:54:32 +0000 | [diff] [blame] | 32 | :check_vc
|
yshi8 | a29212b | 2006-05-09 06:11:05 +0000 | [diff] [blame] | 33 | if defined VCINSTALLDIR goto check_cygwin
|
bbahnsen | 878ddf1 | 2006-04-21 22:54:32 +0000 | [diff] [blame] | 34 | if defined VS71COMNTOOLS (
|
| 35 | call "%VS71COMNTOOLS%vsvars32.bat"
|
| 36 | ) else (
|
| 37 | echo.
|
| 38 | echo !!! WARNING !!!! Cannot find Visual Studio !!!
|
| 39 | echo.
|
| 40 | )
|
| 41 |
|
yshi8 | a29212b | 2006-05-09 06:11:05 +0000 | [diff] [blame] | 42 | :check_cygwin
|
| 43 | if defined CYGWIN_HOME goto check_java
|
| 44 | if exist c:\cygwin (
|
| 45 | set CYGWIN_HOME=c:\cygwin
|
lhauch | 42b67fc | 2006-04-25 19:59:29 +0000 | [diff] [blame] | 46 | ) else (
|
yshi8 | a29212b | 2006-05-09 06:11:05 +0000 | [diff] [blame] | 47 | echo.
|
| 48 | echo !!! WARNING !!!! Not set CYGWIN_HOME, gcc build may not be used !!!
|
| 49 | echo.
|
bbahnsen | 878ddf1 | 2006-04-21 22:54:32 +0000 | [diff] [blame] | 50 | )
|
| 51 |
|
yshi8 | a29212b | 2006-05-09 06:11:05 +0000 | [diff] [blame] | 52 | :check_java
|
| 53 | if "%JAVA_HOME%"=="" goto no_jdk
|
| 54 |
|
| 55 | :check_ant
|
bbahnsen | 0299684 | 2006-04-21 23:36:37 +0000 | [diff] [blame] | 56 | if "%ANT_HOME%"=="" goto no_ant
|
lhauch | 42b67fc | 2006-04-25 19:59:29 +0000 | [diff] [blame] | 57 | if not exist %ANT_HOME%\lib\ant-contrib.jar goto no_antcontrib
|
| 58 |
|
yshi8 | a29212b | 2006-05-09 06:11:05 +0000 | [diff] [blame] | 59 | :check_xmlbeans
|
bbahnsen | 0299684 | 2006-04-21 23:36:37 +0000 | [diff] [blame] | 60 | if "%XMLBEANS_HOME%"=="" goto no_xmlbeans
|
lhauch | 42b67fc | 2006-04-25 19:59:29 +0000 | [diff] [blame] | 61 | if not exist %XMLBEANS_HOME%\lib\saxon8.jar goto no_saxon8
|
| 62 |
|
yshi8 | a29212b | 2006-05-09 06:11:05 +0000 | [diff] [blame] | 63 | @REM
|
| 64 | @REM Set the WORKSPACE to the current working directory
|
| 65 | @REM
|
| 66 | set WORKSPACE=%CD%
|
lhauch | 42b67fc | 2006-04-25 19:59:29 +0000 | [diff] [blame] | 67 |
|
qouyang | 2da8968 | 2006-06-08 09:11:56 +0000 | [diff] [blame] | 68 | set FRAMEWORK_TOOLS_PATH=%WORKSPACE%\Tools\bin
|
lhauch | 6de5f95 | 2006-06-09 18:07:09 +0000 | [diff] [blame] | 69 |
|
| 70 | if defined WORKSPACE_TOOLS_PATH goto check_path
|
| 71 | set PATH=%FRAMEWORK_TOOLS_PATH%;%JAVA_HOME%\bin;%ANT_HOME%\bin;%XMLBEANS_HOME%\bin;%PATH%
|
| 72 | set WORKSPACE_TOOLS_PATH=%FRAMEWORK_TOOLS_PATH%
|
| 73 | echo Setting the PATH variable to include the Framework_Tools_Path for this WORKSPACE
|
| 74 | goto path_ok
|
| 75 |
|
| 76 | :check_path
|
| 77 | if "%FRAMEWORK_TOOLS_PATH%"=="%WORKSPACE_TOOLS_PATH%" goto path_ok
|
| 78 | set PATH=%FRAMEWORK_TOOLS_PATH%;%PATH%
|
| 79 | set WORKSPACE_PATH=%WORKSPACE%
|
| 80 | echo Resetting the PATH variable to include the Framework_Tools_Path for this WORKSPACE
|
| 81 |
|
| 82 | :path_ok
|
| 83 |
|
| 84 | if "%1"=="skip" goto skipbuild
|
yshi8 | a29212b | 2006-05-09 06:11:05 +0000 | [diff] [blame] | 85 |
|
| 86 | echo.
|
lhauch | 6de5f95 | 2006-06-09 18:07:09 +0000 | [diff] [blame] | 87 | echo WORKSPACE: %WORKSPACE%
|
yshi8 | a29212b | 2006-05-09 06:11:05 +0000 | [diff] [blame] | 88 | echo JAVA_HOME: %JAVA_HOME%
|
| 89 | echo ANT_HOME: %ANT_HOME%
|
| 90 | echo XMLBEANS_HOME: %XMLBEANS_HOME%
|
| 91 | echo CYGWIN_HOME: %CYGWIN_HOME%
|
yshi8 | a29212b | 2006-05-09 06:11:05 +0000 | [diff] [blame] | 92 | echo PATH: %PATH%
|
| 93 | echo.
|
| 94 |
|
| 95 | @REM
|
| 96 | @REM Start to build the Framework Tools
|
| 97 | @REM
|
| 98 |
|
lhauch | 302e0e4 | 2006-06-09 15:26:28 +0000 | [diff] [blame] | 99 |
|
yshi8 | a29212b | 2006-05-09 06:11:05 +0000 | [diff] [blame] | 100 | echo.
|
| 101 | echo Building the Framework Tools
|
| 102 | echo.
|
| 103 |
|
| 104 | @REM
|
| 105 | @REM We are going to create the SurfaceArea.jar file first so that the other
|
| 106 | @REM Java Programs can use it.
|
| 107 | @REM It needs the XMLBEANS libraries in order to compile.
|
| 108 | @REM
|
wuyizhong | 5d86386 | 2006-06-30 17:53:27 +0000 | [diff] [blame] | 109 | set CLASSPATH=.;%XMLBEANS_HOME%\lib\jsr173_1.0_api.jar;%XMLBEANS_HOME%\lib\xbean.jar
|
lhauch | 53cef58 | 2006-04-28 19:32:18 +0000 | [diff] [blame] | 110 | set CLASSPATH=%CLASSPATH%;%XMLBEANS_HOME%\lib\xbean_xpath.jar;%XMLBEANS_HOME%\lib\xmlpublic.jar
|
| 111 | set CLASSPATH=%CLASSPATH%;%XMLBEANS_HOME%\lib\saxon8.jar;%XMLBEANS_HOME%\lib\resolver.jar
|
bbahnsen | 878ddf1 | 2006-04-21 22:54:32 +0000 | [diff] [blame] | 112 |
|
wuyizhong | 450d3b1 | 2006-07-06 08:29:28 +0000 | [diff] [blame] | 113 | @if "%1" neq "ForceRebuild" goto NormalBuild
|
| 114 | call ant -f %WORKSPACE%\Tools\build.xml cleanall
|
| 115 |
|
| 116 | :NormalBuild
|
yshi8 | a29212b | 2006-05-09 06:11:05 +0000 | [diff] [blame] | 117 | call ant -f %WORKSPACE%\Tools\build.xml SurfaceArea
|
bbahnsen | 878ddf1 | 2006-04-21 22:54:32 +0000 | [diff] [blame] | 118 |
|
yshi8 | a29212b | 2006-05-09 06:11:05 +0000 | [diff] [blame] | 119 | @REM
|
bbahnsen | 878ddf1 | 2006-04-21 22:54:32 +0000 | [diff] [blame] | 120 | @REM Now we can make the other Java Programs
|
lhauch | 53cef58 | 2006-04-28 19:32:18 +0000 | [diff] [blame] | 121 | @REM All of the remaining Java Programs require the SurfaceArea library to compile
|
yshi8 | a29212b | 2006-05-09 06:11:05 +0000 | [diff] [blame] | 122 | @REM
|
lhauch | 302e0e4 | 2006-06-09 15:26:28 +0000 | [diff] [blame] | 123 | set CLASSPATH=%CLASSPATH%;%WORKSPACE%\%Tools\Jars\SurfaceArea.jar
|
bbahnsen | 878ddf1 | 2006-04-21 22:54:32 +0000 | [diff] [blame] | 124 |
|
qouyang | b9546cc | 2006-06-20 11:57:17 +0000 | [diff] [blame] | 125 |
|
yshi8 | a29212b | 2006-05-09 06:11:05 +0000 | [diff] [blame] | 126 | call ant -f %WORKSPACE%\Tools\build.xml JavaCode
|
bbahnsen | 878ddf1 | 2006-04-21 22:54:32 +0000 | [diff] [blame] | 127 |
|
yshi8 | a29212b | 2006-05-09 06:11:05 +0000 | [diff] [blame] | 128 | @REM
|
| 129 | @REM We have all of the Java Programs and add-in classes created, so we can start
|
| 130 | @REM using the cpp-tasks to create our tools
|
| 131 | @REM
|
qouyang | b9546cc | 2006-06-20 11:57:17 +0000 | [diff] [blame] | 132 | set CLASSPATH=%CLASSPATH%;%WORKSPACE%\Tools\Jars\Common.jar
|
lhauch | 302e0e4 | 2006-06-09 15:26:28 +0000 | [diff] [blame] | 133 | set CLASSPATH=%CLASSPATH%;%WORKSPACE%\Tools\Jars\GenBuild.jar
|
lhauch | 08e4a41 | 2006-07-08 13:59:19 +0000 | [diff] [blame] | 134 | set CLASSPATH=%CLASSPATH%;%WORKSPACE%\Tools\Jars\cpptasks.jar
|
| 135 | set CLASSPATH=%CLASSPATH%;%WORKSPACE%\Tools\Jars\frameworktasks.jar
|
hche10x | da1508d | 2006-07-13 01:16:51 +0000 | [diff] [blame^] | 136 | set CLASSPATH=%CLASSPATH%;%WORKSPACE%\Tools\Bin\FrameworkWizard.jar
|
bbahnsen | 878ddf1 | 2006-04-21 22:54:32 +0000 | [diff] [blame] | 137 |
|
yshi8 | a29212b | 2006-05-09 06:11:05 +0000 | [diff] [blame] | 138 | call ant -f %WORKSPACE%\Tools\build.xml C_Code
|
bbahnsen | 878ddf1 | 2006-04-21 22:54:32 +0000 | [diff] [blame] | 139 |
|
yshi8 | a29212b | 2006-05-09 06:11:05 +0000 | [diff] [blame] | 140 | @REM
|
| 141 | @REM Done!!!
|
| 142 | @REM
|
bbahnsen | 878ddf1 | 2006-04-21 22:54:32 +0000 | [diff] [blame] | 143 | goto end
|
| 144 |
|
| 145 | :no_jdk
|
| 146 | echo.
|
bbahnsen | 0299684 | 2006-04-21 23:36:37 +0000 | [diff] [blame] | 147 | echo !!! Please install Java, and set JAVA_HOME !!!
|
| 148 | echo.
|
yshi8 | a29212b | 2006-05-09 06:11:05 +0000 | [diff] [blame] | 149 | goto end
|
bbahnsen | 0299684 | 2006-04-21 23:36:37 +0000 | [diff] [blame] | 150 |
|
| 151 | :no_ant
|
| 152 | echo.
|
| 153 | echo !!! Please install Apache Ant, and set ANT_HOME !!!
|
| 154 | echo.
|
yshi8 | a29212b | 2006-05-09 06:11:05 +0000 | [diff] [blame] | 155 | goto end
|
bbahnsen | 0299684 | 2006-04-21 23:36:37 +0000 | [diff] [blame] | 156 |
|
lhauch | 42b67fc | 2006-04-25 19:59:29 +0000 | [diff] [blame] | 157 | :no_antcontrib
|
| 158 | echo.
|
| 159 | echo !!! Please install Ant-contrib to ANT_HOME !!!
|
| 160 | echo.
|
yshi8 | a29212b | 2006-05-09 06:11:05 +0000 | [diff] [blame] | 161 | goto end
|
lhauch | 42b67fc | 2006-04-25 19:59:29 +0000 | [diff] [blame] | 162 |
|
bbahnsen | 0299684 | 2006-04-21 23:36:37 +0000 | [diff] [blame] | 163 | :no_xmlbeans
|
| 164 | echo.
|
| 165 | echo !!! Please install XML Beans, and set XMLBEANS_HOME !!!
|
bbahnsen | 878ddf1 | 2006-04-21 22:54:32 +0000 | [diff] [blame] | 166 | echo.
|
yshi8 | a29212b | 2006-05-09 06:11:05 +0000 | [diff] [blame] | 167 | goto end
|
bbahnsen | 878ddf1 | 2006-04-21 22:54:32 +0000 | [diff] [blame] | 168 |
|
lhauch | 42b67fc | 2006-04-25 19:59:29 +0000 | [diff] [blame] | 169 | :no_saxon8
|
| 170 | echo.
|
| 171 | echo !!! Please copy saxon8.jar file to XMLBEANS_HOME\lib !!!
|
| 172 | echo.
|
yshi8 | a29212b | 2006-05-09 06:11:05 +0000 | [diff] [blame] | 173 | goto end
|
lhauch | 42b67fc | 2006-04-25 19:59:29 +0000 | [diff] [blame] | 174 |
|
lhauch | 302e0e4 | 2006-06-09 15:26:28 +0000 | [diff] [blame] | 175 | :skipbuild
|
| 176 | @REM
|
| 177 | @REM This just sets up the CLASSPATH, the rest of the environment should have been set already.
|
| 178 | @REM
|
lhauch | 302e0e4 | 2006-06-09 15:26:28 +0000 | [diff] [blame] | 179 | echo.
|
lhauch | 6de5f95 | 2006-06-09 18:07:09 +0000 | [diff] [blame] | 180 | echo WORKSPACE: %WORKSPACE%
|
lhauch | 302e0e4 | 2006-06-09 15:26:28 +0000 | [diff] [blame] | 181 | echo JAVA_HOME: %JAVA_HOME%
|
| 182 | echo ANT_HOME: %ANT_HOME%
|
| 183 | echo XMLBEANS_HOME: %XMLBEANS_HOME%
|
| 184 | echo CYGWIN_HOME: %CYGWIN_HOME%
|
lhauch | 302e0e4 | 2006-06-09 15:26:28 +0000 | [diff] [blame] | 185 | echo PATH: %PATH%
|
| 186 | echo.
|
| 187 | set CLASSPATH=%XMLBEANS_HOME%\lib\jsr173_1.0_api.jar;%XMLBEANS_HOME%\lib\xbean.jar
|
| 188 | set CLASSPATH=%CLASSPATH%;%XMLBEANS_HOME%\lib\xbean_xpath.jar;%XMLBEANS_HOME%\lib\xmlpublic.jar
|
| 189 | set CLASSPATH=%CLASSPATH%;%XMLBEANS_HOME%\lib\saxon8.jar;%XMLBEANS_HOME%\lib\resolver.jar
|
lhauch | 08e4a41 | 2006-07-08 13:59:19 +0000 | [diff] [blame] | 190 | set CLASSPATH=%CLASSPATH%;%WORKSPACE%\Tools\Jars\SurfaceArea.jar
|
| 191 | set CLASSPATH=%CLASSPATH%;%WORKSPACE%\Tools\Jars\Common.jar;%WORKSPACE%\Tools\Jars\GenBuild.jar
|
lhauch | 302e0e4 | 2006-06-09 15:26:28 +0000 | [diff] [blame] | 192 | set CLASSPATH=%CLASSPATH%;%WORKSPACE%\Tools\Jars\cpptasks.jar;%WORKSPACE%\Tools\Jars\frameworktasks.jar
|
| 193 | goto end
|
| 194 |
|
bbahnsen | 878ddf1 | 2006-04-21 22:54:32 +0000 | [diff] [blame] | 195 | :end
|
| 196 | @echo on
|
| 197 |
|