Modified to handle XMLBEANS_HOME
[mirror_edk2.git] / edksetup.bat
CommitLineData
878ddf1f 1@REM\r
2@REM Copyright (c) 2006, Intel Corporation\r
3@REM All rights reserved. This program and the accompanying materials\r
4@REM are licensed and made available under the terms and conditions of the BSD License\r
5@REM which accompanies this distribution. The full text of the license may be found at\r
6@REM http://opensource.org/licenses/bsd-license.php\r
7@REM \r
8@REM THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
9@REM WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
10@REM\r
11\r
12@REM set following environment in this file or in command shell\r
13@REM set JAVA_HOME=C:\Java\jdk1.5.0_04\r
14@REM set WORKSPACE=C:\mdk\r
15\r
16\r
17@REM ##############################################################\r
18@REM # You should not have to modify anything below this line\r
19@REM #\r
20\r
21@echo off\r
22\r
23:check_vc\r
24if defined VCINSTALLDIR goto check_java\r
25if defined VS71COMNTOOLS (\r
26 call "%VS71COMNTOOLS%vsvars32.bat"\r
27) else (\r
28 echo.\r
29 echo !!! WARNING !!!! Cannot find Visual Studio !!!\r
30 echo.\r
31)\r
32\r
33:check_java\r
34if "%JAVA_HOME%"=="" goto no_jdk\r
42b67fc4 35echo.\r
36echo JAVA_HOME: %JAVA_HOME%\r
878ddf1f 37\r
38@REM Set the WORKSPACE to the Current Working Directory\r
39set WORKSPACE=%~dp0\r
42b67fc4 40echo WORKSPACE: %WORKSPACE%\r
878ddf1f 41\r
42:set_cygwin\r
43if not defined CYGWIN_HOME (\r
44 if exist c:\cygwin (set CYGWIN_HOME=c:\cygwin) else (\r
45 echo.\r
46 echo !!! Not set CYGWIN_HOME, gcc build may not be used !!!\r
47 echo.\r
48 )\r
42b67fc4 49) else (\r
50 echo CYGWIN_HOME: %CYGWIN_HOME%\r
878ddf1f 51)\r
52\r
02996846 53if "%ANT_HOME%"=="" goto no_ant\r
42b67fc4 54echo ANT_HOME: %ANT_HOME%\r
55if not exist %ANT_HOME%\lib\ant-contrib.jar goto no_antcontrib\r
56\r
02996846 57if "%XMLBEANS_HOME%"=="" goto no_xmlbeans\r
42b67fc4 58echo XMLBEANS_HOME: %XMLBEANS_HOME%\r
59\r
878ddf1f 60set Framework_Tools_Path=%WORKSPACE%\Tools\bin\r
61\r
878ddf1f 62\r
63if "%PATHBACKUP%"=="" set PATHBACKUP=%PATH%\r
64set PATH=%JAVA_HOME%\bin;%ANT_HOME%\bin;%WORKSPACE%\Tools\bin;%XMLBEANS_HOME%\bin;%PATHBACKUP%;%CYGWIN_HOME%\bin\r
65\r
66echo PATH: %PATH%\r
67echo.\r
68\r
42b67fc4 69if not exist %XMLBEANS_HOME%\lib\saxon8.jar goto no_saxon8\r
70\r
71echo Building the Tiano Tools\r
72\r
878ddf1f 73@REM We are going to create the SurfaceArea.jar file first so that other Java Program can use it\r
19924945 74set 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;%XMLBEANS_HOME%\lib\saxon8.jar\r
878ddf1f 75\r
76call ant -f %WORKSPACE%Tools\build.xml SurfaceArea\r
77\r
78@REM Now we can make the other Java Programs\r
19924945 79set 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;%XMLBEANS_HOME%\lib\saxon8.jar\r
878ddf1f 80\r
81call ant -f %WORKSPACE%Tools\build.xml JavaCode\r
82\r
83@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\r
19924945 84set 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;%XMLBEANS_HOME%\lib\saxon8.jar\r
878ddf1f 85\r
86call ant -f %WORKSPACE%Tools\build.xml C_Code\r
87\r
88goto end\r
89\r
90:no_jdk\r
91echo.\r
02996846 92echo !!! Please install Java, and set JAVA_HOME !!!\r
93echo.\r
94goto end \r
95\r
96:no_ant\r
97echo.\r
98echo !!! Please install Apache Ant, and set ANT_HOME !!!\r
99echo.\r
100goto end \r
101\r
42b67fc4 102:no_antcontrib\r
103echo.\r
104echo !!! Please install Ant-contrib to ANT_HOME !!!\r
105echo.\r
106goto end \r
107\r
02996846 108:no_xmlbeans\r
109echo.\r
110echo !!! Please install XML Beans, and set XMLBEANS_HOME !!!\r
878ddf1f 111echo.\r
112goto end \r
113\r
42b67fc4 114:no_saxon8\r
115echo.\r
116echo !!! Please copy saxon8.jar file to XMLBEANS_HOME\lib !!!\r
117echo.\r
118goto end \r
119\r
878ddf1f 120:end\r
121@echo on\r
122\r