Advertisement
Guest User

Untitled

a guest
Oct 16th, 2019
351
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 6.00 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE xml>
  3. <project name="L2J_Mobius_6.0_Fafurion" default="cleanup" basedir=".">
  4.     <description>
  5.         This file is part of the L2J Mobius project.
  6.        
  7.         This program is free software: you can redistribute it and/or modify
  8.         it under the terms of the GNU General Public License as published by
  9.         the Free Software Foundation, either version 3 of the License, or
  10.         (at your option) any later version.
  11.        
  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 GNU
  15.         General Public License for more details.
  16.        
  17.         You should have received a copy of the GNU General Public License
  18.         along with this program. If not, see [http://www.gnu.org/licenses/].
  19.     </description>
  20.  
  21.     <property name="build" location="compiled" />
  22.     <property name="build.bin" location="${build}/bin" />
  23.     <property name="build.dist" location="${build}/dist" />
  24.     <property name="build.dist.libs" location="${build.dist}/libs" />
  25.     <property name="build.dist.dbinstaller" location="${build.dist}/db_installer" />
  26.     <property name="datapack" location="dist" />
  27.     <property name="libs" location="${datapack}/libs" />
  28.     <property name="src" location="java" />
  29.  
  30.     <path id="classpath">
  31.         <fileset dir="${libs}">
  32.             <include name="*.jar" />
  33.         </fileset>
  34.     </path>
  35.  
  36.     <pathconvert property="manifest.libs" pathsep=" ">
  37.         <path refid="classpath" />
  38.         <mapper>
  39.             <chainedmapper>
  40.                 <flattenmapper />
  41.                 <globmapper from="*.jar" to="../libs/*.jar" />
  42.             </chainedmapper>
  43.         </mapper>
  44.     </pathconvert>
  45.  
  46.     <target name="checkRequirements" description="Check Requirements.">
  47.         <fail message="Ant 1.8.2 is required. But your version is ${ant.version} and if you are using Eclipse probably is outdated.">
  48.             <condition>
  49.                 <not>
  50.                     <antversion atleast="1.8.2" />
  51.                 </not>
  52.             </condition>
  53.         </fail>
  54.         <available classname="java.util.stream.Stream" property="JDK12.present" />
  55.         <fail unless="JDK12.present" message="Java 12 is required. But your version is Java ${ant.java.version} and probably JDK is not installed." />
  56.     </target>
  57.  
  58.     <target name="init" depends="checkRequirements" description="Create the output directories.">
  59.         <mkdir dir="${build.bin}" />
  60.     </target>
  61.  
  62.     <target name="compile" depends="init" description="Compile the source.">
  63.         <javac srcdir="${src}" classpathref="classpath" destdir="${build.bin}" compiler="modern" debug="true" debuglevel="lines,vars,source" includeantruntime="false" source="12" target="12" encoding="UTF-8" />
  64.     </target>
  65.  
  66.     <target name="jar" depends="compile" description="Create the jar files.">
  67.         <tstamp>
  68.             <format property="time.stamp" pattern="yyyy-MM-dd HH:mm:ss" />
  69.         </tstamp>
  70.  
  71.         <jar destfile="${build.dist.libs}/LoginServer.jar" level="9">
  72.             <fileset dir="${build.bin}">
  73.                 <exclude name="**/dbinstaller/**" />
  74.                 <exclude name="**/gameserver/**" />
  75.                 <exclude name="**/geodataconverter/**" />
  76.             </fileset>
  77.             <manifest>
  78.                 <attribute name="Build-By" value="${user.name}" />
  79.                 <attribute name="Build-Date" value="${time.stamp}" />
  80.                 <attribute name="Implementation-URL" value="http://www.l2jmobius.org/" />
  81.                 <attribute name="Class-Path" value="${manifest.libs}" />
  82.                 <attribute name="Main-Class" value="org.l2jmobius.loginserver.LoginServer" />
  83.             </manifest>
  84.         </jar>
  85.         <jar destfile="${build.dist.libs}/GameServer.jar" level="9">
  86.             <fileset dir="${build.bin}">
  87.                 <exclude name="**/dbinstaller/**" />
  88.                 <exclude name="**/loginserver/**" />
  89.                 <exclude name="**/accountmanager/**" />
  90.                 <exclude name="**/gsregistering/**" />
  91.             </fileset>
  92.             <manifest>
  93.                 <attribute name="Build-By" value="${user.name}" />
  94.                 <attribute name="Build-Date" value="${time.stamp}" />
  95.                 <attribute name="Implementation-URL" value="http://www.l2jmobius.org/" />
  96.                 <attribute name="Class-Path" value="${manifest.libs}" />
  97.                 <attribute name="Main-Class" value="org.l2jmobius.gameserver.GameServer" />
  98.             </manifest>
  99.         </jar>
  100.         <jar destfile="${build.dist.dbinstaller}/Database_Installer_GS.jar" level="9">
  101.             <fileset dir="${build.bin}">
  102.                 <include name="**/dbinstaller/**" />
  103.                 <include name="**/util/**" />
  104.                 <include name="**/SQLFilter**" />
  105.                 <exclude name="**/LauncherLS*" />
  106.             </fileset>
  107.             <manifest>
  108.                 <attribute name="Build-By" value="${user.name}" />
  109.                 <attribute name="Build-Date" value="${time.stamp}" />
  110.                 <attribute name="Class-Path" value="${manifest.libs}" />
  111.                 <attribute name="Implementation-URL" value="http://www.l2jmobius.org/" />
  112.                 <attribute name="Main-Class" value="org.l2jmobius.tools.dbinstaller.LauncherGS" />
  113.             </manifest>
  114.         </jar>
  115.         <jar destfile="${build.dist.dbinstaller}/Database_Installer_LS.jar" level="9">
  116.             <fileset dir="${build.bin}">
  117.                 <include name="**/dbinstaller/**" />
  118.                 <include name="**/util/**" />
  119.                 <include name="**/SQLFilter**" />
  120.                 <exclude name="**/LauncherGS*" />
  121.             </fileset>
  122.             <manifest>
  123.                 <attribute name="Build-By" value="${user.name}" />
  124.                 <attribute name="Build-Date" value="${time.stamp}" />
  125.                 <attribute name="Class-Path" value="${manifest.libs}" />
  126.                 <attribute name="Implementation-URL" value="http://www.l2jmobius.org/" />
  127.                 <attribute name="Main-Class" value="org.l2jmobius.tools.dbinstaller.LauncherLS" />
  128.             </manifest>
  129.         </jar>
  130.     </target>
  131.  
  132.     <target name="core" depends="jar" description="Adding the compiled jars to the compiled folder.">
  133.         <move todir="${build}">
  134.             <fileset dir="${build.dist}"/>
  135.         </move>
  136.     </target>
  137.  
  138.     <target name="datapack" description="Updating the compiled folder with datapack content.">
  139.         <copy todir="${build}">
  140.             <fileset dir="${datapack}"/>
  141.         </copy>
  142.     </target>
  143.  
  144.     <target name="readme" description="Adding readme.txt to the compiled folder.">
  145.         <copy file="readme.txt" todir="${build}"/>
  146.     </target>
  147.  
  148.     <target name="cleanup" description="Cleaning the compiled folder.">
  149.         <delete dir="${build.bin}" quiet="true" />
  150.         <delete dir="${build.dist}" quiet="true" />
  151.     </target>
  152. </project>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement