build.xml 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project name="L2J_DataPack" default="dist" basedir=".">
  3. <description>
  4. This script will build the L2J DataPack.
  5. This program is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation; either version 3, or (at your option)
  8. any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this program; if not, write to the Free Software
  15. Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  16. 02111-1307, USA.
  17. http://www.gnu.org/copyleft/gpl.html
  18. </description>
  19. <property name="build" location="build" />
  20. <property name="build.dist" location="${build}/dist" />
  21. <property name="build.dist.doc" location="${build.dist}/doc" />
  22. <property name="build.dist.game" location="${build.dist}/game" />
  23. <property name="build.dist.login" location="${build.dist}/login" />
  24. <target name="init" depends="clean" description="Create the output directories. Do nothing if dirs were already created">
  25. <mkdir dir="${build}" />
  26. </target>
  27. <target name="dist" depends="init" description="Syncronizes build space contents with project.">
  28. <sync todir="${build.dist}" includeemptydirs="true">
  29. <fileset dir="dist" />
  30. </sync>
  31. <concat destfile="${build.dist.doc}/L2J_DataPack_CHANGELOG.txt">${l2j.changelog}</concat>
  32. <concat destfile="${build.dist.game}/config/l2jdp-version.properties">version=${l2j.version}${line.separator}builddate=${build.tstamp}</concat>
  33. <copy todir="${build.dist.game}/data">
  34. <fileset dir="misc" />
  35. </copy>
  36. <copy todir="${build.dist.login}/data">
  37. <fileset dir="misc" />
  38. </copy>
  39. <tstamp>
  40. <format property="build.date" pattern="yyyy-MM-dd" />
  41. </tstamp>
  42. <zip destfile="${build}/L2J_DataPack_${build.date}.zip" basedir="${build.dist}" />
  43. </target>
  44. <target name="clean" description="Deletes the datapack distribution ZIP file only, preserving synchronized build files.">
  45. <delete file="${build}/L2J_DataPack.zip" />
  46. </target>
  47. </project>