]> git.proxmox.com Git - mirror_edk2.git/blob - edksetup.bat
23c2acdb871f365864e932726867b03512f82d42
[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 if "%PATHBACKUP%"=="" set PATHBACKUP=%PATH%
64 set PATH=%JAVA_HOME%\bin;%ANT_HOME%\bin;%WORKSPACE%\Tools\bin;%XMLBEANS_HOME%\bin;%PATHBACKUP%;%CYGWIN_HOME%\bin
65
66 echo PATH: %PATH%
67 echo.
68
69 if not exist %XMLBEANS_HOME%\lib\saxon8.jar goto no_saxon8
70
71 echo Building the Tiano Tools
72
73 @REM We are going to create the SurfaceArea.jar file first so that other Java Program can use it
74 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
75
76 call ant -f %WORKSPACE%Tools\build.xml SurfaceArea
77
78 @REM Now we can make the other Java Programs
79 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
80
81 call ant -f %WORKSPACE%Tools\build.xml JavaCode
82
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
84 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
85
86 call ant -f %WORKSPACE%Tools\build.xml C_Code
87
88 goto end
89
90 :no_jdk
91 echo.
92 echo !!! Please install Java, and set JAVA_HOME !!!
93 echo.
94 goto end
95
96 :no_ant
97 echo.
98 echo !!! Please install Apache Ant, and set ANT_HOME !!!
99 echo.
100 goto end
101
102 :no_antcontrib
103 echo.
104 echo !!! Please install Ant-contrib to ANT_HOME !!!
105 echo.
106 goto end
107
108 :no_xmlbeans
109 echo.
110 echo !!! Please install XML Beans, and set XMLBEANS_HOME !!!
111 echo.
112 goto end
113
114 :no_saxon8
115 echo.
116 echo !!! Please copy saxon8.jar file to XMLBEANS_HOME\lib !!!
117 echo.
118 goto end
119
120 :end
121 @echo on
122