mirror of
https://github.com/RetGal/Dayon.git
synced 2024-10-05 02:47:55 +03:00
120 lines
4.3 KiB
XML
120 lines
4.3 KiB
XML
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
<project default="build" name="Create runnable jar for project Dayon!">
|
|
<property name="dir.binfile" value="."/>
|
|
<property name="dir.src" value="${dir.binfile}/src/main/java"/>
|
|
<property name="dir.jares" value="${dir.binfile}/src/main/resources"/>
|
|
<property name="dir.docs" value="${dir.binfile}/docs"/>
|
|
<property name="dir.lib" value="${dir.binfile}/lib"/>
|
|
<property name="dir.res" value="${dir.binfile}/resources"/>
|
|
<property name="dir.bin" value="${dir.binfile}/bin"/>
|
|
<property name="dir.build" value="${dir.binfile}/build"/>
|
|
<property name="dir.dist" value="${dir.binfile}/dist"/>
|
|
<property name="main.class" value="mpo.dayon.assisted.AssistedRunner"/>
|
|
<property name="ant.build.javac.source" value="1.8"/>
|
|
<property name="ant.build.javac.target" value="1.8"/>
|
|
<property name="version" value="1.10.3"/>
|
|
|
|
<path id="project.classpath">
|
|
<fileset dir="${dir.lib}">
|
|
<include name="*.jar"/>
|
|
</fileset>
|
|
</path>
|
|
|
|
<target name="clean">
|
|
<delete dir="${dir.bin}"/>
|
|
<delete dir="${dir.build}"/>
|
|
<delete dir="${dir.dist}"/>
|
|
</target>
|
|
|
|
<target name="init">
|
|
<tstamp/>
|
|
<mkdir dir="${dir.bin}"/>
|
|
<mkdir dir="${dir.build}"/>
|
|
<mkdir dir="${dir.dist}/bin"/>
|
|
</target>
|
|
|
|
<target name="compile" depends="init" description="Compile the sources">
|
|
<javac debug="true" includeantruntime="false" srcdir="${dir.src}" destdir="${dir.bin}" classpathref="project.classpath"/>
|
|
<copy todir="${dir.bin}">
|
|
<fileset dir="${dir.src}">
|
|
<exclude name="**/*.java"/>
|
|
</fileset>
|
|
<fileset dir="${dir.jares}"/>
|
|
</copy>
|
|
</target>
|
|
|
|
<target name="compile-assisted" depends="init" description="Compile the sources">
|
|
<javac debug="true" includeantruntime="false" srcdir="${dir.src}" destdir="${dir.bin}" classpathref="project.classpath">
|
|
<exclude name="**/assistant/" />
|
|
</javac>
|
|
<copy todir="${dir.bin}">
|
|
<fileset dir="${dir.src}">
|
|
<exclude name="**/*.java"/>
|
|
</fileset>
|
|
<fileset dir="${dir.jares}"/>
|
|
</copy>
|
|
</target>
|
|
|
|
<target name="build">
|
|
<jar destfile="${dir.build}/dayon.jar">
|
|
<zipgroupfileset dir="${dir.binfile}/lib" includes="bzip2-0.9.1.jar,grizzly-lzma-1.9.65.jar"/>
|
|
<manifest>
|
|
<attribute name="Application-Name" value="Dayon!"/>
|
|
<attribute name="Implementation-Version" value="${version}"/>
|
|
<attribute name="Main-Class" value="${main.class}"/>
|
|
<attribute name="Permissions" value="all-permissions"/>
|
|
<attribute name="Trusted-Library" value="true"/>
|
|
</manifest>
|
|
<fileset dir="${dir.bin}"/>
|
|
</jar>
|
|
</target>
|
|
|
|
<target name="dist" depends="build" description="Creates directory structure with files for distribution">
|
|
<copy file="${dir.build}/dayon.jar" todir="${dir.dist}/bin"/>
|
|
<copy todir="${dir.dist}">
|
|
<fileset dir="${dir.res}">
|
|
<exclude name="deb/"/>
|
|
<exclude name="snap/"/>
|
|
<exclude name="jre/"/>
|
|
<exclude name="license/azul_zulu_license.txt"/>
|
|
</fileset>
|
|
</copy>
|
|
<copy file="${dir.docs}/favicon.ico" todir="${dir.dist}"/>
|
|
<chmod dir="${dir.dist}/bin" perm="ugo+rx" includes="**/*"/>
|
|
<chmod dir="${dir.dist}" perm="ugo+rx" includes="**/*.sh"/>
|
|
</target>
|
|
|
|
<target name="dist_with_jre" depends="dist" description="Creates directory structure with files for distribution, including openJDK for Windows">
|
|
<copy todir="${dir.dist}">
|
|
<fileset dir="${dir.res}"/>
|
|
</copy>
|
|
<copy file="${dir.docs}/favicon.ico" todir="${dir.dist}"/>
|
|
</target>
|
|
|
|
<target name="sign" description="Signs the distribution project jar">
|
|
<signjar keystore="${dir.jares}/trust/X509" storepass="spasspass" alias="mykey" jar="${dir.dist}/bin/dayon.jar" tsaurl="http://tsa.starfieldtech.com"/>
|
|
</target>
|
|
|
|
<target name="tar" description="Creates a gzipped tar archive of the distribution for Linux">
|
|
<copy todir="${dir.dist}/tar/dayon">
|
|
<fileset dir="${dir.dist}">
|
|
<exclude name="jre/"/>
|
|
<exclude name="license/azul_zulu_license.txt"/>
|
|
</fileset>
|
|
</copy>
|
|
<tar destfile="${dir.dist}/dayon.${version}.tgz" longfile="gnu" compression="gzip">
|
|
<tarfileset dir="${dir.dist}/tar">
|
|
<include name="**/*"/>
|
|
<exclude name="**/*.sh"/>
|
|
<exclude name="**/bin/*"/>
|
|
<exclude name="**/favicon.ico"/>
|
|
</tarfileset>
|
|
<tarfileset dir="${dir.dist}/tar" filemode="755">
|
|
<include name="**/*.sh"/>
|
|
<include name="**/bin/*"/>
|
|
</tarfileset>
|
|
</tar>
|
|
<delete dir="${dir.dist}/tar"/>
|
|
</target>
|
|
</project>
|