Files
i2p.itoopie/build.xml
jrandom d89f589f2b 2005-09-16 jrandom
* Added the i2p.exe and i2pinstall.exe for windows users, using launch4j.
    * Added runplain.sh for *nix/osx users having problems using the java
      service wrapper (called from the install dir as: sh runplain.sh)
    * Bundle susidns and syndie, with links on the top nav
    * Have I2PTunnelHTTPClient and I2PTunnelHTTPServer use the x-i2p-gzip
      content-encoding (if offered), reducing the payload size before it
      reaches the streaming lib.  The existing compression is at the i2cp
      level, so we've been packetizing 4KB of uncompressed data and then
      compressing those messages, rather than compressing and then packetizing
      4KB of compressed data.  This should reduce the number of round trips
      to fetch web pages substantially.
    * Adjust the startup and timing of the addressbook so that susidns always
      has config to work off, and expose a method for susidns to tell it to
      reload its config and rerun.
2005-09-16 04:12:24 +00:00

372 lines
21 KiB
XML

<?xml version="1.0" encoding="ISO-8859-1"?>
<project basedir="." default="all" name="i2p">
<target name="all" >
<echo message="Useful targets: " />
<echo message=" dist: distclean then package everything up (installer, clean tarball, update tarball)" />
<echo message=" installer: build the GUI installer" />
<echo message=" tarball: tar the full install into i2p.tar.bz2 (extracts to build a new clean install)" />
<echo message=" updater: tar the built i2p specific files into an i2pupdate.zip (extracts safely over existing installs)" />
<echo message=" distclean: clean up all derived files" />
<echo message=" javadoc: generate javadoc for the entire project into ./build/javadoc" />
</target>
<target name="dist" depends="pkg, javadoc">
</target>
<target name="build" depends="builddep, jar, buildWEB, buildexe" />
<target name="buildclean" depends="distclean, build" />
<target name="builddep">
<!-- build *everything* here, but only once -->
<ant dir="core/java/" target="jar" />
<ant dir="router/java/" target="jar" />
<ant dir="apps/ministreaming/java/" target="jar" />
<ant dir="apps/streaming/java/" target="jar" />
<ant dir="apps/i2ptunnel/java/" target="jar" />
<ant dir="apps/sam/java/" target="jar" />
<ant dir="apps/heartbeat/java/" target="jar" />
<ant dir="apps/netmonitor/java/" target="jar" />
<ant dir="apps/systray/java/" target="jar" />
<ant dir="apps/routerconsole/java/" target="jar" />
<ant dir="apps/addressbook/" target="war" />
<ant dir="apps/susimail/" target="war" />
<ant dir="apps/susidns/src" target="all" />
<ant dir="apps/syndie/java/" target="jar" /> <!-- not pushed in the update... yet -->
</target>
<target name="buildWEB">
<ant dir="apps/jetty" target="fetchJettylib" />
<ant dir="apps/routerconsole/java" target="build" />
<copy file="apps/routerconsole/java/build/routerconsole.jar" todir="build/" />
<copy file="apps/routerconsole/java/build/routerconsole.war" todir="build/" />
<copy file="apps/jetty/jettylib/org.mortbay.jetty.jar" todir="build/" />
<copy file="apps/jetty/jettylib/ant.jar" todir="build/" />
<copy file="apps/jetty/jettylib/jasper-compiler.jar" todir="build/" />
<copy file="apps/jetty/jettylib/jasper-runtime.jar" todir="build/" />
<copy file="apps/jetty/jettylib/commons-logging.jar" todir="build/" />
<copy file="apps/jetty/jettylib/commons-el.jar" todir="build/" />
<copy file="apps/jetty/jettylib/xercesImpl.jar" todir="build/" />
<copy file="apps/jetty/jettylib/javax.servlet.jar" todir="build/" />
</target>
<target name="buildexe">
<jar destfile="./build/launchi2p.jar">
<manifest>
<attribute name="Main-Class" value="net.i2p.router.RouterLaunch" />
<attribute name="Class-Path" value="lib/i2p.jar lib/router.jar lib/jbigi.jar lib/sam.jar lib/mstreaming.jar lib/streaming.jar lib/routerconsole.jar lib/i2ptunnel.jar lib/org.mortbay.jetty.jar lib/javax.servlet.jar lib/jasper-compiler.jar lib/jasper-runtime.jar lib/commons-logging.jar lib/commons-el.jar lib/ant.jar lib/xercesImpl.jar lib/wrapper.jar lib/systray.jar lib/systray4j.jar" />
</manifest>
</jar>
<!-- now the standalone launcher 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/i2pstandalone.xml" />
<!-- thazzit -->
</target>
<target name="compile" />
<target name="jar" depends="compile" >
<copy file="core/java/build/i2p.jar" todir="build/" />
<copy file="router/java/build/router.jar" todir="build/" />
<copy file="apps/ministreaming/java/build/mstreaming.jar" todir="build/" />
<copy file="apps/streaming/java/build/streaming.jar" todir="build/" />
<copy file="apps/i2ptunnel/java/build/i2ptunnel.jar" todir="build/" />
<copy file="apps/i2ptunnel/java/build/i2ptunnel.war" todir="build/" />
<copy file="apps/sam/java/build/sam.jar" todir="build/" />
<copy file="apps/heartbeat/java/build/heartbeat.jar" todir="build/" />
<copy file="apps/netmonitor/java/build/netmonitor.jar" todir="build/" />
<copy file="apps/systray/java/build/systray.jar" todir="build/" />
<copy file="installer/lib/jbigi/jbigi.jar" todir="build" />
<copy file="apps/addressbook/dist/addressbook.war" todir="build/" />
<copy file="apps/susimail/susimail.war" todir="build/" />
<copy file="apps/susidns/src/susidns.war" todir="build/" />
<copy file="apps/syndie/syndie.war" todir="build/" />
<copy file="apps/syndie/java/build/syndie.jar" todir="build/" />
<copy file="apps/syndie/syndie.war" todir="build/" />
</target>
<target name="javadoc">
<mkdir dir="./build" />
<mkdir dir="./build/javadoc" />
<javadoc access="package"
destdir="./build/javadoc"
packagenames="*"
use="true"
group="SDK net.i2p:net.i2p.*:net.i2p.client:net.i2p.client.*:freenet.support.CPUInformation,
Streaming net.i2p.client.streaming,
RouterConsole net.i2p.router.web,
Router net.i2p.router:net.i2p.router.*:net.i2p.data.i2np,
Systray net.i2p.apps.systray,
I2PTunnel net.i2p.i2ptunnel:net.i2p.i2ptunnel.*"
splitindex="true"
windowtitle="I2P">
<sourcepath>
<pathelement location="core/java/src" />
<!--<pathelement location="core/java/test" />-->
<pathelement location="router/java/src" />
<!--<pathelement location="router/java/test" />-->
<pathelement location="apps/ministreaming/java/src" />
<pathelement location="apps/streaming/java/src" />
<pathelement location="apps/i2ptunnel/java/src" />
<pathelement location="apps/systray/java/src" />
<pathelement location="apps/routerconsole/java/src" />
</sourcepath>
<classpath>
<pathelement location="apps/jetty/jettylib/org.mortbay.jetty.jar" />
<pathelement location="apps/systray/java/lib/systray4j.jar" />
<pathelement location="installer/lib/wrapper/win32/wrapper.jar" />
<pathelement location="core/lib/junit.jar" />
</classpath>
</javadoc>
</target>
<target name="clean" depends="pkgclean" >
<delete dir="./build" />
<delete file="i2pinstall.exe" />
<delete file="i2p.exe" />
</target>
<target name="distclean" depends="clean">
<ant dir="core/java/" target="distclean" />
<ant dir="router/java/" target="distclean" />
<ant dir="apps/ministreaming/java/" target="distclean" />
<ant dir="apps/streaming/java/" target="distclean" />
<ant dir="apps/i2ptunnel/java/" target="distclean" />
<ant dir="apps/sam/java/" target="distclean" />
<ant dir="apps/heartbeat/java/" target="distclean" />
<ant dir="apps/netmonitor/java/" target="distclean" />
<ant dir="apps/routerconsole/java/" target="distclean" />
<ant dir="apps/addressbook/" target="distclean" />
<ant dir="apps/susimail/" target="distclean" />
<ant dir="apps/susidns/src/" target="distclean" />
<ant dir="apps/systray/java/" target="distclean" />
<ant dir="installer/java/" target="distclean" />
<delete>
<fileset dir="." includes="**/*.class" />
<fileset dir="." includes="**/*.java~" />
</delete>
</target>
<target name="distGUI" depends="clean, buildGUI">
<mkdir dir="build/lib" />
<copy file="apps/jfreechart/jfreechart-0.9.17/jfreechart-0.9.17.jar" todir="build/lib" />
<copy file="apps/jfreechart/jfreechart-0.9.17/lib/log4j-1.2.8.jar" todir="build/lib" />
<copy file="apps/jfreechart/jfreechart-0.9.17/lib/jcommon-0.9.2.jar" todir="build/lib" />
<copy file="apps/jfreechart/GUI-licenses.txt" todir="build/" />
<copy file="apps/netmonitor/java/build/netviewer.jar" todir="build/lib" />
<copy file="apps/heartbeat/java/build/heartbeatGUI.jar" todir="build/lib" />
<zip destfile="build/gui.zip" basedir="build/" includes="GUI-licenses.txt lib/*.jar" />
</target>
<target name="prepGUI">
<echo message="The code being fetched comes from http://www.jfree.org/jfreechart/" />
<echo message="It includes code licensed under the LGPL and the APL - please see" />
<echo message="the JFreeChart site (or the info downloaded) for source and details" />
<ant dir="apps/jfreechart/" target="fetchJfreechart" />
<ant dir="apps/jfreechart/" target="build" />
</target>
<target name="buildGUI">
<echo message="Building the GUIs for the heartbeat and netmonitor apps, which depend upon" />
<echo message="the JFreeChart and related packages. The following will fail if you haven't" />
<echo message="already run 'ant prepGUI' to fetch the LGPL/APL'ed code" />
<ant dir="apps/heartbeat/java" target="buildGUI" />
<ant dir="apps/netmonitor/java" target="buildGUI" />
<copy file="apps/jfreechart/jfreechart-0.9.17/jfreechart-0.9.17.jar" todir="build/" />
<copy file="apps/jfreechart/jfreechart-0.9.17/lib/log4j-1.2.8.jar" todir="build/" />
<copy file="apps/jfreechart/jfreechart-0.9.17/lib/jcommon-0.9.2.jar" todir="build/" />
<copy file="apps/jfreechart/GUI-licenses.txt" todir="build/" />
<copy file="apps/netmonitor/java/build/netviewer.jar" todir="build/" />
<copy file="apps/heartbeat/java/build/heartbeatGUI.jar" todir="build/" />
<echo message="GUIs created. You will need the following files to run them: " />
<echo message="jfreechart-0.9.17.jar log4j-1.2.8.jar jcommon-0.9.2.jar" />
<echo message="To run the netmonitor GUI: java -cp jfreechart-0.9.17.jar:log4j-1.2.8.jar:jcommon-0.9.2.jar -jar netviewer.jar" />
<echo message="To run the heartbeat GUI: java -cp jfreechart-0.9.17.jar:log4j-1.2.8.jar:jcommon-0.9.2.jar -jar heartbeatGUI.jar" />
</target>
<target name="pkg" depends="updater, tarball, installer" />
<target name="pkgclean">
<delete dir="pkg-temp" />
<delete>
<fileset dir="." includes="i2p.tar.bz2 install.jar i2pupdate.zip" />
</delete>
</target>
<target name="preppkg" depends="build">
<delete dir="pkg-temp" />
<copy file="build/ant.jar" todir="pkg-temp/lib/" />
<copy file="build/heartbeat.jar" todir="pkg-temp/lib/" />
<copy file="build/i2p.jar" todir="pkg-temp/lib/" />
<copy file="build/i2ptunnel.jar" todir="pkg-temp/lib/" />
<copy file="build/jasper-compiler.jar" todir="pkg-temp/lib/" />
<copy file="build/jasper-runtime.jar" todir="pkg-temp/lib/" />
<copy file="build/commons-logging.jar" todir="pkg-temp/lib/" />
<copy file="build/commons-el.jar" todir="pkg-temp/lib/" />
<copy file="build/javax.servlet.jar" todir="pkg-temp/lib/" />
<copy file="build/jbigi.jar" todir="pkg-temp/lib" />
<copy file="build/mstreaming.jar" todir="pkg-temp/lib/" />
<copy file="build/streaming.jar" todir="pkg-temp/lib/" />
<copy file="build/netmonitor.jar" todir="pkg-temp/lib/" />
<copy file="build/org.mortbay.jetty.jar" todir="pkg-temp/lib/" />
<copy file="build/router.jar" todir="pkg-temp/lib/" />
<copy file="build/routerconsole.jar" todir="pkg-temp/lib/" />
<copy file="build/sam.jar" todir="pkg-temp/lib/" />
<copy file="build/systray.jar" todir="pkg-temp/lib" />
<copy file="i2p.exe" todir="pkg-temp/" />
<copy file="installer/resources/runplain.sh" todir="pkg-temp/" />
<copy file="apps/systray/java/lib/systray4j.jar" todir="pkg-temp/lib" />
<copy file="apps/systray/java/lib/systray4j.dll" todir="pkg-temp/lib" />
<copy file="apps/systray/java/resources/iggy.ico" todir="pkg-temp/icons" />
<copy file="apps/systray/java/resources/iggy.xpm" todir="pkg-temp/icons" />
<copy file="build/xercesImpl.jar" todir="pkg-temp/lib/" />
<copy file="build/i2ptunnel.war" todir="pkg-temp/webapps/" />
<copy file="build/routerconsole.war" todir="pkg-temp/webapps/" />
<copy file="build/addressbook.war" todir="pkg-temp/webapps/" />
<copy file="build/susimail.war" todir="pkg-temp/webapps/" />
<copy file="build/susidns.war" todir="pkg-temp/webapps/" />
<copy file="build/syndie.war" todir="pkg-temp/webapps/" />
<copy file="installer/resources/clients.config" todir="pkg-temp/" />
<copy file="installer/resources/eepget" todir="pkg-temp/" />
<copy file="installer/resources/i2prouter" todir="pkg-temp/" />
<copy file="installer/resources/i2prouter.bat" todir="pkg-temp/" />
<copy file="installer/resources/i2ptunnel.config" todir="pkg-temp/" />
<!-- <copy file="installer/resources/install_i2p_service_unix" todir="pkg-temp/" /> -->
<copy file="installer/resources/install_i2p_service_winnt.bat" todir="pkg-temp/" />
<copy file="installer/resources/osid" todir="pkg-temp/" />
<copy file="installer/resources/postinstall.bat" todir="pkg-temp/" />
<copy file="installer/resources/postinstall.sh" todir="pkg-temp/" />
<copy file="installer/resources/startRouter.sh" todir="pkg-temp/" />
<copy file="installer/resources/systray.config" todir="pkg-temp/" />
<!-- <copy file="installer/resources/uninstall_i2p_service_unix" todir="pkg-temp/" /> -->
<copy file="installer/resources/uninstall_i2p_service_winnt.bat" todir="pkg-temp/" />
<copy file="installer/resources/wrapper.config" todir="pkg-temp/" />
<copy todir="pkg-temp/lib/wrapper/freebsd/">
<fileset dir="installer/lib/wrapper/freebsd/" />
</copy>
<copy todir="pkg-temp/lib/wrapper/linux/">
<fileset dir="installer/lib/wrapper/linux/" />
</copy>
<copy todir="pkg-temp/lib/wrapper/macosx/">
<fileset dir="installer/lib/wrapper/macosx/" />
</copy>
<copy todir="pkg-temp/lib/wrapper/solaris/">
<fileset dir="installer/lib/wrapper/solaris/" />
</copy>
<copy todir="pkg-temp/lib/wrapper/win32/">
<fileset dir="installer/lib/wrapper/win32/" />
</copy>
<copy file="hosts.txt" todir="pkg-temp/" />
<copy file="install-headless.txt" todir="pkg-temp/" />
<copy file="history.txt" todir="pkg-temp/" />
<mkdir dir="pkg-temp/scripts" />
<copy file="apps/proxyscript/i2pProxy.pac" todir="pkg-temp/scripts/" />
<copy file="core/perl/i2pbench.sh" todir="pkg-temp/scripts/" />
<copy file="core/perl/i2ptest.sh" todir="pkg-temp/scripts/" />
<mkdir dir="pkg-temp/docs" />
<copy file="readme.html" todir="pkg-temp/docs/" />
<copy file="initialNews.xml" tofile="pkg-temp/docs/news.xml" />
<copy file="installer/resources/startconsole.html" todir="pkg-temp/docs/" />
<copy file="installer/resources/start.ico" todir="pkg-temp/docs/" />
<copy file="installer/resources/console.ico" todir="pkg-temp/docs/" />
<copy file="installer/resources/uninstall.ico" todir="pkg-temp/docs/" />
<copy file="installer/resources/dnf-header.ht" todir="pkg-temp/docs/" />
<copy file="installer/resources/dnfp-header.ht" todir="pkg-temp/docs/" />
<copy file="installer/resources/dnfb-header.ht" todir="pkg-temp/docs/" />
<mkdir dir="pkg-temp/eepsite" />
<mkdir dir="pkg-temp/eepsite/webapps" />
<mkdir dir="pkg-temp/eepsite/logs" />
<mkdir dir="pkg-temp/eepsite/docroot" />
<mkdir dir="pkg-temp/eepsite/cgi-bin" />
<copy file="installer/resources/eepsite_index.html" tofile="pkg-temp/eepsite/docroot/index.html" />
<copy file="installer/resources/favicon.ico" tofile="pkg-temp/eepsite/docroot/favicon.ico" />
<copy file="installer/resources/jetty.xml" tofile="pkg-temp/eepsite/jetty.xml" />
</target>
<target name="tarball" depends="preppkg">
<tar compression="bzip2" destfile="i2p.tar.bz2">
<tarfileset dir="pkg-temp" includes="**/*" prefix="i2p" />
</tar>
</target>
<target name="updater" depends="prepupdate">
<zip destfile="i2pupdate.zip" basedir="pkg-temp" />
</target>
<target name="updateTest" depends="prepupdate">
<ant dir="core/java/" target="jarTest" />
<copy file="core/java/build/i2ptest.jar" todir="pkg-temp/lib" />
<zip destfile="i2pupdate.zip" basedir="pkg-temp" />
</target>
<target name="prepupdate" depends="distclean, build">
<delete dir="pkg-temp" />
<copy file="build/i2p.jar" todir="pkg-temp/lib/" />
<copy file="build/i2ptunnel.jar" todir="pkg-temp/lib/" />
<copy file="build/mstreaming.jar" todir="pkg-temp/lib/" />
<copy file="build/streaming.jar" todir="pkg-temp/lib/" />
<copy file="build/sam.jar" todir="pkg-temp/lib/" />
<copy file="build/router.jar" todir="pkg-temp/lib/" />
<copy file="build/routerconsole.jar" todir="pkg-temp/lib/" />
<copy file="i2p.exe" todir="pkg-temp/" />
<copy file="installer/resources/runplain.sh" todir="pkg-temp/" />
<!-- for the i2p 0.5 release, push jetty 5.2.1 -->
<!--
<copy file="build/jasper-compiler.jar" todir="pkg-temp/lib/" />
<copy file="build/jasper-runtime.jar" todir="pkg-temp/lib/" />
<copy file="build/commons-logging.jar" todir="pkg-temp/lib/" />
<copy file="build/commons-el.jar" todir="pkg-temp/lib/" />
<copy file="build/org.mortbay.jetty.jar" todir="pkg-temp/lib/" />
<copy file="build/javax.servlet.jar" todir="pkg-temp/lib/" />
-->
<!-- requires commons-* to be added to the classpath (boo, hiss) -->
<!--
<copy file="installer/resources/wrapper.config" todir="pkg-temp/" />
<touch file="pkg-temp/wrapper.config.updated" />
-->
<copy file="build/i2ptunnel.war" todir="pkg-temp/webapps/" />
<copy file="build/routerconsole.war" todir="pkg-temp/webapps/" />
<copy file="build/addressbook.war" todir="pkg-temp/webapps/" />
<copy file="build/susimail.war" todir="pkg-temp/webapps/" />
<copy file="build/susidns.war" todir="pkg-temp/webapps/" />
<copy file="build/syndie.war" todir="pkg-temp/webapps/" />
<copy file="history.txt" todir="pkg-temp/" />
<mkdir dir="pkg-temp/docs/" />
<copy file="news.xml" todir="pkg-temp/docs/" />
<copy file="installer/resources/dnf-header.ht" todir="pkg-temp/docs/" />
<copy file="installer/resources/dnfp-header.ht" todir="pkg-temp/docs/" />
<copy file="installer/resources/dnfb-header.ht" todir="pkg-temp/docs/" />
<!-- the addressbook handles this for updates -->
<!-- <copy file="hosts.txt" todir="pkg-temp/" /> -->
<mkdir dir="pkg-temp/eepsite" />
<mkdir dir="pkg-temp/eepsite/webapps" />
<mkdir dir="pkg-temp/eepsite/cgi-bin" />
</target>
<taskdef name="izpack" classpath="${basedir}/installer/lib/izpack/standalone-compiler.jar" classname="com.izforge.izpack.ant.IzPackTask" />
<target name="installer" depends="preppkg">
<jar destfile="./pkg-temp/lib/copy.jar" basedir="./core/java/build/obj" includes="net/i2p/util/*.class">
<manifest><attribute name="Main-Class" value="net.i2p.util.Copy" /></manifest>
</jar>
<jar destfile="./pkg-temp/lib/delete.jar" basedir="./core/java/build/obj" includes="net/i2p/util/*.class">
<manifest><attribute name="Main-Class" value="net.i2p.util.Delete" /></manifest>
</jar>
<jar destfile="./pkg-temp/lib/exec.jar" basedir="./core/java/build/obj" includes="net/i2p/util/*.class">
<manifest><attribute name="Main-Class" value="net.i2p.util.Exec" /></manifest>
</jar>
<izpack input="${basedir}/installer/install.xml" output="${basedir}/install.jar" installerType="standard" basedir="${basedir}" />
<ant target="installerexe" />
</target>
<target name="installerexe">
<!-- 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/i2pinstaller.xml" />
<launch4j configFile="./installer/i2pstandalone.xml" />
<!-- thazzit -->
</target>
<target name="test">
<ant dir="core/java/" target="test" />
</target>
<target name="junit.report">
<ant dir="core/java/" target="junit.report" />
</target>
<target name="clover.report">
<ant dir="core/java/" target="clover.report" />
</target>
<target name="test.report" depends="junit.report, clover.report"/>
<target name="fulltest">
<ant dir="core/java/" target="fulltest" />
<ant dir="router/java/" target="fulltest" />
</target>
<target name="fullclovertest">
<ant dir="core/java/" target="fullclovertest" />
<ant dir="router/java/" target="fullclovertest" />
</target>
</project>