This is a patch from Yizhong to fix the XMLBEANS location.
[mirror_edk2.git] / edksetup.bat
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
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
24 if defined VCINSTALLDIR goto check_java
25 if 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
34 if "%JAVA_HOME%"=="" goto no_jdk
35
36 @REM Set the WORKSPACE to the Current Working Directory
37 set WORKSPACE=%~dp0
38
39 :set_cygwin
40 if 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
48 if "%ANT_HOME%"=="" goto no_ant
49 if "%XMLBEANS_HOME%"=="" goto no_xmlbeans
50 set Framework_Tools_Path=%WORKSPACE%\Tools\bin
51
52 echo.
53 echo WORKSPACE: %WORKSPACE%
54 echo ANT_HOME: %ANT_HOME%
55 echo JAVA_HOME: %JAVA_HOME%
56
57 if "%PATHBACKUP%"=="" set PATHBACKUP=%PATH%
58 set PATH=%JAVA_HOME%\bin;%ANT_HOME%\bin;%WORKSPACE%\Tools\bin;%XMLBEANS_HOME%\bin;%PATHBACKUP%;%CYGWIN_HOME%\bin
59
60 echo PATH: %PATH%
61 echo.
62
63 @REM We are going to create the SurfaceArea.jar file first so that other Java Program can use it
64 set 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
65
66 call ant -f %WORKSPACE%Tools\build.xml SurfaceArea
67
68 @REM Now we can make the other Java Programs
69 set 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
70
71 call 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
74 set 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
75
76 call ant -f %WORKSPACE%Tools\build.xml C_Code
77
78 goto end
79
80 :no_jdk
81 echo.
82 echo !!! Please install Java, and set JAVA_HOME !!!
83 echo.
84 goto end
85
86 :no_ant
87 echo.
88 echo !!! Please install Apache Ant, and set ANT_HOME !!!
89 echo.
90 goto end
91
92 :no_xmlbeans
93 echo.
94 echo !!! Please install XML Beans, and set XMLBEANS_HOME !!!
95 echo.
96 goto end
97
98 :end
99 @echo on
100