blob: 34a3adc12bf6af7b3975980711a638229c381681 [file] [log] [blame]
bbahnsen878ddf12006-04-21 22:54:32 +00001@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
7@REM
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
14@REM set WORKSPACE=C:\mdk
15
16
17@REM ##############################################################
18@REM # You should not have to modify anything below this line
19@REM #
20
21@echo off
22
23:check_vc
24if defined VCINSTALLDIR goto check_java
25if defined VS71COMNTOOLS (
26 call "%VS71COMNTOOLS%vsvars32.bat"
27) else (
28 echo.
29 echo !!! WARNING !!!! Cannot find Visual Studio !!!
30 echo.
31)
32
33:check_java
34if "%JAVA_HOME%"=="" goto no_jdk
35
36@REM Set the WORKSPACE to the Current Working Directory
37set WORKSPACE=%~dp0
38
39:set_cygwin
40if not defined CYGWIN_HOME (
41 if exist c:\cygwin (set CYGWIN_HOME=c:\cygwin) else (
42 echo.
43 echo !!! Not set CYGWIN_HOME, gcc build may not be used !!!
44 echo.
45 )
46)
47
48if "%ANT_HOME%"=="" set ANT_HOME=%WORKSPACE%\Tools\bin\apache-ant
49if "%XMLBEANS_HOME%"=="" set XMLBEANS_HOME=%WORKSPACE%\Tools\bin\xmlbeans
50set Framework_Tools_Path=%WORKSPACE%\Tools\bin
51
52echo.
53echo WORKSPACE: %WORKSPACE%
54echo ANT_HOME: %ANT_HOME%
55echo JAVA_HOME: %JAVA_HOME%
56
57if "%PATHBACKUP%"=="" set PATHBACKUP=%PATH%
58set PATH=%JAVA_HOME%\bin;%ANT_HOME%\bin;%WORKSPACE%\Tools\bin;%XMLBEANS_HOME%\bin;%PATHBACKUP%;%CYGWIN_HOME%\bin
59
60echo PATH: %PATH%
61echo.
62
63@REM We are going to create the SurfaceArea.jar file first so that other Java Program can use it
64set CLASSPATH=%XMLBEANS_HOME%\lib\jsr173_1.0_api.jar;%XMLBEANS_HOME%\lib\xbean.jar;%XMLBEANS_HOME%\lib\xbean_xpath.jar;%XMLBEANS_HOME%\lib\xmlpublic.jar;%WORKSPACE%Tools\Jars\saxon8.jar
65
66call ant -f %WORKSPACE%Tools\build.xml SurfaceArea
67
68@REM Now we can make the other Java Programs
69set CLASSPATH=%WORKSPACE%Tools\Jars\SurfaceArea.jar;%XMLBEANS_HOME%\lib\jsr173_1.0_api.jar;%XMLBEANS_HOME%\lib\xbean.jar;%XMLBEANS_HOME%\lib\xbean_xpath.jar;%XMLBEANS_HOME%\lib\xmlpublic.jar;%WORKSPACE%Tools\Jars\saxon8.jar
70
71call ant -f %WORKSPACE%Tools\build.xml JavaCode
72
73@REM We have all of the Java Programs and add-in classes created, so we can start using the cpp-tasks to create our tools
74set CLASSPATH=%WORKSPACE%Tools\Jars\SurfaceArea.jar;%WORKSPACE%Tools\Jars\GenBuild.jar;%WORKSPACE%Tools\Jars\cpptasks.jar;%WORKSPACE%Tools\Jars\frameworktasks.jar;%XMLBEANS_HOME%\lib\jsr173_1.0_api.jar;%XMLBEANS_HOME%\lib\xbean.jar;%XMLBEANS_HOME%\lib\xbean_xpath.jar;%XMLBEANS_HOME%\lib\xmlpublic.jar;%WORKSPACE%Tools\Jars\saxon8.jar
75
76call ant -f %WORKSPACE%Tools\build.xml C_Code
77
78goto end
79
80:no_jdk
81echo.
82echo !!! Please set JAVA_HOME !!!
83echo.
84goto end
85
86:end
87@echo on
88