build.xml 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project name="L2J_DataPack_BETA" 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.community" location="${build.dist}/community" />
  22. <property name="build.dist.doc" location="${build.dist}/doc" />
  23. <property name="build.dist.gameserver" location="${build.dist}/gameserver" />
  24. <property name="build.dist.languages" location="${build.dist}/languages" />
  25. <property name="build.dist.login" location="${build.dist}/login" />
  26. <property name="build.dist.sql" location="${build.dist}/sql" />
  27. <property name="build.dist.tools" location="${build.dist}/tools" />
  28. <target name="init" depends="clean, getChangelogDateVersion" description="Create the output directories. Do nothing if dirs were already created">
  29. <mkdir dir="${build}" />
  30. </target>
  31. <target name="dist" depends="init" description="Syncronizes build space contents with project.">
  32. <sync todir="${build.dist.community}">
  33. <fileset dir="dist/community" />
  34. </sync>
  35. <sync todir="${build.dist.doc}">
  36. <fileset dir="dist/doc" />
  37. </sync>
  38. <concat destfile="${build.dist.doc}/L2J_DataPack_CHANGELOG.txt">${l2j.changelog}</concat>
  39. <concat destfile="${build.dist.gameserver}/config/l2jdp-version.properties">version=${l2j.version}${line.separator}builddate=${build.tstamp}</concat>
  40. <sync todir="${build.dist.gameserver}/data" includeemptydirs="true">
  41. <fileset dir="data" />
  42. </sync>
  43. <copy todir="${build.dist.gameserver}/data">
  44. <fileset dir="misc" />
  45. </copy>
  46. <sync todir="${build.dist.languages}">
  47. <fileset dir="dist/languages" />
  48. </sync>
  49. <sync todir="${build.dist.login}">
  50. <fileset dir="dist/login" />
  51. </sync>
  52. <copy todir="${build.dist.login}/data">
  53. <fileset dir="misc" />
  54. </copy>
  55. <sync todir="${build.dist.sql}">
  56. <fileset dir="dist/sql" />
  57. </sync>
  58. <sync todir="${build.dist.tools}">
  59. <fileset dir="dist/tools" />
  60. </sync>
  61. <zip destfile="${build}/L2J_DataPack_BETA.zip" basedir="${build.dist}" />
  62. </target>
  63. <target name="clean" description="Deletes the datapack distribution ZIP file only, preserving synchronized build files.">
  64. <delete file="${build}/L2J_DataPack_BETA.zip" />
  65. </target>
  66. <target name="getChangelogDateVersion" description="Get Changelog, Date, Version">
  67. <exec dir="." executable="svn" outputproperty="l2j.changelog">
  68. <arg value="log" />
  69. <arg value="--stop-on-copy" />
  70. </exec>
  71. <tstamp>
  72. <format property="build.tstamp" pattern="dd/MM/yyyy HH:mm" />
  73. </tstamp>
  74. <exec dir="." executable="svnversion" outputproperty="l2j.version" />
  75. </target>
  76. </project>