Files
i2p.itoopie/build.xml

156 lines
5.0 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." default="all" name="itoopie">
<property name="src" value="src"/>
<property name="lib" value="lib"/>
<property name="build" value="build"/>
<property name="dist" location="dist"/>
<property name="jar" value="itoopie.jar"/>
<property name="resources" value="resources"/>
<property name="javadoc" value="javadoc"/>
<property name="javac.compilerargs" value=""/>
<target name="init">
<mkdir dir="${build}"/>
<mkdir dir="${build}/${lib}"/>
<mkdir dir="${build}/${resources}"/>
<mkdir dir="${build}/${javadoc}"/>
<mkdir dir="${dist}"/>
<copy todir="${dist}/${lib}">
<fileset dir="${lib}" />
</copy>
</target>
<target name="clean">
<delete dir="${build}"/>
<delete dir="${dist}"/>
<delete file="installer.jar" failonerror="false" />
<delete file="itoopie-install.exe" failonerror="false" />
<delete file="itoopie-install.exe.sha512" failonerror="false" />
</target>
<target name="compile" depends="clean,init">
<javac
debug="true"
deprecation="on"
source="1.5"
target="1.5"
srcdir="${src}"
destdir="${build}">
<classpath>
<pathelement location="${lib}/commons-logging-1.1.1.jar" />
<pathelement location="${lib}/json-smart-1.0.6.4.jar" />
<pathelement location="${lib}/jchart2d-3.2.1.jar" />
<pathelement location="${lib}/xmlgraphics-commons-1.3.1.jar" />
</classpath>
</javac>
<copy todir="${build}/${resources}">
<fileset dir="${resources}" />
</copy>
</target>
<target name="jar" depends="compile">
<exec executable="sh" osfamily="unix" failifexecutionfails="true" >
<arg value="./bundle-messages.sh" />
</exec>
<exec executable="sh" osfamily="mac" failifexecutionfails="true" >
<arg value="./bundle-messages.sh" />
</exec>
<jar basedir="${build}" destfile="${dist}/${jar}">
<manifest>
<attribute name="Main-Class" value="net.i2p.itoopie.Main"/>
<attribute name="Class-Path" value="${lib}/commons-logging-1.1.1.jar ${lib}/json-smart-1.0.6.4.jar ${lib}/jchart2d-3.2.1.jar ${lib}/xmlgraphics-commons-1.3.1.jar" />
</manifest>
</jar>
</target>
<target name="javadoc">
<mkdir dir="${build}" />
<mkdir dir="${build}/${javadoc}" />
<javadoc
sourcepath="${src}" destdir="${build}/${javadoc}"
packagenames="*"
use="true"
splitindex="true"
windowtitle="itoopie">
<classpath>
<path refid="classpath"/>
<pathelement location="${lib}/commons-logging-1.1.1.jar" />
<pathelement location="${lib}/json-smart-1.0.6.4.jar" />
</classpath>
</javadoc>
</target>
<target name="poupdate" depends="init">
<exec executable="sh" osfamily="unix" failifexecutionfails="true" >
<arg value="./bundle-messages.sh" />
<arg value="-p" />
</exec>
<exec executable="sh" osfamily="mac" failifexecutionfails="true" >
<arg value="./bundle-messages.sh" />
<arg value="-p" />
</exec>
</target>
<target name="installer" depends="jar" >
<ant target="doAppEXE" />
<taskdef name="izpack" classpath="${basedir}/installer/lib/izpack/standalone-compiler.jar" classname="com.izforge.izpack.ant.IzPackTask" />
<izpack input="${basedir}/installer/installer.xml"
output="${basedir}/installer.jar"
installerType="standard"
basedir="${basedir}"
compression="deflate"
compressionlevel="9" />
<ant target="installerexe" />
</target>
<target name="installerexe" unless="noExe">
<!--<condition property="noExe">
<os arch="x86_64" />
</condition>
<condition property="noExe">
<os arch="amd64" />
</condition>
<condition property="noExe">
<not>
<or>
<os name="Linux" />
<os family="windows" />
</or>
</not>
</condition>-->
<ant target="doInstallerEXE" />
</target>
<target name="doInstallerEXE" unless="noExe">
<!-- now the installer exe -->
<taskdef name="launch4j"
classname="net.sf.launch4j.ant.Launch4jTask"
classpath="${basedir}/installer/lib/launch4j/launch4j.jar:${basedir}/installer/lib/launch4j/lib/xstream.jar" />
<launch4j configFile="installer/itoopieinstaller.xml" />
<checksum file="itoopie-install.exe" algorithm="SHA-512" fileext=".sha512"/>
</target>
<!-- thazzit -->
<target name="doAppEXE" unless="noExe">
<taskdef name="launch4j"
classname="net.sf.launch4j.ant.Launch4jTask"
classpath="${basedir}/installer/lib/launch4j/launch4j.jar:${basedir}/installer/lib/launch4j/lib/xstream.jar" />
<launch4j configFile="installer/itoopiestandalone.xml" />
</target>
<target name="dist" depends="jar" />
<target name="all" depends="jar" />
</project>