forked from wet-boew/wet-boew
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.cmd
36 lines (30 loc) · 971 Bytes
/
build.cmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
@ECHO Off
REM Check for JDK from http://techdem.centerkey.com/2009/05/javahome-command-script.html
set KeyName=HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Development Kit
set Cmd=reg query "%KeyName%" /s
for /f "tokens=2*" %%i in ('%Cmd% ^| find "JavaHome"') do set JAVA_HOME=%%j
REM Check if Ant is installed
IF "%ANT_HOME%" == "" (
SET ANT_HOME=c:\ant
)
IF NOT EXIST "%ANT_HOME%" (
ECHO Please ensure Ant is installed to %ANT_HOME%
ECHO Otherwise manually run "SET ANT_HOME=Where you installed Ant"
EXIT /b 1
)
REM See IF the Ant bin path has already been set
IF "%ANT_BIN%" == "" (
SET ANT_BIN=%ANT_HOME%\bin
CALL addPath.cmd ANT_BIN
IF "%ERRORLEVEL%" == "0" ECHO ANT Added to PATH
)
IF "%*" == "" (
IF "%ANT_OPTS%" == "" (
ECHO If you encounter proxy issues pass the following into the command line replacing with your network values
ECHO "-Dhttp.proxyHost=proxy -Dhttp.proxyPort=8080"
GOTO RUN_ANT
)
)
SET ANT_OPTS=%*
:RUN_ANT
ant -file build.xml