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