-
Notifications
You must be signed in to change notification settings - Fork 30
Expand file tree
/
Copy pathbuild.xml
More file actions
93 lines (77 loc) · 3.19 KB
/
build.xml
File metadata and controls
93 lines (77 loc) · 3.19 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<?xml version="1.0" encoding="UTF-8"?>
<project name="L1J-TW" default="dist" basedir=".">
<description>
This script will build the L1J-TW Server.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
http://www.gnu.org/copyleft/gpl.html
</description>
<property name="src" value="src" />
<property name="lib" value="lib" />
<property name="build" value="build" />
<path id="classpath">
<fileset dir="${lib}">
<include name="**/*.jar" />
</fileset>
</path>
<target name="verifyRequirements" description="Checks if the necessary requirements for building L1J-TW are fulfilled">
<available classname="javax.script.ScriptContext" property="JDK6.present" />
<fail unless="JDK6.present" message="JDK 6 or greater is required." />
</target>
<target name="init" depends="clean, verifyRequirements" description="Create the output directories.">
<mkdir dir="${build}" />
</target>
<target name="compile" depends="version" description="Compile the source.">
<javac destdir="${build}" includeantruntime="on" optimize="on" debug="on" source="1.6" target="1.6" nowarn="off" encoding="UTF-8">
<src path="${src}" />
<classpath refid="classpath" />
</javac>
</target>
<target name="jar" depends="compile" description="Create the jar file">
<jar basedir="${build}" jarfile="l1jserver.jar" />
</target>
<target name="dist" depends="jar">
<delete dir="${build}" />
</target>
<target name="version" depends="init" description="Create version.properties file">
<tstamp>
<format property="build.tstamp" pattern="yyyy/MM/dd HH:mm" />
</tstamp>
<exec dir="./tool/subversion/" executable="svnversion" outputproperty="l1j-tw.revision" failifexecutionfails="false">
<arg line="-n ./../../" />
</exec>
<concat destfile="./config/version.properties">#-------------------------------------------------------------
# 版本配置
#-------------------------------------------------------------
#伺服器核心版本
ServerCoreVersion = ${l1j-tw.revision}
#伺服器建置日期
ServerBuildDate = ${build.tstamp}
#最後更新訊息
LatestInfo =
</concat>
<concat destfile="./config/version.properties" append="true">
<filelist dir="${src}/../_svn/" files="entries" />
<filelist dir="${src}/../.svn/" files="entries" />
<filterchain>
<headfilter lines="6" skip="6" />
<tokenfilter>
<ignoreblank />
</tokenfilter>
</filterchain>
</concat>
</target>
<target name="clean" description="Remove the output directories">
<delete dir="${build}" />
</target>
</project>