123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147 |
- <?xml version="1.0" encoding="UTF-8"?>
- <project name="L2J_Datapack" default="dist" basedir=".">
- <description>
- This script will build the L2J_Datapack.
-
- $Author: DrLecter $
- $Date: 2007-11-19 16:57:12 -0300 (mo, 19 nov 2007) $
- $Revision: 3627 $
-
- 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 2, 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.login" location="${build.dist}/login"/>
- <property name="build.dist.sql" location="${build.dist}/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.game}"/>
- <mkdir dir="${build.dist.doc}" />
- <mkdir dir="${build.dist.login}" />
- </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">
- <fileset dir="${basedir}/data">
- <exclude name=".project"/>
- <exclude name="log/**"/>
- <exclude name="cachedir/**"/>
- <exclude name="clans/**"/>
- <exclude name="crests/**"/>
- <exclude name="**.svn**"/>
- <exclude name="**/*.class"/>
- <exclude name="**/*.jar"/>
- <exclude name="geodata/**"/>
- <exclude name="pathnode/**"/>
- <include name="**/*.*"/>
- </fileset>
- </sync>
- <sync todir="${build.dist.sql}">
- <fileset dir="${basedir}/sql">
- <include name="*.*"/>
- <include name="experimental/*.*"/>
- <include name="custom/*.*"/>
- <include name="maintenance/*.*"/>
- <include name="mods/*.*"/>
- <include name="updates/*.*"/>
- </fileset>
- </sync>
- <sync todir="${build.dist.tools}">
- <fileset dir="${basedir}/tools">
- <include name="*.*"/>
- <exclude name="database_installer.rc"/>
- <exclude name="*.txt"/>
- <exclude name="*.log"/>
- <exclude name="*backup.sql"/>
- </fileset>
- </sync>
- <sync todir="${build.dist.login}">
- <fileset dir="${build.dist.game}/data">
- <include name="servername.xml"/>
- </fileset>
- </sync>
- </target>
- <target name="dist"
- depends="export"
- description="Creates a ZIP file. Suitable for distribution but building takes longer. See dist-deflate for faster builds.">
- <zip destfile="${build}/L2J_DataPack.zip" basedir="${build.dist}" update="true"/>
- </target>
- <target name="dist-deflate"
- depends="export"
- description="Creates a datapack ZIP file with NO compression (bigger ZIP file but faster than regular dist target)">
- <zip destfile="${build}/L2J_DataPack-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"
- failifexecutionfails="false">
- <arg line="-n ."/>
- </exec>
- <concat destfile="${properties-file}">
- version=${l2jdp.revision}
- 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"
- description="Deletes the datapack distribution ZIP file only, preserving synchronized build files.">
- <delete file="${build}/L2J_DataPack.zip"/>
- <delete file="${build}/L2J_DataPack-nocompress.zip"/>
- </target>
- </project>
|