Get rid of workspace. Point to MS compiler for Host compiles.
[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
53cef58a 73@REM It needs the xmlbeans libaries in order to compile.\r
74set CLASSPATH=%XMLBEANS_HOME%\lib\jsr173_1.0_api.jar;%XMLBEANS_HOME%\lib\xbean.jar\r
75set CLASSPATH=%CLASSPATH%;%XMLBEANS_HOME%\lib\xbean_xpath.jar;%XMLBEANS_HOME%\lib\xmlpublic.jar\r
76set CLASSPATH=%CLASSPATH%;%XMLBEANS_HOME%\lib\saxon8.jar;%XMLBEANS_HOME%\lib\resolver.jar\r
878ddf1f 77\r
78call ant -f %WORKSPACE%Tools\build.xml SurfaceArea\r
79\r
80@REM Now we can make the other Java Programs\r
53cef58a 81@REM All of the remaining Java Programs require the SurfaceArea library to compile\r
82set CLASSPATH=%CLASSPATH%;%WORKSPACE%Tools\Jars\SurfaceArea.jar\r
878ddf1f 83\r
84call ant -f %WORKSPACE%Tools\build.xml JavaCode\r
85\r
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\r
53cef58a 87set CLASSPATH=%CLASSPATH%;%WORKSPACE%Tools\Jars\SurfaceArea.jar;%WORKSPACE%Tools\Jars\GenBuild.jar\r
88set CLASSPATH=%CLASSPATH%;%WORKSPACE%Tools\Jars\cpptasks.jar;%WORKSPACE%Tools\Jars\frameworktasks.jar\r
878ddf1f 89\r
90call ant -f %WORKSPACE%Tools\build.xml C_Code\r
91\r
92goto end\r
93\r
94:no_jdk\r
95echo.\r
02996846 96echo !!! Please install Java, and set JAVA_HOME !!!\r
97echo.\r
98goto end \r
99\r
100:no_ant\r
101echo.\r
102echo !!! Please install Apache Ant, and set ANT_HOME !!!\r
103echo.\r
104goto end \r
105\r
42b67fc4 106:no_antcontrib\r
107echo.\r
108echo !!! Please install Ant-contrib to ANT_HOME !!!\r
109echo.\r
110goto end \r
111\r
02996846 112:no_xmlbeans\r
113echo.\r
114echo !!! Please install XML Beans, and set XMLBEANS_HOME !!!\r
878ddf1f 115echo.\r
116goto end \r
117\r
42b67fc4 118:no_saxon8\r
119echo.\r
120echo !!! Please copy saxon8.jar file to XMLBEANS_HOME\lib !!!\r
121echo.\r
122goto end \r
123\r
878ddf1f 124:end\r
125@echo on\r
126\r