123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224 |
- <?xml version="1.0" encoding="UTF-8"?>
- <project name="L2J_Server" default="dist" basedir=".">
- <description>
- This script will build the L2J 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" 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="c3p0-0.9.1.2.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" />
- </fileset>
- </path>
- <target name="verifyRequirements" description="Checks if the necessary requirements for building L2J 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.6" target="1.6" 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" />
- <include name="LICENSE.txt" />
- <include name="README.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="LoginServer_loop.sh" />
- <include name="startLoginServer.*" />
- <include name="RegisterGameServer.*" />
- <include name="GSRegister.exe" />
- <include name="L2JConfig.exe" />
- <include name="L2JConfig.sh" />
- </fileset>
- </copy>
- <copy todir="${build.dist.game}">
- <fileset dir="dist">
- <include name="GameServer_loop.sh" />
- <include name="startGameServer.*" />
- <include name="L2JConfig.exe" />
- <include name="L2JConfig.sh" />
- <include name="hibernate.cfg.xml" />
- </fileset>
- </copy>
- <fixcrlf srcdir="${build.dist.game}" eol="lf" eof="remove" includes="**/*.sh" />
- <fixcrlf srcdir="${build.dist.login}" eol="lf" eof="remove" includes="**/*.sh" />
- <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.game}/config" />
- <mkdir dir="${build.dist.login}/config" />
- <copy todir="${build.dist.game}/config">
- <fileset dir="java/config">
- <include name="*.properties" />
- <include name="chatfilter.txt" />
- <exclude name="loginserver.properties" />
- </fileset>
- </copy>
- <copy todir="${build.dist.login}/config">
- <fileset dir="java/config">
- <include name="loginserver.properties" />
- <include name="mmo.properties" />
- <include name="telnet.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}/L2J_Server.zip" basedir="${build.dist}" />
- </target>
- <target name="version" depends="init" description="Create l2j-version.properties file">
- <tstamp>
- <format property="build.tstamp" pattern="yyyyMMdd_HHmm" />
- </tstamp>
- <exec dir="." executable="svnversion" outputproperty="l2j.revision" failifexecutionfails="false">
- <arg line="-n ." />
- </exec>
- <concat destfile="${build.dist.game}/config/l2j-version.properties">
- version=${l2j.revision}
- builddate=${build.tstamp}
- detailed info:
- </concat>
- <concat destfile="${build.dist.game}/config/l2j-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>
|