forked from ChaosPaladin/L2T_Server
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
215 lines (206 loc) · 8.75 KB
/
Copy pathbuild.xml
File metadata and controls
215 lines (206 loc) · 8.75 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
<?xml version="1.0" encoding="UTF-8"?>
<project name="L2Tenkai_Server" default="dist" basedir=".">
<description>
This script will build the L2Tenkai Server.
</description>
<property name="src" location="java" />
<property name="lib" location="lib" />
<property name="build" location="build" />
<property name="build.classes" location="${build}/classes" />
<property name="build.dist" location="${build}/dist" />
<property name="build.dist.login" location="${build.dist}/login" />
<property name="build.dist.game" location="${build.dist}/gameserver" />
<property name="build.dist.libs" location="${build.dist}/libs" />
<property name="build.dist.languages" location="${build.dist}/languages" />
<property name="build.dist.images" location="${build.dist}/images" />
<property name="build.dist.doc" location="${build.dist}/doc" />
<path id="classpath">
<fileset dir="${lib}">
<include name="bonecp-0.7.0.jar" />
<include name="slf4j-api-1.6.1.jar" />
<include name="slf4j-simple-1.6.1.jar" />
<include name="guava-r08.jar" />
<include name="jython.jar" />
<include name="jython-engine.jar" />
<include name="javolution-5.5.1.jar" />
<include name="mmocore.jar" />
<include name="trove-2.1.0.jar" />
<include name="netcon.jar" />
<include name="mail.jar" />
<include name="mailapi.jar" />
<include name="smtp.jar" />
<include name="jogl.jar" />
<include name="worldwind.jar" />
<include name="mail.jar" />
<include name="mailapi.jar" />
</fileset>
</path>
<target name="verifyRequirements"
description="Checks if the necessary requirements for building L2Tenkai 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}" />
<mkdir dir="${build.classes}" />
<mkdir dir="${build.dist}" />
<mkdir dir="${build.dist.login}" />
<mkdir dir="${build.dist.game}" />
</target>
<target name="compile" depends="version" description="Compile the source.">
<javac destdir="${build.classes}" optimize="on" debug="on" source="1.7" target="1.7" nowarn="off">
<src path="${src}" />
<classpath refid="classpath" />
</javac>
</target>
<target name="jar" depends="compile" description="Create the jar file">
<jar destfile="${build}/l2jserver.jar">
<fileset dir="${build.classes}">
<exclude name="**/loginserver/**" />
<exclude name="**/accountmanager/**" />
<exclude name="**/gsregistering/**" />
</fileset>
</jar>
<jar destfile="${build}/l2jlogin.jar">
<fileset dir="${build.classes}">
<exclude name="**/gameserver/**" />
</fileset>
</jar>
<copy todir="${build.dist.login}">
<fileset dir="${build}">
<include name="l2jlogin.jar" />
</fileset>
</copy>
<copy todir="${build.dist.game}">
<fileset dir="${build}">
<include name="l2jserver.jar" />
</fileset>
</copy>
</target>
<target name="dist" depends="jar">
<copy todir="${build.dist.login}">
<fileset dir="${src}">
<include name="log.cfg" />
<include name="banned_ip.cfg" />
<include name="console.cfg" />
</fileset>
</copy>
<copy todir="${build.dist.game}">
<fileset dir="${src}">
<include name="log.cfg" />
<include name="console.cfg" />
</fileset>
</copy>
<copy todir="${build.dist.libs}">
<fileset dir="${src}/../lib">
<include name="*.jar" />
</fileset>
</copy>
<copy todir="${build.dist.languages}">
<fileset dir="${src}/../languages" />
</copy>
<copy todir="${build.dist.images}">
<fileset dir="${src}/../images" />
</copy>
<copy todir="${build.dist.doc}">
<fileset dir="${basedir}">
<include name="changes.txt" />
</fileset>
</copy>
<copy todir="${build.dist.doc}">
<fileset dir="${src}/../lib">
<include name="*LICENSE*" />
</fileset>
</copy>
<copy todir="${build.dist.login}">
<fileset dir="dist">
<include name="startAccountManager.*" />
<include name="startSQLAccountManager.*" />
<include name="startLoginServer.*" />
<include name="RegisterGameServer.*" />
<include name="GSRegister.exe" />
<include name="L2JConfig.exe" />
</fileset>
</copy>
<copy todir="${build.dist.game}">
<fileset dir="dist">
<include name="startGameServer.*" />
<include name="L2JConfig.exe" />
<include name="hibernate.cfg.xml" />
</fileset>
</copy>
<fixcrlf srcdir="${build.dist.game}" eol="crlf" eof="remove" includes="**/*.bat" />
<fixcrlf srcdir="${build.dist.login}" eol="crlf" eof="remove" includes="**/*.bat" />
<mkdir dir="${build.dist.game}/log" />
<mkdir dir="${build.dist.login}/log" />
<mkdir dir="${build.dist.login}/config" />
<mkdir dir="${build.dist.game}/config" />
<copy todir="${build.dist.login}/config">
<fileset dir="java/config">
<include name="email.properties" />
<include name="loginserver.properties" />
<include name="mmo.properties" />
<include name="telnet.properties" />
<include name="email.properties" />
</fileset>
</copy>
<copy todir="${build.dist.game}/config">
<fileset dir="java/config">
<include name="*.properties" />
<include name="chatfilter.txt" />
<include name="languagefilter.txt" />
<include name="ipconfig.xml" />
<exclude name="loginserver.properties" />
<exclude name="email.properties" />
</fileset>
</copy>
<mkdir dir="${build.dist.game}/data" />
<copy todir="${build.dist.game}/data">
<fileset dir="data">
<include name="*.csv" />
<include name="*.txt" />
</fileset>
</copy>
<mkdir dir="${build.dist.game}/data/geodata" />
<copy todir="${build.dist.game}/data/geodata">
<fileset dir="data/geodata">
<include name="*.txt" />
<include name="*.l2j" />
</fileset>
</copy>
<mkdir dir="${build.dist.game}/data/pathnode" />
<copy todir="${build.dist.game}/data/pathnode">
<fileset dir="data/pathnode">
<include name="*.txt" />
<include name="*.pn" />
</fileset>
</copy>
<zip destfile="${build}/L2Tenkai_Server.zip" basedir="${build.dist}" />
</target>
<target name="version" depends="init" description="Create l2tenkai-version.properties file">
<tstamp>
<format property="build.tstamp" pattern="yyyyMMdd_HHmm" />
</tstamp>
<exec dir="." executable="svnversion" outputproperty="l2tenkai.revision" failifexecutionfails="false">
<arg line="-n ." />
</exec>
<concat destfile="${build.dist.game}/config/l2tenkai-version.properties">
version=${l2tenkai.revision}
builddate=${build.tstamp}
detailed info:
</concat>
<concat destfile="${build.dist.game}/config/l2tenkai-version.properties" append="true">
<filelist dir="${src}/../.svn/" files="entries" />
<filterchain>
<prefixlines prefix=" " />
<headfilter lines="8" skip="4" />
<tokenfilter>
<ignoreblank />
</tokenfilter>
</filterchain>
</concat>
</target>
<target name="clean" description="Remove the output directories">
<delete dir="${build}" />
</target>
</project>