build.xml 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  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="yyyyMMdd_HHmm" />
  73. </tstamp>
  74. <exec dir="." executable="svnversion" outputproperty="l2jdp.revision">
  75. <arg line="-n ." />
  76. </exec>
  77. <concat destfile="${build.dist.game}/config/l2jdp-version.properties">
  78. version=${l2jdp.revision}
  79. builddate=${build.tstamp}
  80. detailed info:
  81. </concat>
  82. <concat destfile="${build.dist.game}/config/l2jdp-version.properties" append="true">
  83. <filelist dir="${src}/../.svn/" files="entries" />
  84. <filterchain>
  85. <prefixlines prefix=" " />
  86. <headfilter lines="8" skip="4" />
  87. <tokenfilter>
  88. <ignoreblank />
  89. </tokenfilter>
  90. </filterchain>
  91. </concat>
  92. </target>
  93. </project>