build.xml 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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.cb" location="${build.dist}/community" />
  22. <property name="build.dist.doc" location="${build.dist}/doc" />
  23. <property name="build.dist.game" 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" description="Create the output directories. Do nothing if dirs were already created">
  29. <mkdir dir="${build}" />
  30. <mkdir dir="${build.dist}" />
  31. <mkdir dir="${build.dist.cb}" />
  32. <mkdir dir="${build.dist.doc}" />
  33. <mkdir dir="${build.dist.game}" />
  34. <mkdir dir="${build.dist.languages}" />
  35. <mkdir dir="${build.dist.login}" />
  36. <mkdir dir="${build.dist.sql}" />
  37. <mkdir dir="${build.dist.tools}" />
  38. </target>
  39. <target name="dist" depends="distclean, version" description="Syncronizes build space contents with project.">
  40. <sync todir="${build.dist.cb}/data">
  41. <fileset dir="cb_data" />
  42. </sync>
  43. <sync todir="${build.dist.doc}">
  44. <fileset dir="doc" />
  45. </sync>
  46. <sync todir="${build.dist.game}/data" includeemptydirs="true">
  47. <fileset dir="data" />
  48. </sync>
  49. <sync todir="${build.dist.languages}">
  50. <fileset dir="languages" />
  51. </sync>
  52. <sync todir="${build.dist.login}/data">
  53. <fileset dir="logindata" />
  54. <fileset dir="data">
  55. <include name="servername.xml" />
  56. <include name="servername.xsd" />
  57. </fileset>
  58. </sync>
  59. <sync todir="${build.dist.sql}">
  60. <fileset dir="sql" />
  61. </sync>
  62. <sync todir="${build.dist.tools}">
  63. <fileset dir="tools" />
  64. </sync>
  65. <zip destfile="${build}/L2J_DataPack_BETA.zip" basedir="${build.dist}" />
  66. </target>
  67. <target name="distclean" description="Deletes the datapack distribution ZIP file only, preserving synchronized build files.">
  68. <delete file="${build}/L2J_DataPack_BETA.zip" />
  69. </target>
  70. <target name="version" depends="init" description="Create l2jdp-version.properties file">
  71. <tstamp>
  72. <format property="build.tstamp" pattern="dd/MM/yyyy HH:mm" />
  73. </tstamp>
  74. <exec dir="." executable="svnversion" outputproperty="l2jdp.revision" />
  75. <concat destfile="${build.dist.game}/config/l2jdp-version.properties">
  76. version=${l2jdp.revision}
  77. builddate=${build.tstamp}
  78. </concat>
  79. </target>
  80. </project>