-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathbuild.xml
124 lines (112 loc) · 4.96 KB
/
build.xml
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
<?xml version="1.0" encoding="UTF-8"?>
<project name="L2J_DataPack_BETA" default="dist" basedir=".">
<description>
This script will build the L2J DataPack.
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="build" location="build" />
<property name="build.dist" location="${build}/dist" />
<property name="build.dist.game" location="${build.dist}/gameserver" />
<property name="build.dist.languages" location="${build.dist}/languages" />
<property name="build.dist.login" location="${build.dist}/login" />
<property name="build.dist.login.data" location="${build.dist}/login/data" />
<property name="build.dist.cb" location="${build.dist}/community" />
<property name="build.dist.sql" location="${build.dist}/sql" />
<property name="build.dist.cb_sql" location="${build.dist}/cb_sql" />
<property name="build.dist.tools" location="${build.dist}/tools" />
<property name="build.dist.doc" location="${build.dist}/doc" />
<property name="properties-file" location="${build.dist.game}/config/l2jdp-version.properties" />
<target name="init" description="Create the output directories. Do nothing if dirs were already created">
<mkdir dir="${build}" />
<mkdir dir="${build.dist}" />
<mkdir dir="${build.dist.cb}" />
<mkdir dir="${build.dist.cb_sql}" />
<mkdir dir="${build.dist.game}" />
<mkdir dir="${build.dist.doc}" />
<mkdir dir="${build.dist.languages}" />
<mkdir dir="${build.dist.login}" />
<mkdir dir="${build.dist.sql}" />
<mkdir dir="${build.dist.tools}" />
</target>
<target name="export" depends="version" description="Syncronizes build space contents with project.">
<sync todir="${build.dist.doc}">
<fileset dir="${basedir}">
<include name="gpl.txt" />
<include name="readme-dp.txt" />
</fileset>
</sync>
<sync todir="${build.dist.game}/data" includeemptydirs="true">
<fileset dir="${basedir}/data" />
</sync>
<sync todir="${build.dist.cb}/data">
<fileset dir="${basedir}/cb_data" />
</sync>
<sync todir="${build.dist.cb_sql}">
<fileset dir="${basedir}/cb_sql" />
</sync>
<sync todir="${build.dist.sql}">
<fileset dir="${basedir}/sql" />
</sync>
<sync todir="${build.dist.tools}">
<fileset dir="${basedir}/tools" />
</sync>
<sync todir="${build.dist.languages}">
<fileset dir="${basedir}/languages" />
</sync>
<sync todir="${build.dist.login.data}">
<fileset dir="${basedir}/logindata" />
<fileset dir="${build.dist.game}/data">
<include name="servername.xml" />
<include name="servername.xsd" />
</fileset>
</sync>
</target>
<target name="dist" depends="distclean" description="Creates a ZIP file. Suitable for distribution but building takes longer. See dist-deflate for faster builds.">
<zip destfile="${build}/L2J_DataPack_BETA.zip" basedir="${build.dist}" update="true" />
</target>
<target name="dist-deflate" depends="distclean" description="Creates a datapack ZIP file with NO compression (bigger ZIP file but faster than regular dist target)">
<zip destfile="${build}/L2J_DataPack_BETA-nocompress.zip" basedir="${build.dist}" update="true" compress="false" />
</target>
<target name="version" depends="init" description="Create l2jdp-version.properties file">
<tstamp>
<format property="build.tstamp" pattern="yyyyMMdd_HHmm" />
</tstamp>
<!--<exec dir="." executable="svnversion" outputproperty="l2jdp.revision">
<arg line="-n ." />
</exec>-->
<concat destfile="${properties-file}">
version=1337
builddate=${build.tstamp}
detailed info:
</concat>
<!--<concat destfile="${properties-file}" 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="Deletes the whole build space and existing packages.">
<delete dir="${build}" />
</target>
<target name="distclean" depends="export" description="Deletes the datapack distribution ZIP file only, preserving synchronized build files.">
<delete file="${build}/L2J_DataPack_BETA.zip" />
<delete file="${build}/L2J_DataPack_BETA-nocompress.zip" />
</target>
</project>