]> git.proxmox.com Git - mirror_edk2.git/blame - edksetup.bat
Fix some cleanall issues
[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
a29212b2 7@REM\r
878ddf1f 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
a29212b2 14@REM set ANT_HOME=C:\ANT\r
15@REM set XMLBEANS_HOME=C:\xmlbeans\r
16@REM set CYGWIN_HOME=C:\cygwin\r
878ddf1f 17\r
18\r
19@REM ##############################################################\r
20@REM # You should not have to modify anything below this line\r
21@REM #\r
22\r
23@echo off\r
24\r
a29212b2 25@REM\r
26@REM Check the required system environment variables\r
27@REM\r
28\r
878ddf1f 29:check_vc\r
a29212b2 30if defined VCINSTALLDIR goto check_cygwin\r
878ddf1f 31if defined VS71COMNTOOLS (\r
32 call "%VS71COMNTOOLS%vsvars32.bat"\r
33) else (\r
34 echo.\r
35 echo !!! WARNING !!!! Cannot find Visual Studio !!!\r
36 echo.\r
37)\r
38\r
a29212b2 39:check_cygwin\r
40if defined CYGWIN_HOME goto check_java\r
41if exist c:\cygwin (\r
42 set CYGWIN_HOME=c:\cygwin\r
42b67fc4 43) else (\r
a29212b2 44 echo.\r
45 echo !!! WARNING !!!! Not set CYGWIN_HOME, gcc build may not be used !!!\r
46 echo.\r
878ddf1f 47)\r
48\r
a29212b2 49:check_java\r
50if "%JAVA_HOME%"=="" goto no_jdk\r
51\r
52:check_ant\r
02996846 53if "%ANT_HOME%"=="" goto no_ant\r
42b67fc4 54if not exist %ANT_HOME%\lib\ant-contrib.jar goto no_antcontrib\r
55\r
a29212b2 56:check_xmlbeans\r
02996846 57if "%XMLBEANS_HOME%"=="" goto no_xmlbeans\r
a29212b2 58if not exist %XMLBEANS_HOME%\lib\saxon8.jar goto no_saxon8\r
878ddf1f 59\r
a29212b2 60@REM\r
61@REM Set the WORKSPACE to the current working directory\r
62@REM\r
63set WORKSPACE=%CD%\r
878ddf1f 64\r
8b61dfd9 65set Framework_Tools_Path=%WORKSPACE%\Tools\bin\r
1ae1cdbd 66set PATH=%JAVA_HOME%\bin;%ANT_HOME%\bin;%XMLBEANS_HOME%\bin;%Framework_Tools_Path%;%PATH%\r
878ddf1f 67\r
a29212b2 68echo.\r
69echo JAVA_HOME: %JAVA_HOME%\r
70echo ANT_HOME: %ANT_HOME%\r
71echo XMLBEANS_HOME: %XMLBEANS_HOME%\r
72echo CYGWIN_HOME: %CYGWIN_HOME%\r
73echo WORKSPACE: %WORKSPACE%\r
74echo PATH: %PATH%\r
878ddf1f 75echo.\r
76\r
a29212b2 77@REM\r
78@REM Start to build the Framework Tools\r
79@REM\r
42b67fc4 80\r
a29212b2 81echo.\r
82echo Building the Framework Tools\r
83echo.\r
42b67fc4 84\r
a29212b2 85@REM\r
86@REM We are going to create the SurfaceArea.jar file first so that the other\r
87@REM Java Programs can use it.\r
88@REM It needs the XMLBEANS libraries in order to compile.\r
89@REM\r
53cef58a 90set CLASSPATH=%XMLBEANS_HOME%\lib\jsr173_1.0_api.jar;%XMLBEANS_HOME%\lib\xbean.jar\r
91set CLASSPATH=%CLASSPATH%;%XMLBEANS_HOME%\lib\xbean_xpath.jar;%XMLBEANS_HOME%\lib\xmlpublic.jar\r
92set CLASSPATH=%CLASSPATH%;%XMLBEANS_HOME%\lib\saxon8.jar;%XMLBEANS_HOME%\lib\resolver.jar\r
878ddf1f 93\r
a29212b2 94call ant -f %WORKSPACE%\Tools\build.xml SurfaceArea\r
878ddf1f 95\r
a29212b2 96@REM\r
878ddf1f 97@REM Now we can make the other Java Programs\r
53cef58a 98@REM All of the remaining Java Programs require the SurfaceArea library to compile\r
a29212b2 99@REM\r
100set CLASSPATH=%CLASSPATH%;%WORKSPACE\%Tools\Jars\SurfaceArea.jar\r
878ddf1f 101\r
a29212b2 102call ant -f %WORKSPACE%\Tools\build.xml JavaCode\r
878ddf1f 103\r
a29212b2 104@REM\r
105@REM We have all of the Java Programs and add-in classes created, so we can start\r
106@REM using the cpp-tasks to create our tools\r
107@REM\r
108set CLASSPATH=%CLASSPATH%;%WORKSPACE%\Tools\Jars\SurfaceArea.jar;%WORKSPACE%\Tools\Jars\GenBuild.jar\r
109set CLASSPATH=%CLASSPATH%;%WORKSPACE%\Tools\Jars\cpptasks.jar;%WORKSPACE%\Tools\Jars\frameworktasks.jar\r
878ddf1f 110\r
a29212b2 111call ant -f %WORKSPACE%\Tools\build.xml C_Code\r
878ddf1f 112\r
a29212b2 113@REM\r
114@REM Done!!!\r
115@REM\r
878ddf1f 116goto end\r
117\r
118:no_jdk\r
119echo.\r
02996846 120echo !!! Please install Java, and set JAVA_HOME !!!\r
121echo.\r
a29212b2 122goto end\r
02996846 123\r
124:no_ant\r
125echo.\r
126echo !!! Please install Apache Ant, and set ANT_HOME !!!\r
127echo.\r
a29212b2 128goto end\r
02996846 129\r
42b67fc4 130:no_antcontrib\r
131echo.\r
132echo !!! Please install Ant-contrib to ANT_HOME !!!\r
133echo.\r
a29212b2 134goto end\r
42b67fc4 135\r
02996846 136:no_xmlbeans\r
137echo.\r
138echo !!! Please install XML Beans, and set XMLBEANS_HOME !!!\r
878ddf1f 139echo.\r
a29212b2 140goto end\r
878ddf1f 141\r
42b67fc4 142:no_saxon8\r
143echo.\r
144echo !!! Please copy saxon8.jar file to XMLBEANS_HOME\lib !!!\r
145echo.\r
a29212b2 146goto end\r
42b67fc4 147\r
878ddf1f 148:end\r
149@echo on\r
150\r