forked from Cediner/ArdClient
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
319 lines (288 loc) · 12.9 KB
/
build.xml
File metadata and controls
319 lines (288 loc) · 12.9 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
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
<?xml version="1.0" ?>
<project name="hafen" default="deftgt">
<property name="name" value="ArdClient"/>
<property name="version" value="20210326"/>
<target name="build-env">
<mkdir dir="build"/>
<mkdir dir="build/lib"/>
<mkdir dir="build/classes"/>
<available property="has-res-jar" file="build/hafen-res.jar"/>
<available property="has-buildinfo" file="build/classes/buildinfo"/>
<available property="unpacked-lib" file="build/classes-lib"/>
</target>
<target name="buildinfo" depends="build-env">
<exec executable="git" outputproperty="gitrev" failifexecutionfails="false">
<arg line="rev-parse HEAD"/>
</exec>
<copy todir="build/classes">
<fileset dir="${basedir}" includes="CHANGELOG.txt"/>
</copy>
<echo file="build/classes/buildinfo">
git-rev = ${gitrev}
version = ${version}
</echo>
</target>
<target name="build-custom-res">
<delete dir="etc/res/built/" includes="**"/>
<exec executable="etc/res/hafen-layer-util.exe">
<arg value="ENCODE"/>
<arg value="etc/res/unbuilt/"/>
<arg value="etc/res/built/"/>
<arg value="etc/res/layers/hafen"/>
</exec>
</target>
<target name="hafen-client" depends="build-env">
<javac srcdir="src" destdir="build/classes" debug="on"
source="1.8" target="1.8" includeantruntime="no" encoding="UTF-8">
<classpath>
<pathelement path="lib/jogl.jar"/>
<pathelement path="lib/gluegen-rt.jar"/>
<pathelement path="lib/jglob.jar"/>
<pathelement path="lib/junit.jar"/>
<pathelement path="lib/HavenDiscord.jar"/>
<pathelement path="lib/rxjava-1.1.5.jar"/>
<pathelement path="lib/flogger-0.3.1.jar"/>
<pathelement path="lib/flogger-system-backend-0.3.1.jar"/>
<pathelement path="lib/sqlite-jdbc-3.30.1.jar"/>
<pathelement path="lib/graal-sdk.jar"/>
<pathelement path="lib/graaljs.jar"/>
<pathelement path="lib/tregex.jar"/>
<pathelement path="lib/truffle-api.jar"/>
<pathelement path="lib/abcl.jar"/>
<pathelement path="lib/luaj-jse-3.0.2.jar"/>
<pathelement path="lib/abcl-contrib.jar"/>
<pathelement path="lib/javacord-api-3.0.4.jar"/>
<pathelement path="lib/javacord-core-3.0.4.jar"/>
</classpath>
<compilerarg value="-Xlint:unchecked"/>
<compilerarg value="-Xlint:-options"/>
<!-- <compilerarg value="-Xbarda" /> -->
</javac>
<copy todir="build/classes">
<fileset dir="src" excludes="**/*.java"/>
</copy>
<copy todir="build/classes/haven" file="etc/ressrv.crt"/>
<copy todir="build/classes/haven" file="etc/authsrv.crt"/>
<copy todir="build/classes/haven" file="etc/res-preload"/>
<copy todir="build/classes/haven" file="etc/res-bgload"/>
<copy todir="build/classes/haven" file="etc/icon.png"/>
<copy todir="build" file="etc/grid_ids.txt"/>
<copy todir="build" file="CHANGELOG.txt"/>
<copy todir="build" file="lib/static.sqlite"/>
</target>
<target name="lib-classes" depends="build-env" unless="unpacked-lib">
<mkdir dir="build/classes-lib"/>
<unjar src="lib/jglob.jar" dest="build/classes-lib">
<patternset excludes="META-INF/**"/>
</unjar>
</target>
<target name="jar" depends="hafen-client,buildinfo,lib-classes">
<jar destfile="build/hafen.jar" update="true">
<fileset dir="build/classes"/>
<fileset dir="build/classes-lib"/>
<fileset file="CHANGELOG.txt"/>
<manifest>
<attribute name="Main-Class" value="haven.MainFrame"/>
<attribute name="Class-Path" value="jogl.jar gluegen-rt.jar amber-res.jar custom-res.jar builtin-res.jar hafen-res.jar l10n.jar HavenDiscord.jar rxjava-1.1.5.jar rxjava-1.1.5-javadoc.jar sqlite-jdbc-3.30.1.jar flogger-0.3.1.jar flogger-system-backend-0.3.1.jar
jackson-core.jar graal-sdk.jar graaljs.jar tregex.jar truffle-api.jar luaj-jse-3.0.2.jar abcl.jar abcl-contrib.jar javacord-api-3.0.4.jar javacord-core-3.0.4.jar"/>
</manifest>
</jar>
<chmod file="build/hafen.jar" perm="a+x"/>
</target>
<target name="res-jar" depends="build-env" unless="has-res-jar">
<get src="http://game.havenandhearth.com/java/old-builtin-res.jar" dest="lib/builtin-res.jar"
usetimestamp="true"/>
<get src="http://game.havenandhearth.com/java/old-hafen-res.jar" dest="lib/hafen-res.jar"
usetimestamp="true"/>
</target>
<target name="l10n-jar" depends="build-env">
<jar destfile="build/l10n.jar">
<fileset dir="." includes="l10n/*.properties" excludes="l10n/*_new.properties"/>
</jar>
</target>
<target name="custom-encode" depends="build-env">
<java jar="lib/LayerUtil.jar" fork="true">
<arg line="-re custom_res custom-res"/>
</java>
</target>
<target name="custom-jar" depends="custom-encode">
<mkdir dir="custom-res"/>
<copy todir="build/custom-res">
<fileset dir="custom-res"/>
</copy>
<jar basedir="build/custom-res" destfile="build/custom-res.jar"/>
<!--<delete dir="build/custom-res"/>-->
</target>
<target name="scripts" depends="build-env">
<mkdir dir="scripts"/>
<mkdir dir="etc/data"/>
<copy todir="build/scripts">
<fileset dir="scripts"/>
</copy>
<copy todir="build/data">
<fileset dir="etc/data"/>
</copy>
</target>
<target name="modification" depends="build-env">
<mkdir dir="modification"/>
<copy todir="build/modification">
<fileset dir="modification"/>
</copy>
</target>
<target name="jars" depends="build-env, jar, res-jar, l10n-jar, custom-jar, scripts, modification">
<copy todir="build">
<fileset dir="lib">
<include name="jogl.jar"/>
<include name="gluegen-rt.jar"/>
<include name="hafen-res.jar"/>
<include name="builtin-res.jar"/>
<include name="amber-res.jar"/>
<include name="HavenDiscord.jar"/>
<include name="rxjava-1.1.5.jar"/>
<include name="rxjava-1.1.5-javadoc.jar"/>
<include name="flogger-0.3.1.jar"/>
<include name="flogger-system-backend-0.3.1.jar"/>
<include name="sqlite-jdbc-3.30.1.jar"/>
<include name="graaljs.jar"/>
<include name="graal-sdk.jar"/>
<include name="jackson-core.jar"/>
<include name="tregex.jar"/>
<include name="truffle-api.jar"/>
<include name="abcl.jar"/>
<include name="luaj-jse-3.0.2.jar"/>
<include name="abcl-contrib.jar"/>
<include name="javacord-api-3.0.4.jar"/>
<include name="javacord-core-3.0.4.jar"/>
</fileset>
<fileset dir="lib/jogl-natives" includes="*.jar"/>
</copy>
</target>
<target name="clean-classes">
<delete dir="build/classes"/>
<delete dir="build/classes-lib"/>
<delete file="build/hafen.jar"/>
<delete dir="build/custom-res"/>
<delete dir="build/modification"/>
<delete dir="build/scripts"/>
<delete dir="build/data"/>
</target>
<target name="jars_clean" depends="clean-classes, jars"/>
<target name="dist" depends="rebuild">
<zip destfile="${basedir}/${name}-${version}.zip" update="false">
<fileset dir="build" includes="*.jar,grid_ids.txt" excludes="*natives*.jar"/>
<fileset dir="${basedir}" includes="README, CHANGELOG.txt"/>
<fileset dir="lib/jogl-natives" includes="*.jar"/>
<fileset dir="etc" includes="*.bat,run.sh,run.command"/>
</zip>
<zip destfile="${basedir}/${name}-${version}-upd.zip" update="false">
<fileset dir="build" includes="amber-res.jar, hafen.jar, l10n.jar, builtin-res.jar, grid_ids.txt"/>
<fileset dir="${basedir}" includes="CHANGELOG.txt"/>
</zip>
</target>
<target name="New Distribute">
<delete file="D:\GithubFolder\Ardenneslol.github.io\Hafen\amber-res.jar"/>
<delete file="D:\GithubFolder\Ardenneslol.github.io\Hafen\hafen.jar"/>
<delete file="D:\GithubFolder\Ardenneslol.github.io\Hafen\ArdClient.rar"/>
<copy todir="${basedir}">
<fileset dir="build/classes" includes="CHANGELOG.txt"/>
</copy>
<zip destfile="D:\GithubFolder\Ardenneslol.github.io\Hafen\ArdClient.rar" update="true">
<fileset dir="build" includes="*.jar,grid_ids.txt, *.bat, CHANGELOG.txt, static.sqlite"
excludes="chatlog.txt, *.log, *.dat"/>
</zip>
<copy todir="D:\GithubFolder\Ardenneslol.github.io\Hafen">
<fileset dir="build" includes="amber-res.jar, hafen.jar, l10n.jar"/>
</copy>
</target>
<target name="New Beta Distribute">
<delete file="D:\GithubFolder\Ardenneslol.github.io\Hafen-Beta\amber-res.jar"/>
<delete file="D:\GithubFolder\Ardenneslol.github.io\Hafen-Beta\hafen.jar"/>
<copy todir="${basedir}">
<fileset dir="build/classes" includes="CHANGELOG.txt"/>
</copy>
<copy todir="D:\GithubFolder\Ardenneslol.github.io\Hafen-Beta">
<fileset dir="build" includes="amber-res.jar, hafen.jar"/>
</copy>
</target>
<target name="deftgt" depends="buildinfo, jars"/>
<target name="run" depends="jars">
<echo>Run HnH</echo>
<java dir="build" jar="build/hafen.jar" args="-U https://game.havenandhearth.com/hres/ game.havenandhearth.com"
fork="true"/>
</target>
<target name="clean">
<delete dir="build"/>
</target>
<target name="rebuild" depends="clean, jars">
<copy todir="build/res">
<fileset dir="custom_res/"/>
<fileset dir="custom-res/"/>
</copy>
</target>
<target name="prep-update">
<copy todir="update/build">
<fileset dir="lib">
<include name="amber-res.jar"/>
<include name="graaljs.jar"/>
<include name="graal-sdk.jar"/>
<include name="HavenDiscord.jar"/>
<include name="jackson-core.jar"/>
<include name="rxjava-1.1.5.jar"/>
<include name="rxjava-1.1.5-javadoc.jar"/>
<include name="tregex.jar"/>
<include name="truffle-api.jar"/>
<include name="jogl.jar"/>
<include name="gluegen-rt.jar"/>
<include name="hafen-res.jar"/>
<include name="builtin-res.jar"/>
<include name="flogger-0.3.1.jar"/>
<include name="flogger-system-backend-0.3.1.jar"/>
<include name="sqlite-jdbc-3.30.1.jar"/>
<include name="bcprov-jdk15on-160.jar"/>
<include name="abcl.jar"/>
<include name="luaj-jse-3.0.2.jar"/>
<include name="abcl-contrib.jar"/>
<include name="javacord-api-3.0.4.jar"/>
<include name="javacord-core-3.0.4.jar"/>
</fileset>
<fileset dir="lib/jogl-natives"/>
<fileset dir="build">
<include name="hafen.jar"/>
<include name="custom-res.jar"/>
<include name="l10n.jar"/>
</fileset>
</copy>
<copy todir="update">
<fileset dir="build">
<include name="logging.properties"/>
<include name="static.sqlite"/>
<include name="grid_ids.txt"/>
</fileset>
<fileset dir="build/classes">
<include name="CHANGELOG.txt"/>
</fileset>
</copy>
<copy todir="update/scripts">
<fileset dir="scripts/"/>
</copy>
<copy todir="update/data">
<fileset dir="etc/data"/>
</copy>
<copy todir="update/modification">
<fileset dir="modification/"/>
</copy>
</target>
<target name="update" depends="prep-update">
<exec executable="git" outputproperty="gitrev" failifexecutionfails="false">
<arg line="rev-parse HEAD"/>
</exec>
<java jar="update/hafen-updater.jar" fork="true">
<arg value="hash"/>
<arg value="update/"/>
<arg value="${gitrev}"/>
</java>
<move file="ver" todir="update"/>
</target>
<target name="update_jars" depends="jars, update"/>
<target name="update_clean_jars" depends="jars_clean, update"/>
</project>