build.xml 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  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. $Author: DrLecter $
  6. $Date: 2007-04-18 14:49:44 -0300 (we, 18 apr 2007) $
  7. $Revision: 2928 $
  8. This program is free software; you can redistribute it and/or modify
  9. it under the terms of the GNU General Public License as published by
  10. the Free Software Foundation; either version 2, or (at your option)
  11. any later version.
  12. This program is distributed in the hope that it will be useful,
  13. but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. GNU General Public License for more details.
  16. You should have received a copy of the GNU General Public License
  17. along with this program; if not, write to the Free Software
  18. Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  19. 02111-1307, USA.
  20. http://www.gnu.org/copyleft/gpl.html
  21. </description>
  22. <property name="build" location="build"/>
  23. <property name="build.dist" location="${build}/dist"/>
  24. <property name="build.dist.game" location="${build.dist}/gameserver"/>
  25. <property name="build.dist.login" location="${build.dist}/login"/>
  26. <property name="properties-file" location="${build.dist.game}/config/l2jdp-version.properties"/>
  27. <target name="init"
  28. depends="clean"
  29. description="Create the output directories.">
  30. <mkdir dir="${build}"/>
  31. <mkdir dir="${build.dist}"/>
  32. <mkdir dir="${build.dist.game}"/>
  33. <mkdir dir="${build.dist.login}" />
  34. </target>
  35. <target name="dist"
  36. depends="version">
  37. <copy todir="${build.dist.game}">
  38. <fileset dir="${basedir}">
  39. <exclude name=".project"/>
  40. <exclude name="build.xml"/>
  41. <exclude name="build/**"/>
  42. <exclude name="log/**"/>
  43. <exclude name="data/clans/**"/>
  44. <exclude name="data/crests/**"/>
  45. <exclude name="**.svn**"/>
  46. <exclude name="**/*.class"/>
  47. <exclude name="sql/**"/>
  48. <exclude name="tools/**"/>
  49. <exclude name="geodata/**"/>
  50. <exclude name="pathnode/**"/>
  51. <include name="**/*.*"/>
  52. </fileset>
  53. </copy>
  54. <copy todir="${build.dist}">
  55. <fileset dir="${basedir}">
  56. <exclude name=".project"/>
  57. <exclude name="build.xml"/>
  58. <exclude name="config/**"/>
  59. <exclude name="build/**"/>
  60. <exclude name="log/**"/>
  61. <exclude name="data/clans/**"/>
  62. <exclude name="data/**"/>
  63. <exclude name="data/crests/**"/>
  64. <exclude name="**.svn**"/>
  65. <exclude name="**/*.class"/>
  66. <exclude name="geodata/**"/>
  67. <exclude name="pathnode/**"/>
  68. <include name="sql/*.*"/>
  69. <include name="sql/experimental/*.*"/>
  70. <include name="sql/updates/*.*"/>
  71. <include name="tools/*.*"/>
  72. </fileset>
  73. </copy>
  74. <copy todir="${build.dist.login}">
  75. <fileset dir="${build.dist.game}/data">
  76. <include name="servername.xml"/>
  77. </fileset>
  78. </copy>
  79. <delete file="${build}/L2J_DataPack.zip"/>
  80. <zip destfile="${build}/L2J_DataPack.zip" basedir="${build.dist}"/>
  81. </target>
  82. <target name="version"
  83. depends="init"
  84. description="Create l2jdp-version.properties file">
  85. <tstamp>
  86. <format property="build.tstamp" pattern="yyyyMMdd_HHmm"/>
  87. </tstamp>
  88. <exec dir="." executable="svnversion" outputproperty="l2jdp.revision"
  89. failifexecutionfails="false">
  90. <arg line="-n ."/>
  91. </exec>
  92. <concat destfile="${properties-file}">
  93. version=${l2jdp.revision}
  94. builddate=${build.tstamp}
  95. detailed info:
  96. </concat>
  97. <concat destfile="${properties-file}" append="true">
  98. <filelist dir="${src}/../.svn/" files="entries"/>
  99. <filterchain>
  100. <prefixlines prefix=" "/>
  101. <headfilter lines="8" skip="4"/>
  102. <tokenfilter>
  103. <ignoreblank/>
  104. </tokenfilter>
  105. </filterchain>
  106. </concat>
  107. </target>
  108. <target name="clean"
  109. description="Deletes the zip file">
  110. <delete dir="${build}"/>
  111. </target>
  112. </project>