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 |
|
| 18 |
|
| 19 | @REM ##############################################################
|
| 20 | @REM # You should not have to modify anything below this line
|
| 21 | @REM #
|
| 22 |
|
| 23 | @echo off
|
| 24 |
|
yshi8 | a29212b | 2006-05-09 06:11:05 +0000 | [diff] [blame^] | 25 | @REM
|
| 26 | @REM Check the required system environment variables
|
| 27 | @REM
|
| 28 |
|
bbahnsen | 878ddf1 | 2006-04-21 22:54:32 +0000 | [diff] [blame] | 29 | :check_vc
|
yshi8 | a29212b | 2006-05-09 06:11:05 +0000 | [diff] [blame^] | 30 | if defined VCINSTALLDIR goto check_cygwin
|
bbahnsen | 878ddf1 | 2006-04-21 22:54:32 +0000 | [diff] [blame] | 31 | if defined VS71COMNTOOLS (
|
| 32 | call "%VS71COMNTOOLS%vsvars32.bat"
|
| 33 | ) else (
|
| 34 | echo.
|
| 35 | echo !!! WARNING !!!! Cannot find Visual Studio !!!
|
| 36 | echo.
|
| 37 | )
|
| 38 |
|
yshi8 | a29212b | 2006-05-09 06:11:05 +0000 | [diff] [blame^] | 39 | :check_cygwin
|
| 40 | if defined CYGWIN_HOME goto check_java
|
| 41 | if exist c:\cygwin (
|
| 42 | set CYGWIN_HOME=c:\cygwin
|
lhauch | 42b67fc | 2006-04-25 19:59:29 +0000 | [diff] [blame] | 43 | ) else (
|
yshi8 | a29212b | 2006-05-09 06:11:05 +0000 | [diff] [blame^] | 44 | echo.
|
| 45 | echo !!! WARNING !!!! Not set CYGWIN_HOME, gcc build may not be used !!!
|
| 46 | echo.
|
bbahnsen | 878ddf1 | 2006-04-21 22:54:32 +0000 | [diff] [blame] | 47 | )
|
| 48 |
|
yshi8 | a29212b | 2006-05-09 06:11:05 +0000 | [diff] [blame^] | 49 | :check_java
|
| 50 | if "%JAVA_HOME%"=="" goto no_jdk
|
| 51 |
|
| 52 | :check_ant
|
bbahnsen | 0299684 | 2006-04-21 23:36:37 +0000 | [diff] [blame] | 53 | if "%ANT_HOME%"=="" goto no_ant
|
lhauch | 42b67fc | 2006-04-25 19:59:29 +0000 | [diff] [blame] | 54 | if not exist %ANT_HOME%\lib\ant-contrib.jar goto no_antcontrib
|
| 55 |
|
yshi8 | a29212b | 2006-05-09 06:11:05 +0000 | [diff] [blame^] | 56 | :check_xmlbeans
|
bbahnsen | 0299684 | 2006-04-21 23:36:37 +0000 | [diff] [blame] | 57 | if "%XMLBEANS_HOME%"=="" goto no_xmlbeans
|
lhauch | 42b67fc | 2006-04-25 19:59:29 +0000 | [diff] [blame] | 58 | if not exist %XMLBEANS_HOME%\lib\saxon8.jar goto no_saxon8
|
| 59 |
|
yshi8 | a29212b | 2006-05-09 06:11:05 +0000 | [diff] [blame^] | 60 | @REM
|
| 61 | @REM Set the WORKSPACE to the current working directory
|
| 62 | @REM
|
| 63 | set WORKSPACE=%CD%
|
lhauch | 42b67fc | 2006-04-25 19:59:29 +0000 | [diff] [blame] | 64 |
|
yshi8 | a29212b | 2006-05-09 06:11:05 +0000 | [diff] [blame^] | 65 | set FRAMEWORK_TOOLS_PATH=%WORKSPACE%\Tools\Bin
|
| 66 | set PATH=%FRAMEWORK_TOOLS_PATH%;%PATH%
|
| 67 |
|
| 68 | echo.
|
| 69 | echo JAVA_HOME: %JAVA_HOME%
|
| 70 | echo ANT_HOME: %ANT_HOME%
|
| 71 | echo XMLBEANS_HOME: %XMLBEANS_HOME%
|
| 72 | echo CYGWIN_HOME: %CYGWIN_HOME%
|
| 73 | echo WORKSPACE: %WORKSPACE%
|
| 74 | echo PATH: %PATH%
|
| 75 | echo.
|
| 76 |
|
| 77 | @REM
|
| 78 | @REM Start to build the Framework Tools
|
| 79 | @REM
|
| 80 |
|
| 81 | echo.
|
| 82 | echo Building the Framework Tools
|
| 83 | echo.
|
| 84 |
|
| 85 | @REM
|
| 86 | @REM We are going to create the SurfaceArea.jar file first so that the other
|
| 87 | @REM Java Programs can use it.
|
| 88 | @REM It needs the XMLBEANS libraries in order to compile.
|
| 89 | @REM
|
lhauch | 53cef58 | 2006-04-28 19:32:18 +0000 | [diff] [blame] | 90 | set CLASSPATH=%XMLBEANS_HOME%\lib\jsr173_1.0_api.jar;%XMLBEANS_HOME%\lib\xbean.jar
|
| 91 | set CLASSPATH=%CLASSPATH%;%XMLBEANS_HOME%\lib\xbean_xpath.jar;%XMLBEANS_HOME%\lib\xmlpublic.jar
|
| 92 | set CLASSPATH=%CLASSPATH%;%XMLBEANS_HOME%\lib\saxon8.jar;%XMLBEANS_HOME%\lib\resolver.jar
|
bbahnsen | 878ddf1 | 2006-04-21 22:54:32 +0000 | [diff] [blame] | 93 |
|
yshi8 | a29212b | 2006-05-09 06:11:05 +0000 | [diff] [blame^] | 94 | call ant -f %WORKSPACE%\Tools\build.xml SurfaceArea
|
bbahnsen | 878ddf1 | 2006-04-21 22:54:32 +0000 | [diff] [blame] | 95 |
|
yshi8 | a29212b | 2006-05-09 06:11:05 +0000 | [diff] [blame^] | 96 | @REM
|
bbahnsen | 878ddf1 | 2006-04-21 22:54:32 +0000 | [diff] [blame] | 97 | @REM Now we can make the other Java Programs
|
lhauch | 53cef58 | 2006-04-28 19:32:18 +0000 | [diff] [blame] | 98 | @REM All of the remaining Java Programs require the SurfaceArea library to compile
|
yshi8 | a29212b | 2006-05-09 06:11:05 +0000 | [diff] [blame^] | 99 | @REM
|
| 100 | set CLASSPATH=%CLASSPATH%;%WORKSPACE\%Tools\Jars\SurfaceArea.jar
|
bbahnsen | 878ddf1 | 2006-04-21 22:54:32 +0000 | [diff] [blame] | 101 |
|
yshi8 | a29212b | 2006-05-09 06:11:05 +0000 | [diff] [blame^] | 102 | call ant -f %WORKSPACE%\Tools\build.xml JavaCode
|
bbahnsen | 878ddf1 | 2006-04-21 22:54:32 +0000 | [diff] [blame] | 103 |
|
yshi8 | a29212b | 2006-05-09 06:11:05 +0000 | [diff] [blame^] | 104 | @REM
|
| 105 | @REM We have all of the Java Programs and add-in classes created, so we can start
|
| 106 | @REM using the cpp-tasks to create our tools
|
| 107 | @REM
|
| 108 | set CLASSPATH=%CLASSPATH%;%WORKSPACE%\Tools\Jars\SurfaceArea.jar;%WORKSPACE%\Tools\Jars\GenBuild.jar
|
| 109 | set CLASSPATH=%CLASSPATH%;%WORKSPACE%\Tools\Jars\cpptasks.jar;%WORKSPACE%\Tools\Jars\frameworktasks.jar
|
bbahnsen | 878ddf1 | 2006-04-21 22:54:32 +0000 | [diff] [blame] | 110 |
|
yshi8 | a29212b | 2006-05-09 06:11:05 +0000 | [diff] [blame^] | 111 | call ant -f %WORKSPACE%\Tools\build.xml C_Code
|
bbahnsen | 878ddf1 | 2006-04-21 22:54:32 +0000 | [diff] [blame] | 112 |
|
yshi8 | a29212b | 2006-05-09 06:11:05 +0000 | [diff] [blame^] | 113 | @REM
|
| 114 | @REM Done!!!
|
| 115 | @REM
|
bbahnsen | 878ddf1 | 2006-04-21 22:54:32 +0000 | [diff] [blame] | 116 | goto end
|
| 117 |
|
| 118 | :no_jdk
|
| 119 | echo.
|
bbahnsen | 0299684 | 2006-04-21 23:36:37 +0000 | [diff] [blame] | 120 | echo !!! Please install Java, and set JAVA_HOME !!!
|
| 121 | echo.
|
yshi8 | a29212b | 2006-05-09 06:11:05 +0000 | [diff] [blame^] | 122 | goto end
|
bbahnsen | 0299684 | 2006-04-21 23:36:37 +0000 | [diff] [blame] | 123 |
|
| 124 | :no_ant
|
| 125 | echo.
|
| 126 | echo !!! Please install Apache Ant, and set ANT_HOME !!!
|
| 127 | echo.
|
yshi8 | a29212b | 2006-05-09 06:11:05 +0000 | [diff] [blame^] | 128 | goto end
|
bbahnsen | 0299684 | 2006-04-21 23:36:37 +0000 | [diff] [blame] | 129 |
|
lhauch | 42b67fc | 2006-04-25 19:59:29 +0000 | [diff] [blame] | 130 | :no_antcontrib
|
| 131 | echo.
|
| 132 | echo !!! Please install Ant-contrib to ANT_HOME !!!
|
| 133 | echo.
|
yshi8 | a29212b | 2006-05-09 06:11:05 +0000 | [diff] [blame^] | 134 | goto end
|
lhauch | 42b67fc | 2006-04-25 19:59:29 +0000 | [diff] [blame] | 135 |
|
bbahnsen | 0299684 | 2006-04-21 23:36:37 +0000 | [diff] [blame] | 136 | :no_xmlbeans
|
| 137 | echo.
|
| 138 | echo !!! Please install XML Beans, and set XMLBEANS_HOME !!!
|
bbahnsen | 878ddf1 | 2006-04-21 22:54:32 +0000 | [diff] [blame] | 139 | echo.
|
yshi8 | a29212b | 2006-05-09 06:11:05 +0000 | [diff] [blame^] | 140 | goto end
|
bbahnsen | 878ddf1 | 2006-04-21 22:54:32 +0000 | [diff] [blame] | 141 |
|
lhauch | 42b67fc | 2006-04-25 19:59:29 +0000 | [diff] [blame] | 142 | :no_saxon8
|
| 143 | echo.
|
| 144 | echo !!! Please copy saxon8.jar file to XMLBEANS_HOME\lib !!!
|
| 145 | echo.
|
yshi8 | a29212b | 2006-05-09 06:11:05 +0000 | [diff] [blame^] | 146 | goto end
|
lhauch | 42b67fc | 2006-04-25 19:59:29 +0000 | [diff] [blame] | 147 |
|
bbahnsen | 878ddf1 | 2006-04-21 22:54:32 +0000 | [diff] [blame] | 148 | :end
|
| 149 | @echo on
|
| 150 |
|