source: build.xml @ ef26acc

Last change on this file since ef26acc was ef26acc, checked in by zzz <zzz@…>, 10 years ago

jrobin 1.5.9.1
sha1sum 7d76f5cdec625fd1ce21acc0e46d286fbd6d307f
Released 2008-09-05
Downloaded from http://sourceforge.net/projects/jrobin/files/jrobin/1.5.9/
License: LGPL 2.1

It appears that the only difference from 1.5.9 is it was compiled with Java 5
instead of Java 6. The 1.5.9 jars out there also contain the large font .ttf files,
which are not in 1.5.9.1.

The only announcement I could find about 1.5.9.1 is here:
http://opennms.530661.n2.nabble.com/Am-I-missing-something-td841945.html

The following directories are dropped from the jar during the build process:
org/jrobin/cmd/
org/jrobin/convertor/
org/jrobin/inspector/

  • Property mode set to 100644
File size: 58.1 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<project basedir="." default="all" name="i2p">
3   
4    <!-- Things you might want to change -->
5    <!-- This keeps gcj a lot quieter -->
6    <!--
7        <property name="javac.compilerargs" value="-warn:-unchecked,raw,unused,serial" />
8    -->
9    <!-- Additional classpath. No longer required; we find pack200 classes at runtime.
10         See core/java/src/net/i2p/util/FileUtil.java for more info.
11    -->
12    <!--
13        <property name="javac.classpath" value="/PATH/TO/pack200.jar" />
14    -->
15
16    <!-- You probably don't want to change anything from here down -->
17    <target name="help" depends="all" />
18    <target name="all" >
19        <echo message="Useful targets: " />
20        <echo message="  pkg:       distclean then package everything up (installer, clean tarball, update tarball)" />
21        <echo message="  dist:      pkg and javadoc" />
22        <echo message="  installer: build the GUI installer" />
23        <echo message="  tarball:   tar the full install into i2p.tar.bz2 (extracts to build a new clean install)" />
24        <echo message="  updater:   Package the built files in i2pupdate.zip (extracts safely over existing installs)" />
25        <echo message="  updater200: Updater compressed with pack200 (creates i2pupdate200.zip, 60% smaller)" />
26        <echo message="  updaterWithJavadoc: updater including the javadocs, for display in the console" />
27        <echo message="  updaterWithJetty: Updater including Jetty" />
28        <echo message="  updaterWithJettyFixes: updater including local jetty patches" />
29        <echo message="  updaterWithGeoIP: updater including GeoIP Files" />
30        <echo message="  updaterWithJettyFixesAndGeoIP" />
31        <echo message="  updaterSmall:   updater with the essentials only - no SAM, i2psnark, SusiMail, SusiDNS, news.xml, or history.txt" />
32        <echo message="  updaterRouter:  updater with the i2p.jar and router.jar only" />
33        <echo message="  distclean: clean up all derived files" />
34        <echo message="  syndie:    generate a standalone syndie install" />
35        <echo message="  desktopgui: generate a standalone desktopgui install" />
36        <echo message="  i2psnark:  generate a standalone i2psnark install" />
37        <echo message="  justBOB:  generate a standalone BOB-one.jar" />
38        <echo message="  javadoc:   generate javadoc for the entire project into ./build/javadoc" />
39        <echo message="  slackpkg:  generate Slackware packages in ./Slackware/i2p and ./Slackware/i2p-base" />
40        <echo message="  debianhowto: instructions on building Debian packages" />
41        <echo message="  debian: generate Debian packages in ./debian/packages" />
42        <echo message="          (libc6-i686 and libc6-amd64 required, ant>=1.8 required)" />
43        <echo message="  debianrepo: build a Debian repository (reprepro required)" />
44        <echo message="  poupdate: update the .po files for translators" />
45        <echo message="  pkg-portable-win32:  build a minimum portable version for win32" />
46   </target>
47    <target name="debianhowto">
48        <echo message="To build debian packages, you must run dpkg-buildpackage as root in the source directory. It will then run ant for you. dpkg-buildpackage is found in the 'dpkg-dev' package. Also it should work fine to use the 'fakeroot' package with dpkg-buildpackage, if you don't want to run as root. Please read 'man dpkg-buildpackage' before building any packages yourself." />
49    </target>
50    <target name="dist" depends="pkg, javadoc">
51    </target>
52    <target name="build" depends="build2">
53        <!-- so we don't build standalone for the updater -->
54        <!-- This builds apps/i2psnark/java/i2psnark-standalone.zip,
55          -   which we don't distribute anywhere...
56        <ant dir="apps/i2psnark/java/" target="standalone" />
57        -->
58    </target>
59    <target name="build2" depends="builddep, jar, buildWEB" />
60    <target name="buildSmall" depends="builddepSmall, jarSmall, buildWEB" />
61    <target name="buildclean" depends="distclean, build" />
62
63    <target name="builddep" depends="builddepSmall, buildBOB, buildSAM, buildSusiMail, buildSusiDNS, buildI2PSnark" />
64
65    <target name="builddepSmall" depends="buildrouter, buildSystray, buildDesktopGui, buildRouterConsole, buildStreaming, buildI2PTunnel, buildAddressbook" />
66
67    <!-- start of buildX, one for each sub-build.xml.
68         Do not put ant tasks in the sub-build.xmls anymore,
69         so the build will go faster.
70      -->
71
72    <target name="buildBOB" depends="buildStreaming" >
73        <ant dir="apps/BOB/" target="jar" />
74    </target>
75
76    <target name="buildSAM" depends="buildStreaming" >
77        <ant dir="apps/sam/java/" target="jar" />
78    </target>
79
80    <target name="buildSusiMail" depends="buildCore, buildJetty" >
81        <ant dir="apps/susimail/" target="war" />
82    </target>
83
84    <target name="buildSusiDNS" depends="buildCore, buildJetty" >
85        <ant dir="apps/susidns/src" target="all" />
86    </target>
87
88    <target name="buildI2PSnark" depends="buildStreaming, buildJetty" >
89        <ant dir="apps/i2psnark/java/" target="war" />
90    </target>
91
92    <target name="buildAddressbook" depends="buildCore, buildJetty" >
93        <ant dir="apps/addressbook/" target="war" />
94    </target>
95
96    <target name="buildI2PTunnel" depends="buildStreaming, buildJetty" >
97        <ant dir="apps/i2ptunnel/java/" target="build" />
98    </target>
99
100    <target name="buildDesktopGui" depends="buildCore, buildrouter" >
101<!--
102        <ant dir="apps/desktopgui" target="clean" />
103-->
104        <ant dir="apps/desktopgui" target="jar" />
105    </target>
106
107    <target name="buildRouterConsole" depends="buildrouter, buildSystray, buildDesktopGui, buildJetty" >
108        <ant dir="apps/routerconsole/java/" target="jar" />
109    </target>
110
111    <target name="buildJetty" depends="buildProperties" >
112        <ant dir="apps/jetty" target="build" />
113    </target>
114
115    <target name="buildSystray" depends="buildCore" >
116        <ant dir="apps/systray/java/" target="jar" />
117    </target>
118
119    <target name="buildStreaming" depends="buildMinistreaming" >
120        <ant dir="apps/streaming/java/" target="jar" />
121    </target>
122
123    <target name="buildMinistreaming" depends="buildCore" >
124        <ant dir="apps/ministreaming/java/" target="jar" />
125    </target>
126
127    <target name="buildRouter" depends="buildrouter" />
128    <target name="buildrouter" depends="buildCore" >
129        <ant dir="router/java/" target="jar" />
130        <copy file="router/java/build/router.jar" todir="build/" />
131    </target>
132
133    <target name="buildCore" depends="buildProperties" >
134        <ant dir="core/java/" target="jar" />
135        <copy file="core/java/build/i2p.jar" todir="build/" />
136    </target>
137
138    <target name="buildJrobin" depends="buildProperties" >
139        <!-- take only what we need from the jrobin jar -->
140        <jar destfile="build/jrobin.jar" >
141            <zipfileset src="apps/jrobin/jrobin-1.5.9.1.jar"
142                        excludes="org/jrobin/cmd/ org/jrobin/convertor/ org/jrobin/inspector/" />
143            <manifest>
144                <attribute name="Build-Date" value="${build.timestamp}" />
145                <attribute name="Base-Revision" value="${workspace.version}" />
146            </manifest>
147        </jar>
148    </target>
149
150    <target name="buildProperties" >
151        <exec executable="mtn" outputproperty="workspace.version" errorproperty="mtn.error1" failifexecutionfails="false" >
152            <arg value="automate" />
153            <arg value="get_base_revision_id" />
154        </exec>
155        <tstamp>
156            <format property="build.timestamp" pattern="yyyy-MM-dd HH:mm:ss z" timezone="UTC" locale="en" />
157        </tstamp>
158    </target>
159
160    <!-- end of sub-build.xml targets -->
161
162    <target name="buildWEB" depends="buildRouterConsole" >
163        <copy file="apps/routerconsole/java/build/routerconsole.jar" todir="build/" />
164        <copy file="apps/routerconsole/java/build/routerconsole.war" todir="build/" />
165        <copy file="apps/jetty/jettylib/org.mortbay.jetty.jar" todir="build/" />
166        <copy file="apps/jetty/jettylib/jasper-compiler.jar" todir="build/" />
167        <copy file="apps/jetty/jettylib/jasper-runtime.jar" todir="build/" />
168        <copy file="apps/jetty/jettylib/commons-logging.jar" todir="build/" />
169        <copy file="apps/jetty/jettylib/commons-el.jar" todir="build/" />
170        <copy file="apps/jetty/jettylib/javax.servlet.jar" todir="build/" />
171    </target>
172
173    <target name="buildexe">
174        <condition property="noExe">
175            <os arch="x86_64" />
176        </condition>
177        <condition property="noExe">
178            <os arch="ppc" />
179        </condition>
180        <condition property="noExe">
181            <os arch="amd64" />
182        </condition>
183        <condition property="noExe">
184           <not>
185            <or>
186             <os name="Linux" />
187             <os family="windows" />
188            </or>
189           </not>
190        </condition>
191        <ant target="doBuildEXE" />
192    </target>
193    <target name="doBuildEXE" depends="buildProperties" unless="noExe">
194        <jar destfile="./build/launchi2p.jar">
195            <manifest>
196             <attribute name="Main-Class" value="net.i2p.router.RouterLaunch" />
197             <attribute name="Class-Path" value="lib/i2p.jar lib/router.jar lib/jbigi.jar lib/BOB.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/wrapper.jar lib/systray.jar lib/systray4j.jar lib/desktopgui.jar" />
198             <attribute name="Build-Date" value="${build.timestamp}" />
199             <attribute name="Base-Revision" value="${workspace.version}" />
200            </manifest>
201        </jar>
202        <!-- now the standalone launcher exe -->
203        <taskdef name="launch4j"
204                 classname="net.sf.launch4j.ant.Launch4jTask"
205                 classpath="${basedir}/installer/lib/launch4j/launch4j.jar:${basedir}/installer/lib/launch4j/lib/xstream.jar" />
206        <launch4j configFile="./installer/i2pstandalone.xml" />
207        <!-- thazzit -->
208    </target>
209    <target name="compile" />
210    <target name="jar" depends="jarSmall" >
211        <copy file="apps/BOB/dist/BOB.jar" todir="build/" />
212        <copy file="apps/sam/java/build/sam.jar" todir="build/" />
213        <copy file="apps/susimail/susimail.war" todir="build/" />
214        <copy file="apps/susidns/src/susidns.war" todir="build/" />
215        <copy file="apps/i2psnark/i2psnark.war" todir="build/" />
216        <copy file="apps/i2psnark/java/build/i2psnark.jar" todir="build/" />
217    </target>
218    <target name="jarSmall" depends="compile, buildJrobin" >
219        <copy file="core/java/build/i2p.jar" todir="build/" />
220        <copy file="router/java/build/router.jar" todir="build/" />
221        <copy file="apps/ministreaming/java/build/mstreaming.jar" todir="build/" />
222        <copy file="apps/streaming/java/build/streaming.jar" todir="build/" />
223        <copy file="apps/i2ptunnel/java/build/i2ptunnel.jar" todir="build/" />
224        <copy file="apps/i2ptunnel/java/build/i2ptunnel.war" todir="build/" />
225        <copy file="apps/systray/java/build/systray.jar" todir="build/" />
226        <copy file="apps/desktopgui/dist/desktopgui.jar" todir="build/" />
227        <copy file="installer/lib/jbigi/jbigi.jar" todir="build" />
228        <copy file="apps/addressbook/dist/addressbook.war" todir="build/" />
229    </target>
230    <!-- the apps need to compile the jsps to poupdate -->
231    <target name="poupdate" depends="buildRouter, buildStreaming, buildSystray, buildJetty, buildDesktopGui" >
232        <echo message="Setting environment variable LG2 to a lang code (eg: de,zh,nl etc)" />
233        <echo message=" will restrict language update to the language you specified, leaving other language untact." />
234        <ant dir="apps/routerconsole/java/" target="poupdate" />
235        <ant dir="apps/i2psnark/java/" target="poupdate" />
236        <ant dir="apps/i2ptunnel/java/" target="poupdate" />
237        <ant dir="apps/susidns/src/" target="poupdate" />
238        <ant dir="apps/susimail/" target="poupdate" />
239        <ant dir="apps/desktopgui" target="poupdate" />
240    </target>
241    <target name="javadoc">
242        <ant dir="apps/jetty" target="ensureJettylib" />
243        <mkdir dir="./build" />
244        <mkdir dir="./build/javadoc" />
245        <!-- get release and build version numbers -->
246        <exec executable="grep" outputproperty="versionLine" >
247            <arg value="public final static String VERSION" />
248            <arg value="core/java/src/net/i2p/CoreVersion.java" />
249        </exec>
250        <exec executable="cut" inputstring="${versionLine}" outputproperty="release.number" >
251            <arg value="-f2" />
252            <arg value="-d&quot;" />
253        </exec>
254        <exec executable="grep" outputproperty="buildLine" >
255            <arg value="public final static long BUILD" />
256            <arg value="router/java/src/net/i2p/router/RouterVersion.java" />
257        </exec>
258        <exec executable="cut" inputstring="${buildLine}" outputproperty="build.temp" >
259            <arg value="-f2" />
260            <arg value="-d=" />
261        </exec>
262        <exec executable="cut" inputstring="${build.temp}" outputproperty="build.number" >
263            <arg value="-f1" />
264            <arg value="-d;" />
265        </exec>
266        <javadoc access="package" 
267            destdir="./build/javadoc" 
268            packagenames="*" 
269            use="true" 
270            splitindex="true" 
271            doctitle="I2P Javadocs for Release ${release.number} Build ${build.number}"
272            windowtitle="I2P Anonymous Network - Java Documentation - Version ${release.number}">
273            <group title="Core SDK (i2p.jar)" packages="net.i2p:net.i2p.*:net.i2p.client:net.i2p.client.*:net.i2p.internal:net.i2p.internal.*:freenet.support.CPUInformation:org.bouncycastle.crypto:org.bouncycastle.crypto.*:gnu.crypto.*:gnu.gettext:org.xlattice.crypto.filters:com.nettgryppa.security" />
274            <group title="Streaming Library" packages="net.i2p.client.streaming" />
275            <group title="Router" packages="net.i2p.router:net.i2p.router.*:net.i2p.data.i2np:org.cybergarage.*:org.freenetproject" />
276            <group title="Router Console" packages="net.i2p.router.web" />
277            <group title="Addressbook Application" packages="net.i2p.addressbook" />
278            <group title="BOB Bridge" packages="net.i2p.BOB" />
279            <group title="I2PSnark Application" packages="org.klomp.snark:org.klomp.snark.*" />
280            <group title="I2PTunnel Application" packages="net.i2p.i2ptunnel:net.i2p.i2ptunnel.*" />
281            <group title="SAM Bridge" packages="net.i2p.sam:net.i2p.sam.client" />
282            <group title="SusiDNS Application" packages="i2p.susi.dns" />
283            <group title="SusiMail Application" packages="i2p.susi.webmail:i2p.susi.webmail.*:i2p.susi.debug:i2p.susi.util" />
284            <group title="Systray Application" packages="net.i2p.apps.systray" />
285            <group title="Desktopgui Application" packages="net.i2p.desktopgui.*" />
286            <sourcepath>
287                <pathelement location="core/java/src" />
288                <!--<pathelement location="core/java/test" />-->
289                <pathelement location="router/java/src" />
290                <!--<pathelement location="router/java/test" />-->
291                <pathelement location="apps/ministreaming/java/src" />
292                <pathelement location="apps/streaming/java/src" />
293                <pathelement location="apps/i2ptunnel/java/src" />
294                <pathelement location="apps/systray/java/src" />
295                <pathelement location="apps/desktopgui/src" />
296                <pathelement location="apps/routerconsole/java/src" />
297                <pathelement location="apps/addressbook/java/src" />
298                <pathelement location="apps/i2psnark/java/src" />
299                <pathelement location="apps/sam/java/src" />
300                <pathelement location="apps/BOB/src" />
301                <pathelement location="apps/susidns/src/java/src" />
302                <pathelement location="apps/susimail/src/src" />
303            </sourcepath>
304            <classpath>
305                <pathelement location="apps/jetty/jettylib/org.mortbay.jetty.jar" />
306                <pathelement location="apps/jetty/jettylib/javax.servlet.jar" />
307                <pathelement location="apps/systray/java/lib/systray4j.jar" />
308                <pathelement location="apps/jrobin/jrobin-1.5.9.1.jar" />
309                <pathelement location="installer/lib/wrapper/win32/wrapper.jar" />
310                <pathelement location="core/lib/junit.jar" />               
311            </classpath>
312            <link offline="true" href="http://download.oracle.com/javase/6/docs/api/" packagelistLoc="installer/resources/package-lists/java/" />
313            <link offline="true" href="http://docs.i2p2.de/jetty/javadoc/" packagelistLoc="installer/resources/package-lists/jetty/" />
314            <link offline="true" href="http://docs.i2p2.de/jrobin/javadoc/" packagelistLoc="installer/resources/package-lists/jrobin/" />
315        </javadoc>
316    </target>
317    <target name="clean" depends="pkgclean" >
318        <delete dir="./build" />
319        <delete file="i2pinstall.exe" failonerror="false" quiet="true" />       
320        <delete file="i2p.exe" failonerror="false" quiet="true" />
321        <delete file="syndie-standalone.zip" failonerror="false" quiet="true" />
322        <delete file="i2psnark-standalone.zip" failonerror="false" quiet="true" />
323        <delete file="BOB-one.jar" failonerror="false" quiet="true" /> 
324        <delete dir="debian/tmp" />
325        <delete dir="debian/db" />
326        <delete file="debian/files" />
327        <delete file="debian/build" />
328        <delete file="debian/substvars"/>
329    </target>
330    <target name="distclean" depends="clean">
331        <delete includeemptydirs="true" failonerror="false" >
332            <fileset dir="debian/packages" followSymlinks="false" />
333        </delete>
334        <delete dir="debian/repo" />
335        <ant dir="core/java/" target="distclean" />
336        <ant dir="router/java/" target="distclean" />
337        <ant dir="apps/ministreaming/java/" target="distclean" />
338        <ant dir="apps/streaming/java/" target="distclean" />
339        <ant dir="apps/i2ptunnel/java/" target="distclean" />
340        <ant dir="apps/sam/java/" target="distclean" />
341        <ant dir="apps/BOB" target="clean" />
342        <ant dir="apps/desktopgui" target="clean" />
343        <ant dir="apps/routerconsole/java/" target="distclean" />
344        <ant dir="apps/addressbook/" target="distclean" />
345        <ant dir="apps/susimail/" target="distclean" />
346        <ant dir="apps/susidns/src/" target="distclean" />
347        <ant dir="apps/systray/java/" target="distclean" />
348        <ant dir="apps/i2psnark/java/" target="distclean" />
349        <ant dir="apps/jetty/" target="distclean" />
350        <!--
351                NOTE! We need to turn off the default excludes for these
352                patterns to work.
353                These are the defaultexcludes in Ant as seen on
354                http://ant.apache.org/manual/CoreTasks/defaultexcludes.html
355                     **/*~
356                     **/#*#
357                     **/.#*
358                     **/%*%
359                     **/._*
360                     **/CVS
361                     **/CVS/**
362                     **/.cvsignore
363                     **/SCCS
364                     **/SCCS/**
365                     **/vssver.scc
366                     **/.svn
367                     **/.svn/**
368                     **/.DS_Store
369                The only recourse is to remove the offending ones.
370                We do this here, as we only need one change, and then put it
371                back after we are done with it.
372        -->
373        <defaultexcludes remove="**/*~"/>
374
375        <delete>
376            <fileset dir="." includes="**/*.class **/*.java~ **/*.txt~ **/*.xml~ **/*.sh~ **/*.SlackBuild~" />
377            <!--
378                Less common, but they pollute my workspace here, so we
379                might as well nuke these as well. Are there any others?
380               
381                !!??? Why don't we just nuke "**/*~" ???!!
382
383                ++Sponge
384            -->
385        </delete>
386        <!--
387                Now we put the defaults back
388        -->
389        <defaultexcludes default="true"/>
390    </target>
391
392    <target name="pkg" depends="distclean, updater, preppkg, installer" />
393
394    <target name="pkgclean" depends="deletepkg-temp">
395        <delete>
396            <fileset dir="." includes="i2p.tar.bz2 install.jar i2pupdate.zip i2pupdate200.zip" />
397        </delete>
398    </target>
399
400    <target name="preppkg" depends="preppkg-linux, preppkg-windows">
401        <copy file="build/jbigi.jar" todir="pkg-temp/lib" />
402        <copy todir="pkg-temp/lib/wrapper/freebsd/">
403            <fileset dir="installer/lib/wrapper/freebsd/" />
404        </copy>
405        <copy todir="pkg-temp/lib/wrapper/macosx/">
406            <fileset dir="installer/lib/wrapper/macosx/" />
407        </copy>
408        <copy todir="pkg-temp/lib/wrapper/solaris/">
409            <fileset dir="installer/lib/wrapper/solaris/" />
410        </copy>
411    </target>
412
413    <target name="preppkg-windows" depends="preppkg-base, buildexe">
414        <copy file="i2p.exe" todir="pkg-temp/" failonerror="false" />
415        <copy file="apps/systray/java/lib/systray4j.dll" todir="pkg-temp/lib" />
416        <copy file="apps/systray/java/resources/iggy.ico" todir="pkg-temp/icons" />
417        <copy file="apps/systray/java/resources/iggy.xpm" todir="pkg-temp/icons" />
418        <copy file="installer/resources/eepget.bat" todir="pkg-temp/" />
419        <copy file="installer/resources/i2prouter.bat" todir="pkg-temp/" />
420        <copy file="installer/resources/fixperms.bat" todir="pkg-temp/" />
421        <copy file="installer/resources/install_i2p_service_winnt.bat" todir="pkg-temp/" />
422        <copy file="installer/resources/postinstall.bat" todir="pkg-temp/" />
423        <copy file="installer/resources/uninstall_i2p_service_winnt.bat" todir="pkg-temp/" />
424        <copy todir="pkg-temp/lib/wrapper/win32/">
425            <fileset dir="installer/lib/wrapper/win32/" />
426        </copy>
427    </target>
428
429    <!-- only what is needed for debian, etc. -->
430    <target name="preppkg-linux-only" depends="preppkg-linux">
431        <!-- rip the non-linux stuff out of jbigi.jar -->
432        <mkdir dir="tmpextract" />
433        <unjar src="build/jbigi.jar" dest="tmpextract/" />
434        <jar destfile="pkg-temp/lib/jbigi.jar" >
435            <fileset dir="tmpextract/" includes="*linux*" />
436        </jar>
437        <delete dir="tmpextract/" />
438    </target>
439
440    <target name="preppkg-linux" depends="preppkg-base">
441        <copy file="installer/resources/runplain.sh" todir="pkg-temp/" />
442        <copy file="apps/i2psnark/launch-i2psnark" todir="pkg-temp/" />
443        <copy file="installer/resources/eepget" todir="pkg-temp/" />
444        <copy file="installer/resources/i2prouter" todir="pkg-temp/" />
445        <copy file="installer/resources/osid" todir="pkg-temp/" />
446        <copy file="installer/resources/postinstall.sh" todir="pkg-temp/" />
447        <copy todir="pkg-temp/man/">
448            <fileset dir="installer/resources/man/" />
449        </copy>
450        <copy todir="pkg-temp/lib/wrapper/linux/">
451            <fileset dir="installer/lib/wrapper/linux/" />
452        </copy>
453        <copy todir="pkg-temp/lib/wrapper/linux64/">
454            <fileset dir="installer/lib/wrapper/linux64/" />
455        </copy>
456    </target>
457
458    <target name="preppkg-base" depends="build, preplicenses, prepConsoleDocs, prepthemeupdates, prepCertificates">
459        <!-- if updater200 was run previously, it left *.pack files in pkg-temp -->
460        <delete>
461            <fileset dir="pkg-temp" includes="**/*.jar.pack **/*.war.pack" />
462        </delete>
463        <copy file="build/i2p.jar" todir="pkg-temp/lib/" />
464        <copy file="build/i2ptunnel.jar" todir="pkg-temp/lib/" />
465        <copy file="build/jasper-compiler.jar" todir="pkg-temp/lib/" />
466        <copy file="build/jasper-runtime.jar" todir="pkg-temp/lib/" />
467        <copy file="build/commons-logging.jar" todir="pkg-temp/lib/" />
468        <copy file="build/commons-el.jar" todir="pkg-temp/lib/" />
469        <copy file="build/javax.servlet.jar" todir="pkg-temp/lib/" />
470        <copy file="build/mstreaming.jar" todir="pkg-temp/lib/" />
471        <copy file="build/streaming.jar" todir="pkg-temp/lib/" />
472        <copy file="build/org.mortbay.jetty.jar" todir="pkg-temp/lib/" />
473        <copy file="build/router.jar" todir="pkg-temp/lib/" />
474        <copy file="build/desktopgui.jar" todir="pkg-temp/lib/" />
475        <copy file="build/routerconsole.jar" todir="pkg-temp/lib/" />
476        <!-- pulled out of routerconsole.jar in 0.7.12; name without version so we can overwrite if we upgrade  -->
477        <copy file="build/jrobin.jar" tofile="pkg-temp/lib/jrobin.jar" />
478        <copy file="build/sam.jar" todir="pkg-temp/lib/" />
479        <copy file="build/BOB.jar" todir="pkg-temp/lib/" />
480        <copy file="build/systray.jar" todir="pkg-temp/lib" />
481        <copy file="build/i2psnark.jar" todir="pkg-temp/lib/" />
482        <copy file="apps/systray/java/lib/systray4j.jar" todir="pkg-temp/lib" />
483        <copy file="build/i2ptunnel.war" todir="pkg-temp/webapps/" />
484        <copy file="build/routerconsole.war" todir="pkg-temp/webapps/" />
485        <copy file="build/addressbook.war" todir="pkg-temp/webapps/" />
486        <copy file="build/susimail.war" todir="pkg-temp/webapps/" />
487        <copy file="build/susidns.war" todir="pkg-temp/webapps/" />
488        <copy file="apps/susidns/src/WEB-INF/lib/jstl.jar" todir="pkg-temp/lib/" />
489        <copy file="apps/susidns/src/WEB-INF/lib/standard.jar" todir="pkg-temp/lib/" />
490        <copy file="build/i2psnark.war" todir="pkg-temp/webapps/" />
491        <copy file="apps/i2psnark/jetty-i2psnark.xml" todir="pkg-temp/" />
492        <copy file="apps/i2psnark/i2psnark.config" todir="pkg-temp/" />
493        <copy file="installer/resources/blocklist.txt" todir="pkg-temp/" />
494        <copy file="installer/resources/clients.config" todir="pkg-temp/" />
495        <copy file="installer/resources/i2ptunnel.config" todir="pkg-temp/" />
496        <copy file="installer/resources/systray.config" todir="pkg-temp/" />
497        <copy file="installer/resources/wrapper.config" todir="pkg-temp/" />
498        <copy file="installer/resources/hosts.txt" todir="pkg-temp/" />
499        <copy file="INSTALL-headless.txt" todir="pkg-temp/" />
500        <!-- overwrite the truncated history put in by the updater -->
501        <copy file="history.txt" todir="pkg-temp/" overwrite="true" />
502        <mkdir dir="pkg-temp/scripts" />
503        <copy file="apps/proxyscript/i2pProxy.pac" todir="pkg-temp/scripts/" />
504        <copy file="installer/resources/startconsole.html" todir="pkg-temp/docs/" />
505        <copy file="installer/resources/start.ico" todir="pkg-temp/docs/" />
506        <copy file="installer/resources/console.ico" todir="pkg-temp/docs/" />
507        <copy file="installer/resources/uninstall.ico" todir="pkg-temp/docs/" />
508        <!-- Eepsite stuff here -->
509        <mkdir dir="pkg-temp/eepsite" />
510        <mkdir dir="pkg-temp/eepsite/webapps" />
511        <mkdir dir="pkg-temp/eepsite/logs" />
512        <mkdir dir="pkg-temp/eepsite/cgi-bin" />
513        <mkdir dir="pkg-temp/eepsite/docroot" />
514        <mkdir dir="pkg-temp/eepsite/docroot/help" />
515        <mkdir dir="pkg-temp/eepsite/docroot/help/lib" />
516        <copy todir="pkg-temp/eepsite/docroot/" >
517            <fileset dir="installer/resources/eepsite.help/" />
518        </copy>
519        <copy todir="pkg-temp/eepsite/docroot/help/lib/" >
520            <fileset dir="installer/resources/icons/flags/" includes="cn.png de.png es.png fr.png ir.png it.png jp.png nl.png ru.png se.png us.png" />
521        </copy>
522        <copy file="installer/resources/themes/console/images/favicon.ico" tofile="pkg-temp/eepsite/docroot/favicon.ico" />
523        <copy file="installer/resources/jetty.xml" tofile="pkg-temp/eepsite/jetty.xml" />
524    </target>
525
526    <target name="preplicenses">
527        <copy file="LICENSE.txt" todir="pkg-temp/" />
528        <copy todir="pkg-temp/licenses/" >
529          <fileset dir="licenses/" />
530        </copy>
531        <!--
532              The license in launch4j/ is a BSD license for launch4j
533              The license in launch4j/head is a MIT license for the code that is actually wrapped around the jars
534              So we include the MIT one in our binary package
535         -->
536        <copy file="installer/lib/launch4j/head/LICENSE.txt" tofile="pkg-temp/licenses/LICENSE-Launch4j.txt" />
537        <!--  Not sure if these are used or should be included -->
538        <copy file="installer/lib/launch4j/lib/foxtrot.LICENSE.txt" tofile="pkg-temp/licenses/LICENSE-Foxtrot.txt" />
539        <copy file="installer/lib/launch4j/lib/JGoodies.Forms.LICENSE.txt" tofile="pkg-temp/licenses/LICENSE-JGoodies-Forms.txt" />
540        <copy file="installer/lib/launch4j/lib/JGoodies.Looks.LICENSE.txt" tofile="pkg-temp/licenses/LICENSE-JGoodies-Looks.txt" />
541        <copy file="installer/lib/launch4j/lib/XStream.LICENSE.txt" tofile="pkg-temp/licenses/LICENSE-XStream.txt" />
542    </target>
543
544    <target name="prepthemeupdates">
545        <copy todir="pkg-temp/docs/themes/" >
546            <fileset dir="installer/resources/themes/" />
547        </copy>
548    </target>
549
550    <!-- SSL Certs -->
551    <target name="prepCertificates">
552        <copy todir="pkg-temp/certificates/" >
553          <fileset dir="installer/resources/certificates/" />
554        </copy>
555    </target>
556
557    <!-- this is no longer required, izpack 4.3.0 supports headless installs with java -jar i2pinstall.exe -console -->
558    <target name="tarball" depends="preppkg">
559        <tar compression="bzip2" destfile="i2p.tar.bz2">
560            <tarfileset dir="pkg-temp" includes="**/*" prefix="i2p" />
561        </tar>
562    </target>
563
564    <target name="deletepkg-temp">
565        <delete dir="pkg-temp" />
566    </target>
567
568    <!-- readme and proxy error page files, initialNews.xml files, GeoIP files, and flag icons -->
569    <target name="prepConsoleDocs" depends="prepConsoleDocUpdates, prepgeoupdate" >
570        <copy todir="pkg-temp/docs/initialNews/">
571          <fileset dir="installer/resources/initialNews/" />
572        </copy>
573    </target>
574
575    <!-- readme and proxy error page files -->
576    <target name="prepConsoleDocUpdates">
577        <copy todir="pkg-temp/docs/" >
578          <fileset dir="installer/resources/readme/" includes="readme*.html" />
579          <fileset dir="installer/resources/proxy/" includes="*.ht" />
580          <!-- lang_ar.png added in 0.8.4 -->
581          <fileset dir="installer/resources/" includes="icons/flags/lang_ar.png" />
582        </copy>
583    </target>
584
585    <target name="consoleDocs" depends="deletepkg-temp, prepConsoleDocs">
586        <zip destfile="docs.zip" basedir="pkg-temp" whenempty="fail" />
587    </target>
588
589    <target name="copyJavadoc" depends="javadoc">
590        <copy todir="pkg-temp/docs/javadoc" >
591          <fileset dir="build/javadoc/" />
592        </copy>
593    </target>
594
595    <target name="updater200" depends="prepupdate, preplicenses, pack200, zipit200" />
596    <target name="updater200WithJettyFixes" depends="prepjupdatefixes, preplicenses, pack200, zipit200" />
597    <target name="updater" depends="prepupdate, preplicenses, zipit" />
598    <target name="updaterWithJavadoc" depends="prepupdate, preplicenses, copyJavadoc, zipit" />
599    <target name="updaterWithGeoIP" depends="prepupdate, prepgeoupdate, preplicenses, zipit" />
600    <target name="updaterWithJetty" depends="prepjupdate, preplicenses, zipit" />
601    <target name="updaterWithJettyFixes" depends="prepjupdatefixes, preplicenses, zipit" />
602    <target name="updaterWithJettyFixesAndGeoIP" depends="prepjupdatefixes, prepgeoupdate, preplicenses, zipit" />
603    <target name="updaterSmall" depends="prepupdateSmall, zipit" />
604    <target name="updaterRouter" depends="prepupdateRouter, zipit" />
605    <target name="zipit">
606        <zip destfile="i2pupdate.zip" basedir="pkg-temp" whenempty="fail" />
607       <!-- just a test, makes almost no difference
608        <tar destfile="i2pupdate.tgz" basedir="pkg-temp" compression="gzip" />
609        <tar destfile="i2pupdate.tbz" basedir="pkg-temp" compression="bzip2" />
610       -->
611    </target>
612    <target name="zipit200">
613        <zip destfile="i2pupdate200.zip" basedir="pkg-temp" whenempty="fail" />
614    </target>
615
616    <target name="pack200">
617<!-- *nix here -->
618        <exec executable="sh" osfamily="unix" failonerror="true">
619            <arg value="-c" />
620            <arg value="for i in pkg-temp/lib/*.jar pkg-temp/webapps/*war; do echo pack200 $i; mv $i $i.jar; pack200 -g $i.pack $i.jar; rm -f $i.jar; done" />
621        </exec>
622        <exec executable="sh" osfamily="mac" failonerror="true">
623            <arg value="-c" />
624            <!-- pack200 will only pack to a .pack file, and only from a .jar file, so we put another .jar on the end -->
625            <arg value="for i in pkg-temp/lib/*.jar pkg-temp/webapps/*war; do echo pack200 $i; mv $i $i.jar; pack200 -g $i.pack $i.jar; rm -f $i.jar; done" />
626        </exec>
627<!-- windoz here : i admit, i hate escaped symbols in xml, indeed = =! -->
628                <exec executable="cmd" osfamily="windows" failonerror="true">
629                        <arg value="/c" />
630                        <arg value="for %i in (pkg-temp\webapps\*.war) do move %i %i.jar &amp;&amp; pack200 -g pkg-temp\webapps\%~ni.war.pack %i.jar &amp;&amp; del %i.jar" />
631        </exec>
632                <exec executable="cmd" osfamily="windows" failonerror="true">
633                        <arg value="/c" />
634                        <arg value="for %i in (pkg-temp\lib\*.jar) do move %i %i.jar &amp;&amp; pack200 -g pkg-temp\lib\%~ni.jar.pack %i.jar &amp;&amp; del %i.jar" />
635        </exec>
636    </target>
637
638    <target name="updateTest" depends="prepupdate">
639        <ant dir="core/java/" target="jarTest" />   
640        <copy file="core/java/build/i2ptest.jar" todir="pkg-temp/lib" />
641        <zip destfile="i2pupdate.zip" basedir="pkg-temp" />
642    </target>
643
644    <target name="prepupdate" depends="build2, prepupdateSmall, prepConsoleDocUpdates, prepCertificates">
645        <copy file="build/BOB.jar" todir="pkg-temp/lib/" />
646        <copy file="build/sam.jar" todir="pkg-temp/lib/" />
647        <copy file="build/i2psnark.jar" todir="pkg-temp/lib" />
648        <!-- include systray changes in 0.7.5 -->
649        <copy file="build/systray.jar" todir="pkg-temp/lib/" />
650        <copy file="build/desktopgui.jar" todir="pkg-temp/lib/" />
651        <copy file="build/susimail.war" todir="pkg-temp/webapps/" />
652        <copy file="build/susidns.war" todir="pkg-temp/webapps/" />
653        <!-- as of 0.7.12; someday, we can remove these from the updater -->
654        <copy file="apps/susidns/src/WEB-INF/lib/jstl.jar" todir="pkg-temp/lib/" />
655        <copy file="apps/susidns/src/WEB-INF/lib/standard.jar" todir="pkg-temp/lib/" />
656        <copy file="build/i2psnark.war" todir="pkg-temp/webapps/" />
657        <copy file="history.txt" todir="pkg-temp/" />
658        <!-- the following overwrites history.txt on unix to shrink the update file -->
659        <exec executable="head" osfamily="unix" failifexecutionfails="true" output="pkg-temp/history.txt">
660            <arg value="-n" />
661            <arg value="1500" />
662            <arg value="history.txt" />
663        </exec>
664        <exec executable="echo" osfamily="unix" failifexecutionfails="true" output="pkg-temp/history.txt" append="true">
665            <arg value="EARLIER HISTORY IS AVAILABLE IN THE SOURCE PACKAGE" />
666        </exec>
667      <!-- May be pointless now, people with split directories will never see this,
668           and for flat installs we don't want to overwrite news more recent than the update package.
669        <copy file="installer/resources/news.xml" todir="pkg-temp/docs/" />
670       -->
671    </target>
672
673    <target name="prepupdateSmall" depends="buildSmall, prepupdateRouter, prepthemeupdates">
674        <copy file="build/i2ptunnel.jar" todir="pkg-temp/lib/" />
675        <copy file="build/mstreaming.jar" todir="pkg-temp/lib/" />
676        <copy file="build/streaming.jar" todir="pkg-temp/lib/" />
677        <copy file="build/routerconsole.jar" todir="pkg-temp/lib/" />
678        <!-- pulled out of routerconsole.jar in 0.7.12, someday we can take out of updater -->
679        <!-- name without version so we can overwrite if we upgrade  -->
680        <copy file="build/jrobin.jar" tofile="pkg-temp/lib/jrobin.jar" />
681        <copy file="build/i2ptunnel.war" todir="pkg-temp/webapps/" />
682        <copy file="build/routerconsole.war" todir="pkg-temp/webapps/" />
683        <copy file="build/addressbook.war" todir="pkg-temp/webapps/" />
684        <!-- decapitalized the file in 0.7.8 -->
685       <copy file="installer/resources/countries.txt" todir="pkg-temp/geoip/" />
686    </target>
687
688    <target name="prepupdateRouter" depends="buildrouter, deletepkg-temp">
689        <copy file="build/i2p.jar" todir="pkg-temp/lib/" />
690        <copy file="build/router.jar" todir="pkg-temp/lib/" />
691    </target>
692
693    <!-- GeoIP files and flag icons -->
694    <target name="prepgeoupdate">
695        <copy file="installer/resources/geoip.txt" todir="pkg-temp/geoip/" />
696        <copy file="installer/resources/countries.txt" todir="pkg-temp/geoip/" />
697        <copy todir="pkg-temp/docs/icons/flags" >
698          <fileset dir="installer/resources/icons/flags" />
699        </copy>
700    </target>
701
702    <target name="prepjupdate" depends="prepupdate, buildWEB">
703        <copy file="build/jasper-compiler.jar" todir="pkg-temp/lib/" />
704        <copy file="build/jasper-runtime.jar" todir="pkg-temp/lib/" />
705        <copy file="build/commons-logging.jar" todir="pkg-temp/lib/" />
706        <copy file="build/commons-el.jar" todir="pkg-temp/lib/" />
707        <copy file="build/javax.servlet.jar" todir="pkg-temp/lib/" />
708        <copy file="build/org.mortbay.jetty.jar" todir="pkg-temp/lib/" />
709    </target>
710    <target name="prepjupdatefixes" depends="prepupdate, buildWEB">
711        <copy file="build/org.mortbay.jetty.jar" todir="pkg-temp/lib/" />
712    </target>
713    <target name="installer" depends="preppkg, buildProperties">
714        <taskdef name="izpack" classpath="${basedir}/installer/lib/izpack/standalone-compiler.jar" classname="com.izforge.izpack.ant.IzPackTask" />
715        <mkdir dir="pkg-temp/installer" />
716        <exec executable="mtn" outputproperty="workspace.changes.util" errorproperty="mtn.error.util" failifexecutionfails="false" >
717            <arg value="list" />
718            <arg value="changed" />
719            <arg value="core/java/src/net/i2p/util" />
720        </exec>
721        <!-- \n in an attribute value generates an invalid manifest -->
722        <exec executable="tr" inputstring="${workspace.changes.util}" outputproperty="workspace.changes.util.tr" errorproperty="mtn.error2" failifexecutionfails="false" >
723            <arg value="-s" />
724            <arg value="[:space:]" />
725            <arg value="," />
726        </exec>
727        <jar destfile="./pkg-temp/installer/copy.jar" basedir="./core/java/build/obj" includes="net/i2p/util/Copy.class net/i2p/util/FileUtil.class">
728            <manifest>
729                <attribute name="Main-Class" value="net.i2p.util.Copy" />
730                <attribute name="Build-Date" value="${build.timestamp}" />
731                <attribute name="Base-Revision" value="${workspace.version}" />
732                <attribute name="Workspace-Changes" value="${workspace.changes.util.tr}" />
733            </manifest>
734        </jar>
735        <jar destfile="./pkg-temp/installer/delete.jar" basedir="./core/java/build/obj" includes="net/i2p/util/Delete.class net/i2p/util/FileUtil.class">
736            <manifest>
737                <attribute name="Main-Class" value="net.i2p.util.Delete" />
738                <attribute name="Build-Date" value="${build.timestamp}" />
739                <attribute name="Base-Revision" value="${workspace.version}" />
740                <attribute name="Workspace-Changes" value="${workspace.changes.util.tr}" />
741            </manifest>
742        </jar>
743        <jar destfile="./pkg-temp/installer/exec.jar" basedir="./core/java/build/obj" includes="net/i2p/util/Exec.class">
744            <manifest>
745                <attribute name="Main-Class" value="net.i2p.util.Exec" />
746                <attribute name="Build-Date" value="${build.timestamp}" />
747                <attribute name="Base-Revision" value="${workspace.version}" />
748                <attribute name="Workspace-Changes" value="${workspace.changes.util.tr}" />
749            </manifest>
750        </jar>
751        <!--
752          Force 1.5 pack200 output
753          Doesnt work!
754          http://jira.codehaus.org/browse/IZPACK-404
755          http://forums.sun.com/thread.jspa?threadID=773439
756          http://bfo.co.uk/blog/2010/05/13/combining_ant_jar_signatures_and_pack200.html
757        <property name="com.sun.java.util.jar.pack.package.majver" value="150" />
758        <property name="com.sun.java.util.jar.pack.package.minver" value="7" />
759        -->
760        <izpack input="${basedir}/installer/install.xml" output="${basedir}/install.jar" installerType="standard" basedir="${basedir}" />
761
762        <ant target="installerexe" />
763    </target>
764    <target name="installerexe">
765        <condition property="noExe">
766            <os arch="x86_64" />
767        </condition>
768        <condition property="noExe">
769            <os arch="amd64" />
770        </condition>
771        <condition property="noExe">
772           <not>
773            <or>
774             <os name="Linux" />
775             <os family="windows" />
776            </or>
777           </not>
778        </condition>
779        <ant target="doInstallerEXE" />
780    </target>
781    <target name="doInstallerEXE" unless="noExe">
782        <!-- now the installer exe -->
783        <taskdef name="launch4j"
784                 classname="net.sf.launch4j.ant.Launch4jTask"
785                 classpath="${basedir}/installer/lib/launch4j/launch4j.jar:${basedir}/installer/lib/launch4j/lib/xstream.jar" />
786        <launch4j configFile="./installer/i2pinstaller.xml" />
787        <launch4j configFile="./installer/i2pstandalone.xml" />
788        <!-- thazzit -->
789    </target>
790
791    <target name="test" depends="buildProperties" >
792        <ant dir="core/java/" target="test" />
793    </target>
794    <target name="junit.report" depends="buildProperties" >
795        <ant dir="core/java/" target="junit.report" />
796    </target>
797    <target name="clover.report" depends="buildProperties" >
798        <ant dir="core/java/" target="clover.report" />
799    </target>
800    <target name="test.report" depends="junit.report, clover.report"/>
801    <target name="fulltest" depends="buildProperties" >
802                <ant dir="core/java/" target="fulltest" />
803                <ant dir="router/java/" target="fulltest" />
804    </target>
805    <target name="fullclovertest" depends="buildProperties" >
806                <ant dir="core/java/" target="fullclovertest" />
807                <ant dir="router/java/" target="fullclovertest" />
808    </target>
809
810    <target name="syndie" >
811        <ant dir="apps/syndie/java/" target="standalone" />
812        <copy file="apps/syndie/java/syndie-standalone.zip" todir="." />
813    </target>
814    <target name="i2psnark" depends="buildProperties" >
815        <ant dir="apps/i2psnark/java" target="standalone" />
816        <copy file="apps/i2psnark/java/i2psnark-standalone.zip" todir="." />
817    </target>
818    <target name="slackpkg">
819        <echo message="Building Slackware package." />
820        <ant dir="Slackware/i2p/" target="slackpkg" />
821        <ant dir="Slackware/i2p-base/" target="slackpkg" />
822    </target>
823    <target name="justBOB" depends="builddepSmall">
824        <ant dir="apps/BOB/" target="onejar" />
825        <copy file="apps/BOB/dist/BOB-one.jar" todir="." />
826    </target>
827    <target name="findbugs" depends="build2">
828        <echo message="Starting findbugs, this will take a while..." />
829        <exec executable="nice" failonerror="true">
830            <arg value="findbugs"/>
831            <arg value="-textui"/>
832            <arg value="-projectName"/>
833            <arg value="i2p"/>
834            <arg value="-sortByClass"/>
835            <arg value="-xml"/>
836            <arg value="-output"/>
837            <arg value="i2p.fba"/>
838            <arg value="-auxclasspath"/>
839            <arg value="build/commons-el.jar:build/commons-logging.jar:build/jasper-compiler.jar:build/jasper-runtime.jar:build/javax.servlet.jar:build/org.mortbay.jetty.jar:apps/jrobin/jrobin-1.5.9.1.jar:apps/systray/java/lib/systray4j.jar:installer/lib/wrapper/linux/wrapper.jar:apps/susidns/src/WEB-INF/lib/standard.jar:apps/susidns/src/WEB-INF/lib/jstl.jar:apps/jrobin/jrobin-1.5.9.1.jar"/>
840            <arg value="-sourcepath"/>
841            <arg value="apps/BOB/src/:apps/addressbook/java/src/:apps/i2psnark/java/src/:apps/i2ptunnel/java/src/:apps/ministreaming/java/src/:apps/routerconsole/java/src/:apps/sam/java/src/:apps/streaming/java/src/:apps/susidns/src/java/src/:apps/susimail/src/src/:apps/systray/java/src/:core/java/src/:router/java/src/"/>
842            <!-- start of the files to be analyzed -->
843            <arg value="build/BOB.jar"/>
844            <arg value="build/addressbook.war"/>
845            <arg value="build/i2p.jar"/>
846            <arg value="build/i2psnark.jar"/>
847            <arg value="build/i2psnark.war"/>
848            <arg value="build/i2ptunnel.jar"/>
849            <arg value="build/i2ptunnel.war"/>
850            <arg value="build/jbigi.jar"/>
851            <arg value="build/mstreaming.jar"/>
852            <arg value="build/router.jar/"/>
853            <arg value="build/desktopgui.jar"/>
854            <arg value="build/routerconsole.jar"/>
855            <arg value="build/routerconsole.war"/>
856            <arg value="build/sam.jar"/>
857            <arg value="build/streaming.jar"/>
858            <arg value="build/susidns.war"/>
859            <arg value="build/susimail.war"/>
860            <arg value="build/systray.jar"/>
861        </exec>
862        <echo message="Findbugs output stored in i2p.fba" />
863        <echo message="Now run: findbugs i2p.fba" />
864    </target>
865
866    <!-- this is the same dependency as pkg, but with updater200 in the middle,
867         since preppkg puts too much stuff in pkg-temp -->
868    <target name="release" depends="distclean, updater, updater200, preppkg, installer" >
869        <echo message="================================================================" />
870        <echo message="Did you update these files?" />
871        <exec executable="ls" failonerror="true">
872            <arg value="-l" />
873            <arg value="history.txt" />
874            <arg value="installer/install.xml" />
875            <arg value="installer/resources/news.xml" />
876            <arg value="core/java/src/net/i2p/CoreVersion.java" />
877            <arg value="router/java/src/net/i2p/router/RouterVersion.java" />
878        </exec>
879        <echo message="Everything is checked in, right? Let's be sure:" />
880        <exec executable="mtn" failonerror="true">
881            <arg value="st" />
882        </exec>
883        <echo message="If there are any modified files above, stop now!" />
884        <!-- get release version number -->
885        <exec executable="grep" outputproperty="versionLine" failonerror="true" >
886            <arg value="public final static String VERSION" />
887            <arg value="core/java/src/net/i2p/CoreVersion.java" />
888        </exec>
889        <exec executable="cut" inputstring="${versionLine}" outputproperty="release.number" failonerror="true" >
890            <arg value="-f2" />
891            <arg value="-d&quot;" />
892        </exec>
893        <echo message="New version number is ${release.number}" />
894        <copy file="i2pupdate.zip" tofile="i2pupdate_${release.number}.zip" />
895        <copy file="i2pinstall.exe" tofile="i2pinstall_${release.number}.exe" />
896        <delete file="i2pupdate.sud" failonerror="false" />
897        <delete file="i2pupdate.su2" failonerror="false" />
898        <input message="Enter private signing key file:" addproperty="release.privkey" />
899        <fail message="You must enter a path." >
900            <condition>
901                <equals arg1="${release.privkey}" arg2=""/>
902            </condition>
903        </fail>
904        <echo message="Key file is ${release.privkey}" />
905        <java classname="net.i2p.crypto.TrustedUpdate" fork="true" failonerror="true">
906            <classpath>
907                <pathelement location="build/i2p.jar" />
908            </classpath>
909            <arg value="sign" />
910            <arg value="i2pupdate.zip" />
911            <arg value="i2pupdate.sud" />
912            <arg value="${release.privkey}" />
913            <arg value="${release.number}" />
914        </java>
915        <echo message="Verify version and VALID signature:" />
916        <java classname="net.i2p.crypto.TrustedUpdate" fork="true" failonerror="true">
917            <classpath>
918                <pathelement location="build/i2p.jar" />
919            </classpath>
920            <arg value="verifysig" />
921            <arg value="i2pupdate.sud" />
922        </java>
923        <java classname="net.i2p.crypto.TrustedUpdate" fork="true" failonerror="true">
924            <classpath>
925                <pathelement location="build/i2p.jar" />
926            </classpath>
927            <arg value="showversion" />
928            <arg value="i2pupdate.sud" />
929        </java>
930        <!-- now build and verify the packed sud from the packed zip -->
931        <java classname="net.i2p.crypto.TrustedUpdate" fork="true" failonerror="true">
932            <classpath>
933                <pathelement location="build/i2p.jar" />
934            </classpath>
935            <arg value="sign" />
936            <arg value="i2pupdate200.zip" />
937            <arg value="i2pupdate.su2" />
938            <arg value="${release.privkey}" />
939            <arg value="${release.number}" />
940        </java>
941        <echo message="Verify version and VALID signature:" />
942        <java classname="net.i2p.crypto.TrustedUpdate" fork="true" failonerror="true">
943            <classpath>
944                <pathelement location="build/i2p.jar" />
945            </classpath>
946            <arg value="verifysig" />
947            <arg value="i2pupdate.su2" />
948        </java>
949        <java classname="net.i2p.crypto.TrustedUpdate" fork="true" failonerror="true">
950            <classpath>
951                <pathelement location="build/i2p.jar" />
952            </classpath>
953            <arg value="showversion" />
954            <arg value="i2pupdate.su2" />
955        </java>
956        <!-- will this use the monotonerc file in the current workspace? -->
957        <echo message="Checking out fresh copy into ../i2p-${release.number} for tarballing:" />
958        <delete dir="../i2p-${release.number}" />
959        <exec executable="mtn" failonerror="true">
960            <arg value="co" />
961            <arg value="-b" />
962            <arg value="i2p.i2p" />
963            <!-- w: is the revision of the current workspace -->
964            <arg value="-r" />
965            <arg value="w:" />
966            <arg value="../i2p-${release.number}/" />
967        </exec>
968        <exec executable="tar" failonerror="true">
969            <arg value="cjf" />
970            <arg value="i2psource_${release.number}.tar.bz2" />
971            <arg value="-C" />
972            <arg value=".." />
973            <arg value="--exclude" />
974            <arg value="i2p-${release.number}/_MTN*" />
975            <arg value="i2p-${release.number}/" />
976        </exec>
977        <echo message="Sign the files:" />
978        <delete file="i2pinstall_${release.number}.exe.sig" />
979        <delete file="i2psource_${release.number}.tar.bz2.sig" />
980        <delete file="i2pupdate_${release.number}.zip.sig" />
981        <exec executable="gpg" failonerror="true">
982            <arg value="-b" />
983            <arg value="i2pinstall_${release.number}.exe" />
984        </exec>
985        <exec executable="gpg" failonerror="true">
986            <arg value="-b" />
987            <arg value="i2psource_${release.number}.tar.bz2" />
988        </exec>
989        <exec executable="gpg" failonerror="true">
990            <arg value="-b" />
991            <arg value="i2pupdate_${release.number}.zip" />
992        </exec>
993        <echo message="File sizes:" />
994        <exec executable="ls" failonerror="true">
995            <arg value="-l" />
996            <arg value="i2pinstall_${release.number}.exe" />
997            <arg value="i2psource_${release.number}.tar.bz2" />
998            <arg value="i2pupdate_${release.number}.zip" />
999            <arg value="i2pupdate.su2" />
1000            <arg value="i2pupdate.sud" />
1001            <arg value="i2pinstall_${release.number}.exe.sig" />
1002            <arg value="i2psource_${release.number}.tar.bz2.sig" />
1003            <arg value="i2pupdate_${release.number}.zip.sig" />
1004        </exec>
1005        <echo message="SHA256 sums:" />
1006        <exec executable="sha256sum" failonerror="true">
1007            <arg value="i2pinstall_${release.number}.exe" />
1008            <arg value="i2psource_${release.number}.tar.bz2" />
1009            <arg value="i2pupdate_${release.number}.zip" />
1010            <arg value="i2pupdate.su2" />
1011            <arg value="i2pupdate.sud" />
1012        </exec>
1013        <echo message="Don't forget to mtn tag w: i2p-${release.number}" />
1014        <echo message="... and mtn cert t:i2p-${release.number} branch i2p.i2p.release" />
1015    </target>
1016
1017    <target name="debian" depends="distclean, debian-source, debian-binary" />
1018
1019    <target name="debian-binary" depends="buildProperties" >
1020        <echo message="Did you update the version in these files?" />
1021        <exec executable="ls" failonerror="true">
1022            <arg value="-l" />
1023            <arg value="debian/changelog" />
1024        </exec>
1025        <echo message="====================" />
1026        <!-- bundle the 20MB jetty 5 lib since there probably isn't a deb for it -->
1027        <ant dir="apps/jetty" target="ensureJettylib" />
1028       
1029        <exec dir="debian" executable="./buildpackage.sh" failonerror="true">
1030            <arg value="i386" />
1031        </exec>
1032        <exec dir="debian" executable="./buildpackage.sh" failonerror="true">
1033            <arg value="amd64" />
1034        </exec>
1035    </target>
1036    <target name="debian-source" depends="buildProperties" >
1037        <!-- bundle the 20MB jetty 5 lib since there probably isn't a deb for it -->
1038        <ant dir="apps/jetty" target="ensureJettylib" />
1039        <echo message="Did you update the version in these files?" />
1040        <exec executable="ls" failonerror="true">
1041            <arg value="-l" />
1042            <arg value="debian/changelog" />
1043        </exec>
1044        <echo message="====================" />
1045        <exec dir="debian" executable="./buildpackage.sh" failonerror="true">
1046            <arg value="source" />
1047        </exec>
1048    </target>
1049    <target name="debianrepo" depends="debian">
1050        <exec dir="debian" executable="./makerepo.sh" failonerror="true"/>
1051    </target>
1052
1053<!-- the following are appened to help build barebone portable version,
1054     none of the above is modified for this purpose -->
1055        <target name = "pkg-portable-clean">
1056                <delete dir="build/" />
1057                <delete dir="pkg-temp/" />
1058                <delete>
1059                        <fileset dir="." includes="portable-**.zip**" />
1060                </delete>
1061        </target>
1062<!-- build a portable archive -->
1063
1064<!-- *0* Since we simply pack all files in folder "build/" into our archieve,
1065                we need to make sure its small, with NO redundent jars or wars.
1066                thus cleaning is required before each build-->
1067        <target name="buildSmallOnly" depends="pkg-portable-clean,buildSmall"/>
1068<!-- *1* preparing the jars by OS dependent de-bloating -->
1069        <target name="preppkg-portable-win32-jbigi" depends="buildSmallOnly">
1070                <!-- rip the non-windows stuff out of jbigi.jar -->
1071                <mkdir dir="tmpextract" />
1072                <unjar src="build/jbigi.jar" dest="tmpextract/" />
1073                <jar destfile="build/jbigi.jar" >
1074                        <fileset dir="tmpextract/" includes="*windows*" />
1075                </jar>
1076                <delete dir="tmpextract/" />
1077        </target>
1078        <target name="preppkg-portable-linux-jbigi"  depends="buildSmallOnly">
1079                <!-- rip the non-linux stuff out of jbigi.jar -->
1080                <mkdir dir="tmpextract" />
1081                <unjar src="build/jbigi.jar" dest="tmpextract/" />
1082                <jar destfile="build/jbigi.jar" >
1083                        <fileset dir="tmpextract/" includes="*linux*" />
1084                </jar>
1085                <delete dir="tmpextract/" />
1086        </target>
1087
1088<!-- *2* os independent procedure  -->
1089        <target name="preppkg-portable-basic" >
1090                <mkdir dir="pkg-temp" />
1091                        <!-- non OS dependent configurations only, dont add *nux/win stuff here -->
1092                        <copy todir="pkg-temp">
1093                                <fileset dir="installer/resources/portable/configs/" />
1094                        </copy>
1095                        <copy file="installer/resources/blocklist.txt" todir="pkg-temp/" />
1096                        <copy file="installer/resources/hosts.txt" todir="pkg-temp/" />
1097                        <copy file="installer/resources/readme.license.txt" todir="pkg-temp/" />
1098                <mkdir dir="pkg-temp/addressbook" />
1099                        <copy file="apps/addressbook/subscriptions.txt" todir="pkg-temp/addressbook/" />
1100                        <copy file="apps/addressbook/myhosts.txt"  todir="pkg-temp/addressbook/" />
1101                        <!-- config.txt is in installer/resources/portable -->
1102                <mkdir dir="pkg-temp/docs" />
1103                        <copy file="installer/resources/initialNews.xml" tofile="pkg-temp/docs/news.xml" overwrite="true" />
1104                        <copy file="installer/resources/readme/readme.html" tofile="pkg-temp/docs/readme.html" />
1105                        <copy file="installer/resources/startconsole.html" todir="pkg-temp/docs/" />
1106                        <copy file="installer/resources/start.ico" todir="pkg-temp/docs/" />
1107                        <copy file="installer/resources/console.ico" todir="pkg-temp/docs/" />
1108                        <!-- HTTP Header files, english only,
1109                                if you need a different lang do it in a seperate target -->
1110                        <copy todir="pkg-temp/docs/" >
1111                                <fileset dir="installer/resources/proxy/"  includes="**-header.ht" />
1112                        </copy>
1113                        <!-- Theme light only -->
1114                        <copy todir="pkg-temp/docs/themes/console/light/" overwrite="true" >
1115                                <fileset dir="installer/resources/themes/console/light/" includes="**.css" />
1116                        </copy>
1117                        <copy file="installer/resources/themes/console/light/console_big.css" todir="portable/docs/themes/console/light/" />
1118                        <copy todir="pkg-temp/docs/themes/console/images/" >
1119                                <fileset dir="installer/resources/themes/console/images/" />
1120                        </copy>
1121                        <!-- FLAGs for language icon (not for ip)-->
1122                        <copy todir="pkg-temp/docs/icons/flags" >
1123                                <fileset dir="installer/resources/icons/flags/" includes="cn.png,de.png,fr.png,nl.png,ru.png,se.png,us.png" />
1124                        </copy>
1125                <mkdir dir="pkg-temp/webapps" />
1126                        <copy todir="pkg-temp/webapps/">
1127                                <fileset dir="build/" includes="**.war" />
1128                        </copy>
1129                <mkdir dir="pkg-temp/lib" />
1130                        <copy todir ="pkg-temp/lib/" >
1131                                <fileset dir="build/" includes="**.jar" />
1132                        </copy>
1133                        <!-- 3rd party jars from apps/  -->
1134                                <!-- jrobin - without jobin , you lost graph and get a lot error entry in logs -->
1135                        <copy file="build/jrobin.jar" tofile="pkg-temp/lib/jrobin.jar" />
1136        </target>
1137<!-- *3* os dependent procedure/commands -->
1138        <target name = "preppkg-portable-win32" depends="preppkg-portable-win32-jbigi,preppkg-portable-basic">
1139                        <!-- systray4.j  - why do we need trayicons for portable version ? dependency hardcoded in console -->
1140                <copy file="apps/systray/java/lib/systray4j.dll" todir="pkg-temp/lib" />
1141                <copy file="apps/systray/java/lib/systray4j.jar" todir="pkg-temp/lib" />
1142                        <!--wrapper - dont even think about it. i2p cosumes appreantly more mem without it on win32-->
1143                <copy file="installer/lib/wrapper/win32/wrapper.dll" todir="pkg-temp/lib" />
1144                <copy file="installer/lib/wrapper/win32/wrapper.jar" todir="pkg-temp/lib" />
1145                <copy file="installer/lib/wrapper/win32/I2Psvc.exe" tofile="pkg-temp/i2psvc.ex_" />
1146                        <!--  copy the unpack/start batchfiles -->
1147                <copy todir="pkg-temp">
1148                        <fileset dir="installer/resources/portable/win32/" />
1149                </copy>
1150        </target>
1151<!-- *4* command for windows package -->
1152        <target name = "pkg-portable-win32"     depends="preppkg-portable-win32, pack200" >
1153                <!-- i need the portable\ folder in .zip so basedir is set to . -->
1154                <move file="pkg-temp" tofile="portable"/>
1155                <zip destfile="portable-win32.zip" basedir="." level="9" includes="portable\**" />
1156                <checksum file="portable-win32.zip" forceOverwrite="yes"/>
1157                <move file="portable" tofile="pkg-temp"/>
1158        </target>
1159</project>
Note: See TracBrowser for help on using the repository browser.