build.xml 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project name="L2J_DataPack_BETA" default="build" 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="checkRequirements,getChangelogDateVersion" description="Create the output directories.">
  25. <mkdir dir="${build}" />
  26. </target>
  27. <target name="dist" depends="init" description="Export the files to the output directory.">
  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. </target>
  34. <target name="build" depends="dist">
  35. <zip destfile="${build}/L2J_DataPack_BETA.zip" basedir="${build.dist}" level="9" />
  36. </target>
  37. <target name="checkRequirements" description="Check Requirements.">
  38. <fail message="Ant 1.8.2 is required. But your version is ${ant.version} and if you are using Eclipse probably is outdated.">
  39. <condition>
  40. <not>
  41. <antversion atleast="1.8.2" />
  42. </not>
  43. </condition>
  44. </fail>
  45. </target>
  46. <target name="getChangelogDateVersion" description="Get Changelog, Date, Version.">
  47. <exec dir="${basedir}" executable="svn" outputproperty="l2j.changelog">
  48. <arg value="log" />
  49. <arg value="--stop-on-copy" />
  50. </exec>
  51. <tstamp>
  52. <format property="build.tstamp" pattern="dd/MM/yyyy HH:mm" />
  53. </tstamp>
  54. <exec dir="${basedir}" executable="svnversion" outputproperty="l2j.version" />
  55. </target>
  56. </project>