3
if exist "%HOME%\antrc_pre.bat" call "%HOME%\antrc_pre.bat"
5
if not "%OS%"=="Windows_NT" goto win9xStart
9
rem %~dp0 is name of current script under NT
10
set DEFAULT_ANT_HOME=%~dp0
12
rem : operator works similar to make : operator
13
set DEFAULT_ANT_HOME=%DEFAULT_ANT_HOME%\..
15
if "%ANT_HOME%"=="" set ANT_HOME=%DEFAULT_ANT_HOME%
18
rem Need to check if we are using the 4NT shell...
19
if "%eval[2+2]" == "4" goto setup4NT
21
rem On NT/2K grab all arguments at once
22
set ANT_CMD_LINE_ARGS=%*
26
set ANT_CMD_LINE_ARGS=%$
30
rem Slurp the command line arguments. This loop allows for an unlimited number of
31
rem agruments (up to the command line limit, anyway).
33
set ANT_CMD_LINE_ARGS=
36
if %1a==a goto doneStart
37
set ANT_CMD_LINE_ARGS=%ANT_CMD_LINE_ARGS% %1
42
rem This label provides a place for the argument list loop to break out
43
rem and for NT handling to skip to.
46
if not "%ANT_HOME%"=="" goto checkJava
48
rem check for ant in Program Files on system drive
49
if not exist "%SystemDrive%\Program Files\ant" goto checkSystemDrive
50
set ANT_HOME=%SystemDrive%\Program Files\ant
54
rem check for ant in root directory of system drive
55
if not exist %SystemDrive%\ant\nul goto checkCDrive
56
set ANT_HOME=%SystemDrive%\ant
60
rem check for ant in C:\ant for Win9X users
61
if not exist C:\ant\nul goto noAntHome
66
echo ANT_HOME is not set and ant could not be located. Please set ANT_HOME.
70
set _JAVACMD=%JAVACMD%
71
set LOCALCLASSPATH=%CLASSPATH%
72
for %%i in ("%ANT_HOME%\lib\*.jar") do call "%ANT_HOME%\bin\lcp.bat" %%i
74
if "%JAVA_HOME%" == "" goto noJavaHome
75
if "%_JAVACMD%" == "" set _JAVACMD=%JAVA_HOME%\bin\java
76
if exist "%JAVA_HOME%\lib\tools.jar" call "%ANT_HOME%\bin\lcp.bat" %JAVA_HOME%\lib\tools.jar
77
if exist "%JAVA_HOME%\lib\classes.zip" call "%ANT_HOME%\bin\lcp.bat" %JAVA_HOME%\lib\classes.zip
81
if "%_JAVACMD%" == "" set _JAVACMD=java
83
echo Warning: JAVA_HOME environment variable is not set.
84
echo If build fails because sun.* classes could not be found
85
echo you will need to set the JAVA_HOME environment variable
86
echo to the installation directory of java.
90
if not "%JIKESPATH%" == "" goto runAntWithJikes
93
"%_JAVACMD%" -classpath "%LOCALCLASSPATH%" -Dant.home="%ANT_HOME%" %ANT_OPTS% org.apache.tools.ant.Main %ANT_CMD_LINE_ARGS%
97
"%_JAVACMD%" -classpath "%LOCALCLASSPATH%" -Dant.home="%ANT_HOME%" -Djikes.class.path="%JIKESPATH%" %ANT_OPTS% org.apache.tools.ant.Main %ANT_CMD_LINE_ARGS%
102
set ANT_CMD_LINE_ARGS=
104
if not "%OS%"=="Windows_NT" goto mainEnd
109
if exist "%HOME%\antrc_post.bat" call "%HOME%\antrc_post.bat"