]> git.proxmox.com Git - mirror_edk2.git/blob - edksetup.bat
Added a few links to help people find external tools.
[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 echo.
36 echo JAVA_HOME: %JAVA_HOME%
37
38 @REM Set the WORKSPACE to the Current Working Directory
39 set WORKSPACE=%~dp0
40 echo WORKSPACE: %WORKSPACE%
41
42 :set_cygwin
43 if not defined CYGWIN_HOME (
44 if exist c:\cygwin (set CYGWIN_HOME=c:\cygwin) else (
45 echo.
46 echo !!! Not set CYGWIN_HOME, gcc build may not be used !!!
47 echo.
48 )
49 ) else (
50 echo CYGWIN_HOME: %CYGWIN_HOME%
51 )
52
53 if "%ANT_HOME%"=="" goto no_ant
54 echo ANT_HOME: %ANT_HOME%
55 if not exist %ANT_HOME%\lib\ant-contrib.jar goto no_antcontrib
56
57 if "%XMLBEANS_HOME%"=="" goto no_xmlbeans
58 echo XMLBEANS_HOME: %XMLBEANS_HOME%
59
60 set Framework_Tools_Path=%WORKSPACE%\Tools\bin
61
62
63 set PATH=%Framework_Tools_Path%;%PATH%
64
65 echo PATH: %PATH%
66 echo.
67
68 if not exist %XMLBEANS_HOME%\lib\saxon8.jar goto no_saxon8
69
70 echo Building the Tiano Tools
71
72 @REM We are going to create the SurfaceArea.jar file first so that other Java Program can use it
73 @REM It needs the xmlbeans libaries in order to compile.
74 set CLASSPATH=%XMLBEANS_HOME%\lib\jsr173_1.0_api.jar;%XMLBEANS_HOME%\lib\xbean.jar
75 set CLASSPATH=%CLASSPATH%;%XMLBEANS_HOME%\lib\xbean_xpath.jar;%XMLBEANS_HOME%\lib\xmlpublic.jar
76 set CLASSPATH=%CLASSPATH%;%XMLBEANS_HOME%\lib\saxon8.jar;%XMLBEANS_HOME%\lib\resolver.jar
77
78 call ant -f %WORKSPACE%Tools\build.xml SurfaceArea
79
80 @REM Now we can make the other Java Programs
81 @REM All of the remaining Java Programs require the SurfaceArea library to compile
82 set CLASSPATH=%CLASSPATH%;%WORKSPACE%Tools\Jars\SurfaceArea.jar
83
84 call ant -f %WORKSPACE%Tools\build.xml JavaCode
85
86 @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
87 set CLASSPATH=%CLASSPATH%;%WORKSPACE%Tools\Jars\SurfaceArea.jar;%WORKSPACE%Tools\Jars\GenBuild.jar
88 set CLASSPATH=%CLASSPATH%;%WORKSPACE%Tools\Jars\cpptasks.jar;%WORKSPACE%Tools\Jars\frameworktasks.jar
89
90 call ant -f %WORKSPACE%Tools\build.xml C_Code
91
92 goto end
93
94 :no_jdk
95 echo.
96 echo !!! Please install Java, and set JAVA_HOME !!!
97 echo.
98 goto end
99
100 :no_ant
101 echo.
102 echo !!! Please install Apache Ant, and set ANT_HOME !!!
103 echo.
104 goto end
105
106 :no_antcontrib
107 echo.
108 echo !!! Please install Ant-contrib to ANT_HOME !!!
109 echo.
110 goto end
111
112 :no_xmlbeans
113 echo.
114 echo !!! Please install XML Beans, and set XMLBEANS_HOME !!!
115 echo.
116 goto end
117
118 :no_saxon8
119 echo.
120 echo !!! Please copy saxon8.jar file to XMLBEANS_HOME\lib !!!
121 echo.
122 goto end
123
124 :end
125 @echo on
126