source: build.xml @ a02f931

Last change on this file since a02f931 was a02f931, checked in by kytv <kytv@…>, 8 years ago

fix javadoc-test target

  • Property mode set to 100644
File size: 92.1 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<project basedir="." default="all" name="i2p">
3
4    <!-- Include property files so that values can be easily overridden.
5         Users should create an override.properties file to make changes.
6     -->
7    <property file="override.properties"/>
8    <property file="build.properties"/>
9
10    <!-- You probably don't want to change anything from here down -->
11    <target name="help" depends="all" />
12    <target name="all" >
13        <echo message="Useful targets: " />
14        <echo message="  pkg:       distclean then package everything up (updater, installer)" />
15        <echo message="  dist:      pkg and javadoc" />
16        <echo message="  dist200:   pkg, updater200, and javadoc" />
17        <echo message="  installer: build the GUI installer" />
18        <echo message="  installer-freebsd: build the GUI installer (FreeBSD only)" />
19        <echo message="  installer-linux: build the GUI installer (Linux only)" />
20        <echo message="  installer-osx: build the GUI installer (OSX only)" />
21        <echo message="  installer-windows: build the GUI installer (Windows only)" />
22        <echo message="  installer-nowindows: build the GUI installer (all but Windows)" />
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="  updater200WithJavadoc: updater including the javadocs, for display in the console (creates i2pupdate200.zip)" />
28        <echo message="  updaterWithJavadocAndJetty: updater including the javadocs, for display in the console, and Jetty " />
29        <echo message="  updater200WithJavadocAndJetty: updater including the javadocs, for display in the console, and Jetty (creates i2pupdate200.zip)" />
30        <echo message="  updaterWithJetty: Updater including Jetty" />
31        <echo message="  updater200withJetty: Updater including Jetty" />
32        <echo message="  updaterWithJettyFixes: updater including local jetty patches" />
33        <echo message="  updaterWithGeoIP: updater including GeoIP Files" />
34        <echo message="  updaterWithJettyFixesAndGeoIP" />
35        <echo message="  updaterWithJettyFixesAndJbigi" />
36        <echo message="  updaterSmall:   updater with the essentials only - no SAM, i2psnark, SusiMail, SusiDNS, or history.txt" />
37        <echo message="  updaterRouter:  updater with the i2p.jar and router.jar only" />
38        <echo message="  distclean: clean up all derived files" />
39        <!-- <echo message="  syndie:    generate a standalone syndie install" /> -->
40        <echo message="  desktopgui: generate a standalone desktopgui install" />
41        <echo message="  i2psnark:  generate a standalone i2psnark install" />
42        <echo message="  justBOB:  generate a standalone BOB-one.jar" />
43        <echo message="  javadoc:   generate javadoc for the entire project into ./build/javadoc and ./javadoc.zip" />
44        <echo message="  javadoc-test: Javadocs for unit test classes (build/javadoc-test)" />
45        <echo message="  slackpkg:  generate Slackware packages in ./Slackware/i2p and ./Slackware/i2p-base" />
46        <echo message="  debianhowto: instructions on building Debian packages" />
47        <echo message="  debian: generate Debian packages in ../" />
48        <echo message="          run &quot;ant debianhowto&quot; for instructions" />
49        <echo message="  debian-clean: rollback debian specific patches and run the &quot;distclean&quot; target (done automatically at the end of the &quot;debian&quot; target)" />
50        <!-- <echo message="  debianrepo: build a Debian repository (reprepro required)" /> -->
51        <echo message="  poupdate: update the .po files for translators" />
52        <echo message="  pkg-portable-win32:  build a minimum portable version for win32" />
53   </target>
54    <target name="debianhowto">
55            <echo message="To build debian packages, you must make sure that you have" />
56            <echo message="the necessary build-dependencies installed." />
57            <echo message="The packages required to build can be found in the file "/>
58            <echo message="&quot;debian/control&quot; in the &quot;Build-Depends&quot; field."/>
59            <echo message="In addition to those packages, be sure to install &quot;fakeroot&quot;,"/>
60            <echo message="&quot;quilt&quot; and &quot;build-essential&quot;!" />
61            <echo message="" />
62            <echo message="The following command will install all of the dependencies for you:" />
63            <echo message=" " />
64            <echo message="apt-get install debhelper ant debconf default-jdk gettext libgmp3-dev po-debconf fakeroot build-essential \" />
65            <echo message="                   quilt libcommons-logging-java" />
66            <echo message=" " />
67            <echo message="Once the dependencies are installed, run &quot;ant debian&quot;"/>
68            <echo message="to patch the source and build the packages." />
69    </target>
70    <target name="dist" depends="pkg, javadoc" />
71    <target name="dist200" depends="pkg200, javadoc" />
72    <target name="build" depends="build2">
73        <!-- so we don't build standalone for the updater -->
74        <!-- This builds apps/i2psnark/java/i2psnark-standalone.zip,
75          -   which we don't distribute anywhere...
76        <ant dir="apps/i2psnark/java/" target="standalone" />
77        -->
78    </target>
79    <target name="build2" depends="builddep, jar, buildWEB" />
80    <target name="buildSmall" depends="builddepSmall, jarSmall, buildWEB" />
81    <target name="buildclean" depends="distclean, build" />
82
83    <target name="builddep" depends="builddepSmall, buildBOB, buildSAM, buildSusiMail, buildSusiDNS, buildI2PSnark" />
84
85    <target name="builddepSmall" depends="buildrouter, buildSystray, buildDesktopGui, buildRouterConsole, buildStreaming, buildI2PTunnel, buildAddressbook" />
86
87    <!-- start of buildX, one for each sub-build.xml.
88         Do not put ant tasks in the sub-build.xmls anymore,
89         so the build will go faster.
90      -->
91
92    <target name="buildBOB" depends="buildStreaming" >
93        <ant dir="apps/BOB/" target="jar" />
94    </target>
95
96    <target name="buildSAM" depends="buildStreaming" >
97        <ant dir="apps/sam/java/" target="jar" />
98    </target>
99
100    <target name="buildSusiMail" depends="buildCore, buildJetty" >
101        <ant dir="apps/susimail/" target="war" />
102    </target>
103
104    <target name="buildSusiDNS" depends="buildCore, buildJetty" >
105        <ant dir="apps/susidns/src" target="all" />
106    </target>
107
108    <target name="buildI2PSnark" depends="buildStreaming, buildJetty" >
109        <ant dir="apps/i2psnark/java/" target="war" />
110    </target>
111
112    <target name="buildAddressbook" depends="buildCore, buildJetty" >
113        <ant dir="apps/addressbook/" target="war" />
114    </target>
115
116    <!-- jar only (no war) for Android -->
117    <target name="buildI2PTunnelJar" depends="buildStreaming" >
118        <ant dir="apps/i2ptunnel/java/" target="jar" />
119    </target>
120
121    <target name="buildI2PTunnel" depends="buildStreaming, buildJetty" >
122        <ant dir="apps/i2ptunnel/java/" target="build" />
123    </target>
124
125    <target name="buildDesktopGui" depends="buildCore, buildrouter" >
126<!--
127        <ant dir="apps/desktopgui" target="clean" />
128-->
129        <ant dir="apps/desktopgui" target="jar" />
130    </target>
131
132    <target name="buildRouterConsole" depends="buildrouter, buildSystray, buildDesktopGui, buildJetty" >
133        <ant dir="apps/routerconsole/java/" target="jar" />
134    </target>
135
136    <target name="buildJetty" depends="buildCore" >
137        <ant dir="apps/jetty" target="build" />
138    </target>
139
140    <target name="buildSystray" depends="buildCore" >
141        <ant dir="apps/systray/java/" target="jar" />
142    </target>
143
144    <target name="buildStreaming" depends="buildMinistreaming" >
145        <ant dir="apps/streaming/java/" target="jar" />
146    </target>
147
148    <target name="buildMinistreaming" depends="buildCore" >
149        <ant dir="apps/ministreaming/java/" target="jar" />
150    </target>
151
152    <target name="buildRouter" depends="buildrouter" />
153    <target name="buildrouter" depends="buildCore" >
154        <ant dir="router/java/" target="jar" />
155        <copy file="router/java/build/router.jar" todir="build/" />
156    </target>
157
158    <target name="buildCore" depends="buildProperties" >
159        <ant dir="core/java/" target="jar" />
160        <copy file="core/java/build/i2p.jar" todir="build/" />
161    </target>
162
163    <target name="buildJrobin" depends="buildProperties" >
164        <!-- take only what we need from the jrobin jar -->
165        <jar destfile="build/jrobin.jar" >
166            <zipfileset src="apps/jrobin/jrobin-1.5.9.1.jar"
167                        excludes="org/jrobin/cmd/ org/jrobin/convertor/ org/jrobin/inspector/" />
168            <manifest>
169                <attribute name="Built-By" value="${build.built-by}" />
170                <attribute name="Build-Date" value="${build.timestamp}" />
171                <attribute name="Base-Revision" value="${workspace.version}" />
172            </manifest>
173        </jar>
174    </target>
175
176    <target name="checkForMtn" >
177        <available property="mtn.available" file="_MTN" type="dir" />
178    </target>
179
180    <target name="getMtnRev" depends="checkForMtn" if="mtn.available" >
181        <exec executable="mtn" outputproperty="workspace.version" errorproperty="mtn.error1" failifexecutionfails="false" >
182            <arg value="automate" />
183            <arg value="get_base_revision_id" />
184        </exec>
185    </target>
186
187    <target name="trimMtnRev" depends="getMtnRev">
188        <script language="javascript">
189            <![CDATA[
190            var MtnRev = project.getProperty("workspace.version");
191            if (MtnRev != 'unknown' && MtnRev != null) {
192                echo = project.createTask("echo");
193                var MtnShortHash = MtnRev.substring(0,8);
194                project.setProperty("MtnShortHash", MtnShortHash);
195                echo.setMessage("Trimmed hash: " + MtnShortHash);
196                echo.perform();
197            } else {
198                project.setProperty("MtnShortHash", 'unknown');
199            }
200            ]]>
201        </script>
202    </target>
203
204    <target name="buildProperties" depends="getMtnRev, getReleaseNumber, getBuildNumber" >
205        <!-- default if not set above -->
206        <property name="workspace.version" value="unknown" />
207        <tstamp>
208            <format property="build.timestamp" pattern="yyyy-MM-dd HH:mm:ss z" timezone="UTC" locale="en" />
209        </tstamp>
210        <property name="full.version" value="${release.number}-${i2p.build.number}${build.extra}" />
211        <echo message="Building version ${full.version} (mtn rev ${workspace.version})" />
212    </target>
213
214    <!-- end of sub-build.xml targets -->
215
216    <target name="buildWEB" depends="buildRouterConsole" >
217        <copy file="apps/routerconsole/java/build/routerconsole.jar" todir="build/" />
218        <copy file="apps/routerconsole/java/build/routerconsole.war" todir="build/" />
219        <copy todir="build/" >
220            <fileset dir="apps/jetty/jettylib" excludes="ant.jar" />
221        </copy>
222    </target>
223
224    <!-- this makes an empty build/launchi2p.jar and the build/i2p.exe for the no-wrapper windows startup, if possible -->
225    <target name="buildexe">
226        <condition property="noExe">
227            <or>
228                <os arch="ppc" />
229                <os arch="armv5tejl" />
230                <os arch="armv6l" />
231                <os arch="armv7l" />
232            </or>
233        </condition>
234        <condition property="noExe">
235            <not>
236                <or>
237                    <os name="Linux" />
238                    <os family="windows" />
239                </or>
240            </not>
241        </condition>
242        <ant target="doBuildEXE" />
243    </target>
244
245    <target name="launch4j">
246        <taskdef name="launch4j"
247                 classname="net.sf.launch4j.ant.Launch4jTask"
248                 classpath="${basedir}/installer/lib/launch4j/launch4j.jar:${basedir}/installer/lib/launch4j/lib/xstream.jar" />
249     </target>
250
251    <!-- this makes an empty build/launchi2p.jar and the build/i2p.exe for the no-wrapper windows startup -->
252    <target name="doBuildEXE" depends="buildProperties, launch4j" unless="noExe">
253        <echo message="See the file &quot;build.properties&quot; if this step fails." />
254        <jar destfile="./build/launchi2p.jar">
255            <manifest>
256             <attribute name="Main-Class" value="net.i2p.router.RouterLaunch" />
257             <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 lib/i2psnark.jar lib/jrobin.jar lib/jstl.jar lib/standard.jar lib/jetty-i2p.jar lib/jetty-java5-threadpool.jar lib/jetty-rewrite-handler.jar lib/jetty-sslengine.jar lib/jetty-start.jar lib/jetty-util.jar" />
258             <attribute name="Built-By" value="${build.built-by}" />
259             <attribute name="Build-Date" value="${build.timestamp}" />
260             <attribute name="Base-Revision" value="${workspace.version}" />
261            </manifest>
262        </jar>
263        <!-- now the standalone launcher exe -->
264        <launch4j configFile="./installer/i2pstandalone.xml" />
265        <!-- thazzit -->
266    </target>
267
268    <target name="jar" depends="jarSmall" >
269        <copy file="apps/BOB/dist/BOB.jar" todir="build/" />
270        <copy file="apps/sam/java/build/sam.jar" todir="build/" />
271        <copy file="apps/susimail/susimail.war" todir="build/" />
272        <copy file="apps/susidns/src/susidns.war" todir="build/" />
273        <copy file="apps/i2psnark/i2psnark.war" todir="build/" />
274        <copy file="apps/i2psnark/java/build/i2psnark.jar" todir="build/" />
275
276    </target>
277    <target name="jarSmall" depends="builddepSmall, buildJrobin" >
278        <copy file="core/java/build/i2p.jar" todir="build/" />
279        <copy file="router/java/build/router.jar" todir="build/" />
280        <copy file="apps/ministreaming/java/build/mstreaming.jar" todir="build/" />
281        <copy file="apps/streaming/java/build/streaming.jar" todir="build/" />
282        <copy file="apps/i2ptunnel/java/build/i2ptunnel.jar" todir="build/" />
283        <copy file="apps/i2ptunnel/java/build/i2ptunnel.war" todir="build/" />
284        <copy file="apps/systray/java/build/systray.jar" todir="build/" />
285        <copy file="apps/desktopgui/dist/desktopgui.jar" todir="build/" />
286        <copy file="apps/addressbook/dist/addressbook.war" todir="build/" />
287    </target>
288
289    <target name="jbigi-list-changes" depends="checkForMtn" if="mtn.available" >
290        <exec executable="mtn" outputproperty="workspace.changes.jbigi" errorproperty="mtn.error.jbigi" failifexecutionfails="false" >
291            <arg value="list" />
292            <arg value="changed" />
293            <arg value="installer/lib/jbigi" />
294        </exec>
295        <!-- \n in an attribute value generates an invalid manifest -->
296        <exec executable="tr" inputstring="${workspace.changes.jbigi}" outputproperty="workspace.changes.jbigi.tr" errorproperty="mtn.error2" failifexecutionfails="false" >
297            <arg value="-s" />
298            <arg value="&quot;[:space:]&quot;" />
299            <arg value="," />
300        </exec>
301    </target>
302
303    <target name="jbigi" depends="buildProperties, jbigi-list-changes" >
304        <!-- set if unset -->
305        <property name="workspace.changes.jbigi.tr" value="" />
306        <jar destfile="build/jbigi.jar" whenmanifestonly="fail" >
307            <fileset dir="installer/lib/jbigi" includes="*.so *.dll *.jnilib" />
308            <manifest>
309                <attribute name="Built-By" value="${build.built-by}" />
310                <attribute name="Build-Date" value="${build.timestamp}" />
311                <attribute name="Base-Revision" value="${workspace.version}" />
312                <attribute name="Workspace-Changes" value="${workspace.changes.jbigi.tr}" />
313            </manifest>
314        </jar>
315    </target>
316
317    <target name="jbigi-nowindows" depends="buildProperties, jbigi-list-changes" >
318        <!-- set if unset -->
319        <property name="workspace.changes.jbigi.tr" value="" />
320        <jar destfile="build/jbigi.jar" whenmanifestonly="fail" >
321            <fileset dir="installer/lib/jbigi" includes="*.so *.jnilib" />
322            <manifest>
323                <attribute name="Built-By" value="${build.built-by}" />
324                <attribute name="Build-Date" value="${build.timestamp}" />
325                <attribute name="Base-Revision" value="${workspace.version}" />
326                <attribute name="Workspace-Changes" value="${workspace.changes.jbigi.tr}" />
327            </manifest>
328        </jar>
329    </target>
330
331    <!-- Now system-specific jbigis in alphabetical order -->
332    <target name="jbigi-freebsd-only"  depends="buildProperties, jbigi-list-changes" >
333        <!-- set if unset -->
334        <property name="workspace.changes.jbigi.tr" value="" />
335        <jar destfile="build/jbigi.jar"  whenmanifestonly="fail" >
336            <fileset dir="installer/lib/jbigi" includes="*bsd*.so" />
337            <manifest>
338                <attribute name="Built-By" value="${build.built-by}" />
339                <attribute name="Build-Date" value="${build.timestamp}" />
340                <attribute name="Base-Revision" value="${workspace.version}" />
341                <attribute name="Workspace-Changes" value="${workspace.changes.jbigi.tr}" />
342            </manifest>
343        </jar>
344    </target>
345
346    <target name="jbigi-linux-only"  depends="buildProperties, jbigi-list-changes" >
347        <!-- set if unset -->
348        <property name="workspace.changes.jbigi.tr" value="" />
349        <jar destfile="build/jbigi.jar"  whenmanifestonly="fail" >
350            <fileset dir="installer/lib/jbigi" includes="*linux*.so" />
351            <manifest>
352                <attribute name="Built-By" value="${build.built-by}" />
353                <attribute name="Build-Date" value="${build.timestamp}" />
354                <attribute name="Base-Revision" value="${workspace.version}" />
355                <attribute name="Workspace-Changes" value="${workspace.changes.jbigi.tr}" />
356            </manifest>
357        </jar>
358    </target>
359
360    <target name="jbigi-linux-nonx86-only"  depends="buildProperties, jbigi-list-changes" >
361        <!-- set if unset -->
362        <property name="workspace.changes.jbigi.tr" value="" />
363        <jar destfile="build/jbigi.jar"  whenmanifestonly="fail" >
364            <fileset dir="installer/lib/jbigi" includes="*linux-arm*.so,*linux-ppc*.so" />
365            <manifest>
366                <attribute name="Built-By" value="${build.built-by}" />
367                <attribute name="Build-Date" value="${build.timestamp}" />
368                <attribute name="Base-Revision" value="${workspace.version}" />
369                <attribute name="Workspace-Changes" value="${workspace.changes.jbigi.tr}" />
370            </manifest>
371        </jar>
372    </target>
373
374    <target name="jbigi-osx-only"  depends="buildProperties, jbigi-list-changes" >
375        <!-- set if unset -->
376        <property name="workspace.changes.jbigi.tr" value="" />
377        <jar destfile="build/jbigi.jar"  whenmanifestonly="fail" >
378            <fileset dir="installer/lib/jbigi" includes="*.jnilib" />
379            <manifest>
380                <attribute name="Built-By" value="${build.built-by}" />
381                <attribute name="Build-Date" value="${build.timestamp}" />
382                <attribute name="Base-Revision" value="${workspace.version}" />
383                <attribute name="Workspace-Changes" value="${workspace.changes.jbigi.tr}" />
384            </manifest>
385        </jar>
386    </target>
387
388    <target name="jbigi-windows-only" depends="buildProperties, jbigi-list-changes" >
389        <!-- set if unset -->
390        <property name="workspace.changes.jbigi.tr" value="" />
391        <jar destfile="build/jbigi.jar" whenmanifestonly="fail" >
392            <fileset dir="installer/lib/jbigi" includes="*windows*.dll" />
393            <manifest>
394                <attribute name="Built-By" value="${build.built-by}" />
395                <attribute name="Build-Date" value="${build.timestamp}" />
396                <attribute name="Base-Revision" value="${workspace.version}" />
397                <attribute name="Workspace-Changes" value="${workspace.changes.jbigi.tr}" />
398            </manifest>
399        </jar>
400    </target>
401
402    <!-- the apps need to compile the jsps to poupdate -->
403    <target name="poupdate" depends="buildRouter, buildStreaming, buildSystray, buildJetty, buildDesktopGui" >
404        <echo message="Setting environment variable LG2 to a lang code (eg: de,zh,nl etc)" />
405        <echo message=" will restrict language update to the language you specified, leaving other language untact." />
406        <ant dir="apps/routerconsole/java/" target="poupdate" />
407        <ant dir="apps/i2psnark/java/" target="poupdate" />
408        <ant dir="apps/i2ptunnel/java/" target="poupdate" />
409        <ant dir="apps/susidns/src/" target="poupdate" />
410        <ant dir="apps/susimail/" target="poupdate" />
411        <ant dir="apps/desktopgui" target="poupdate" />
412        <ant dir="installer/resources/locale" target="poupdate" />
413    </target>
414
415    <target name="prep-script-translation" >
416        <!-- script translation added in 0.8.13, enabled in 0.9.5. -->
417        <ant dir="installer/resources/locale" target="bundle" />
418        <copy todir="pkg-temp/locale/">
419            <fileset dir="installer/resources/locale/mo/" />
420        </copy>
421    </target>
422
423    <target name="javadoc" depends="getReleaseNumber, getBuildNumber" >
424        <ant dir="apps/jetty" target="ensureJettylib" />
425        <mkdir dir="./build" />
426        <mkdir dir="./build/javadoc" />
427        <javadoc access="package"
428            destdir="./build/javadoc"
429            packagenames="*"
430            use="true"
431            splitindex="true"
432            doctitle="I2P Javadocs for Release ${release.number} Build ${i2p.build.number}${build.extra}"
433            windowtitle="I2P Anonymous Network - Java Documentation - Version ${release.number}">
434            <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.oldcrypto:org.bouncycastle.oldcrypto.*:gnu.crypto.*:gnu.gettext:com.nettgryppa.security:net.metanotion:net.metanotion.*" />
435            <group title="Streaming Library" packages="net.i2p.client.streaming" />
436            <group title="Router" packages="net.i2p.router:net.i2p.router.*:net.i2p.data.i2np:org.cybergarage.*:org.freenetproject:org.xlattice.crypto.filters" />
437            <group title="Router Console" packages="net.i2p.router.web:net.i2p.router.update" />
438            <!-- apps and bridges starting here, alphabetical please -->
439            <group title="Addressbook Application" packages="net.i2p.addressbook" />
440            <group title="BOB Bridge" packages="net.i2p.BOB" />
441            <group title="BOB Demos" packages="net.i2p.BOB.Demos.echo.echoclient:net.i2p.BOB.Demos.echo.echoserver" />
442            <group title="Desktopgui Application" packages="net.i2p.desktopgui:net.i2p.desktopgui.*" />
443            <group title="I2PSnark Application" packages="org.klomp.snark:org.klomp.snark.*:net.i2p.kademlia" />
444            <group title="I2PTunnel Application" packages="net.i2p.i2ptunnel:net.i2p.i2ptunnel.*" />
445            <group title="Installer Utilities" packages="net.i2p.installer" />
446            <group title="Jetty Logging" packages="net.i2p.jetty" />
447            <group title="SAM Bridge" packages="net.i2p.sam" />
448            <group title="SAM Demos" packages="net.i2p.sam.client" />
449            <group title="SusiDNS Application" packages="i2p.susi.dns" />
450            <group title="SusiMail Application" packages="i2p.susi.webmail:i2p.susi.webmail.*:i2p.susi.debug:i2p.susi.util:org.mortbay.servlet:org.mortbay.util" />
451            <group title="Systray Application" packages="net.i2p.apps.systray" />
452            <sourcepath>
453                <pathelement location="core/java/src" />
454                <pathelement location="router/java/src" />
455                <pathelement location="apps/ministreaming/java/src" />
456                <pathelement location="apps/streaming/java/src" />
457                <pathelement location="apps/i2ptunnel/java/src" />
458                <pathelement location="apps/systray/java/src" />
459                <pathelement location="apps/desktopgui/src" />
460                <pathelement location="apps/routerconsole/java/src" />
461                <pathelement location="apps/addressbook/java/src" />
462                <pathelement location="apps/i2psnark/java/src" />
463                <pathelement location="apps/sam/java/src" />
464                <pathelement location="apps/BOB/src" />
465                <pathelement location="apps/BOB/Demos/echo/echoclient/src" />
466                <pathelement location="apps/BOB/Demos/echo/echoserver/src" />
467                <pathelement location="apps/susidns/src/java/src" />
468                <pathelement location="apps/susimail/src/src" />
469                <pathelement location="apps/jetty/java/src" />
470                <pathelement location="installer/java/src" />
471            </sourcepath>
472            <classpath>
473                <pathelement location="apps/jetty/jettylib/org.mortbay.jetty.jar" />
474                <pathelement location="apps/jetty/jettylib/javax.servlet.jar" />
475                <pathelement location="apps/jetty/jettylib/jetty-sslengine.jar" />
476                <pathelement location="apps/jetty/jettylib/jetty-start.jar" />
477                <pathelement location="apps/jetty/jettylib/jetty-java5-threadpool.jar" />
478                <pathelement location="apps/jetty/jettylib/jetty-util.jar" />
479                <pathelement location="apps/jetty/jettylib/jsp-api.jar" />
480                <pathelement location="apps/systray/java/lib/systray4j.jar" />
481                <pathelement location="apps/jrobin/jrobin-1.5.9.1.jar" />
482                <pathelement location="installer/lib/wrapper/all/wrapper.jar" />
483            </classpath>
484            <!-- These variables are stored in build.properties.
485                 End-users can override by creating the file override.properties -->
486            <link offline="true" href="${javasedocs.url}" packagelistLoc="installer/resources/package-lists/java/" />
487            <link offline="true" href="${javaeedocs.url}" packagelistLoc="installer/resources/package-lists/javaee/" />
488            <link offline="true" href="${jettydocs.url}" packagelistLoc="installer/resources/package-lists/jetty/" />
489            <link offline="true" href="${jrobindocs.url}" packagelistLoc="installer/resources/package-lists/jrobin/" />
490            <link offline="true" href="${wrapperdocs.url}" packagelistLoc="installer/resources/package-lists/wrapper/" />
491        </javadoc>
492        <echo message="Warning, javadoc embeds timestamps in the output, run with 'TZ=UTC ant javadoc' if you plan to distribute" />
493        <zip destfile="javadoc.zip" basedir="build" level="9" includes="javadoc\**" />
494    </target>
495
496    <target name="javadoc-test" depends="buildRouter, javadoc" >
497        <mkdir dir="./build" />
498        <mkdir dir="./build/javadoc-test" />
499
500        <!-- set junit home to the old default unless overridden elsewhere -->
501        <property name="junit.home" value="${ant.home}/lib/" />
502        <javadoc access="package"
503            destdir="./build/javadoc-test"
504            packagenames="*"
505            use="true"
506            splitindex="true"
507            doctitle="I2P Unit Test Javadocs for Release ${release.number} Build ${i2p.build.number}${build.extra}"
508            windowtitle="I2P Anonymous Network - Java Documentation - Version ${release.number}">
509            <group title="Core SDK" packages="net.i2p:net.i2p.*:net.i2p.client:net.i2p.client.*:net.i2p.internal:net.i2p.internal.*:freenet.support.CPUInformation:org.bouncycastle.oldcrypto:org.bouncycastle.oldcrypto.*:gnu.crypto.*:gnu.gettext:org:com.nettgryppa.security:net.metanotion:net.metanotion.*" />
510            <group title="Router" packages="net.i2p.router:net.i2p.router.*:net.i2p.data.i2np:org.cybergarage.*:org.freenetproject:org.xlattice.crypto.filters" />
511            <sourcepath>
512                <pathelement location="core/java/test/junit" />
513                <pathelement location="router/java/test/junit" />
514                <pathelement location="core/java/test/scalatest" />
515            </sourcepath>
516            <classpath>
517                <pathelement location="build/i2p.jar" />
518                <pathelement location="build/router.jar" />
519                <pathelement location="${junit.home}/junit4.jar" />
520            </classpath>
521            <!-- These variables are stored in build.properties.
522         End-users can override by creating the file override.properties -->
523            <link offline="true" href="${javasedocs.url}" packagelistLoc="installer/resources/package-lists/java/" />
524            <link offline="true" href="${junitdocs.url}" packagelistLoc="installer/resources/package-lists/junit/" />
525            <link offline="true" href="${i2pdocs.url}" packagelistLoc="build/javadoc/" />
526        </javadoc>
527        <echo message="Warning, javadoc embeds timestamps in the output, run with 'TZ=UTC ant javadoc' if you plan to distribute" />
528    </target>
529
530    <target name="getReleaseNumber">
531        <loadfile srcfile="core/java/src/net/i2p/CoreVersion.java" property="release.number">
532            <filterchain>
533                <linecontains>
534                    <contains value="public final static String VERSION"/>
535                </linecontains>
536                <tokenfilter>
537                    <replaceregex pattern=".*&quot;(.*)&quot;;" replace="\1" flags="gi" />
538                </tokenfilter>
539                <striplinebreaks/>
540                <trim/>
541                <ignoreblank/>
542            </filterchain>
543        </loadfile>
544        <property name="release.number" value="unknown" />
545        <echo message="Release number is ${release.number}" />
546    </target>
547
548    <target name="getBuildNumber">
549        <loadfile srcfile="router/java/src/net/i2p/router/RouterVersion.java" property="i2p.build.number">
550            <filterchain>
551                <linecontains>
552                    <contains value="public final static long BUILD" />
553                </linecontains>
554                <tokenfilter>
555                    <replaceregex pattern=".*=\s+([0-9]+);" replace="\1" flags="gi" />
556                </tokenfilter>
557                <striplinebreaks/>
558                <trim/>
559                <ignoreblank/>
560            </filterchain>
561        </loadfile>
562        <loadfile srcfile="router/java/src/net/i2p/router/RouterVersion.java" property="build.extra">
563            <filterchain>
564                <linecontains>
565                    <contains value="public final static String EXTRA" />
566                </linecontains>
567                <tokenfilter>
568                    <replaceregex pattern=".*&quot;(.*)&quot;;" replace="\1" flags="gi" />
569                </tokenfilter>
570                <striplinebreaks/>
571                <ignoreblank/>
572                <trim/>
573            </filterchain>
574        </loadfile>
575        <property name="i2p.build.number" value="??" />
576        <property name="build.extra" value="" />
577        <echo message="Build number is ${i2p.build.number}${build.extra}" />
578    </target>
579
580    <target name="verifyReleaseBuildNumbers" depends="getReleaseNumber, getBuildNumber" >
581        <echo message="SDK: ${java.vendor} ${java.version} (${java.runtime.name} ${java.runtime.version})" />
582        <fail message="Bad release number: ${release.number}" >
583            <condition>
584                <or>
585                    <equals arg1="${release.number}" arg2="unknown"/>
586                    <equals arg1="${release.number}" arg2=""/>
587                </or>
588            </condition>
589        </fail>
590        <fail message="Non-zero build number: ${i2p.build.number}" >
591            <condition>
592                <not>
593                    <equals arg1="${i2p.build.number}" arg2="0"/>
594                </not>
595            </condition>
596        </fail>
597        <fail message="Non-empty extra build: ${build.extra}" >
598            <condition>
599                <not>
600                    <equals arg1="${build.extra}" arg2=""/>
601                </not>
602            </condition>
603        </fail>
604    </target>
605
606    <target name="clean" depends="pkgclean" >
607        <delete dir="./build" />
608        <delete dir="./reports" />
609        <delete file="installer/lib/izpack/patches.jar" failonerror="false" quiet="true" />
610        <delete file="syndie-standalone.zip" failonerror="false" quiet="true" />
611        <delete failonerror="false" quiet="true">
612            <fileset dir="." includes="i2pinstall*jar i2p*deb libjbigi*deb i2p.fba ${sloccount.report.file} javadoc.zip i2pinstall*.exe i2pinstall*bz2" />
613        </delete>
614        <delete file="i2psnark-standalone.zip" failonerror="false" quiet="true" />
615        <delete file="BOB-one.jar" failonerror="false" quiet="true" />
616        <delete dir="debian/tmp" />
617        <delete dir="debian/db" />
618        <delete file="debian/files" />
619        <delete file="debian/build" />
620        <delete file="debian/substvars"/>
621        <delete file="core/java/cobertura.ser"/>
622    </target>
623
624    <target name="distclean" depends="clean">
625        <delete includeemptydirs="true" failonerror="false" >
626            <fileset dir="debian/packages" followSymlinks="false" />
627        </delete>
628        <delete dir="debian/repo" />
629        <ant dir="core/java/" target="distclean" />
630        <ant dir="router/java/" target="distclean" />
631        <ant dir="installer/java" target="distclean" />
632        <ant dir="apps/ministreaming/java/" target="distclean" />
633        <ant dir="apps/streaming/java/" target="distclean" />
634        <ant dir="apps/i2ptunnel/java/" target="distclean" />
635        <ant dir="apps/sam/java/" target="distclean" />
636        <ant dir="apps/BOB" target="clean" />
637        <ant dir="apps/desktopgui" target="clean" />
638        <ant dir="apps/routerconsole/java/" target="distclean" />
639        <ant dir="apps/addressbook/" target="distclean" />
640        <ant dir="apps/susimail/" target="distclean" />
641        <ant dir="apps/susidns/src/" target="distclean" />
642        <ant dir="apps/systray/java/" target="distclean" />
643        <ant dir="apps/i2psnark/java/" target="distclean" />
644        <ant dir="apps/jetty/" target="distclean" />
645        <delete dir="core/c/jbigi/bin" />
646        <delete dir="core/c/jbigi/lib" />
647        <delete dir="core/c/jcpuid/lib" />
648        <ant dir="installer/resources/locale" target="distclean" />
649        <!--
650                NOTE! We need to turn off the default excludes for these
651                patterns to work.
652                These are the defaultexcludes in Ant as seen on
653                http://ant.apache.org/manual/CoreTasks/defaultexcludes.html
654                     **/*~
655                     **/#*#
656                     **/.#*
657                     **/%*%
658                     **/._*
659                     **/CVS
660                     **/CVS/**
661                     **/.cvsignore
662                     **/SCCS
663                     **/SCCS/**
664                     **/vssver.scc
665                     **/.svn
666                     **/.svn/**
667                     **/.DS_Store
668                The only recourse is to remove the offending ones.
669                We do this here, as we only need one change, and then put it
670                back after we are done with it.
671        -->
672        <defaultexcludes remove="**/*~"/>
673
674        <delete>
675            <fileset dir="." includes="**/*.class **/*.java~ **/*.txt~ **/*.xml~ **/*.sh~ **/*.SlackBuild~" />
676            <!--
677                Less common, but they pollute my workspace here, so we
678                might as well nuke these as well. Are there any others?
679               
680                !!??? Why don't we just nuke "**/*~" ???!!
681
682                ++Sponge
683            -->
684        </delete>
685        <!--
686                Now we put the defaults back
687        -->
688        <defaultexcludes default="true"/>
689    </target>
690
691    <target name="webappDistclean">
692        <ant dir="apps/i2ptunnel/java/" target="distclean" />
693        <ant dir="apps/routerconsole/java/" target="distclean" />
694        <ant dir="apps/addressbook/" target="distclean" />
695        <ant dir="apps/susimail/" target="distclean" />
696        <ant dir="apps/susidns/src/" target="distclean" />
697        <ant dir="apps/i2psnark/java/" target="distclean" />
698    </target>
699
700    <target name="pkg" depends="distclean, updater, preppkg, installer" />
701
702    <target name="pkg200" depends="distclean, updater200, preppkg, installer" />
703
704    <target name="pkgclean" depends="deletepkg-temp">
705        <delete>
706            <fileset dir="." includes="i2p.tar.bz2 install.jar i2pupdate.zip i2pupdate200.zip" />
707        </delete>
708    </target>
709
710    <target name="preppkg" depends="preppkg-linux, preppkg-freebsd, preppkg-osx, preppkg-windows, jbigi">
711        <copy file="build/jbigi.jar" todir="pkg-temp/lib" />
712        <copy todir="pkg-temp/lib/wrapper/solaris/">
713            <fileset dir="installer/lib/wrapper/solaris/" excludes="*.txt" />
714        </copy>
715    </target>
716
717    <target name="preppkg-nowindows" depends="preppkg-linux, preppkg-freebsd, preppkg-osx, jbigi-nowindows">
718        <copy file="build/jbigi.jar" todir="pkg-temp/lib" />
719        <copy todir="pkg-temp/lib/wrapper/solaris/">
720            <fileset dir="installer/lib/wrapper/solaris/" excludes="*.txt" />
721        </copy>
722        <copy file="installer/lib/wrapper/all/wrapper.jar" todir="pkg-temp/lib" />
723    </target>
724
725    <target name="preppkgRepack" depends="preppkg-linux, preppkg-freebsd, preppkg-osx, preppkg-windows, jbigi">
726        <ant target="repack200" />
727        <!-- no use doing repack200 on jbigi.jar -->
728        <copy file="build/jbigi.jar" todir="pkg-temp/lib" />
729        <copy todir="pkg-temp/lib/wrapper/solaris/">
730            <fileset dir="installer/lib/wrapper/solaris/" excludes="*.txt" />
731        </copy>
732    </target>
733
734    <target name="preppkg-freebsd" depends="preppkg-unix">
735        <copy todir="pkg-temp/lib/wrapper/freebsd/">
736            <fileset dir="installer/lib/wrapper/freebsd/" excludes="*.txt" />
737        </copy>
738        <copy todir="pkg-temp/lib/wrapper/freebsd64/">
739            <fileset dir="installer/lib/wrapper/freebsd64" excludes="*.txt" />
740        </copy>
741    </target>
742
743    <target name="preppkg-freebsd-only" depends="preppkg-freebsd, jbigi-freebsd-only" >
744        <copy file="build/jbigi.jar" todir="pkg-temp/lib" />
745        <copy file="installer/lib/wrapper/all/wrapper.jar" todir="pkg-temp/lib" />
746    </target>
747
748    <!-- only what is needed for debian, etc. -->
749    <target name="preppkg-linux-only" depends="preppkg-linux, jbigi-linux-only" >
750        <copy file="build/jbigi.jar" todir="pkg-temp/lib" />
751        <copy file="installer/lib/wrapper/all/wrapper.jar" todir="pkg-temp/lib" />
752    </target>
753
754    <target name="preppkg-unix" depends="preppkg-base, prep-script-translation" >
755        <copy file="installer/resources/runplain.sh" todir="pkg-temp/" />
756        <copy file="installer/resources/eepget" todir="pkg-temp/" />
757        <copy file="installer/resources/i2prouter" todir="pkg-temp/" />
758        <copy file="installer/resources/osid" todir="pkg-temp/" />
759        <copy file="installer/resources/postinstall.sh" todir="pkg-temp/" />
760        <copy todir="pkg-temp/man/">
761            <fileset dir="installer/resources/man/" />
762        </copy>
763    </target>
764
765    <target name="preppkg-linux" depends="preppkg-linux-x86,preppkg-linux-nonx86" />
766
767    <target name="preppkg-linux-x86" depends="preppkg-unix">
768        <copy todir="pkg-temp/lib/wrapper/linux/">
769            <fileset dir="installer/lib/wrapper/linux/" excludes="*.txt" />
770        </copy>
771        <copy todir="pkg-temp/lib/wrapper/linux64/">
772            <fileset dir="installer/lib/wrapper/linux64/" excludes="*.txt" />
773        </copy>
774    </target>
775
776    <target name="preppkg-linux-nonx86" depends="preppkg-unix">
777        <copy todir="pkg-temp/lib/wrapper/linux-ppc/">
778            <fileset dir="installer/lib/wrapper/linux-ppc/" excludes="*.txt" />
779        </copy>
780        <copy todir="pkg-temp/lib/wrapper/linux-armv5/">
781            <fileset dir="installer/lib/wrapper/linux-armv5/" excludes="*.txt" />
782        </copy>
783        <copy todir="pkg-temp/lib/wrapper/linux-armv6/">
784            <fileset dir="installer/lib/wrapper/linux-armv6/" excludes="*.txt" />
785        </copy>
786    </target>
787
788    <target name="preppkg-osx" depends="preppkg-unix">
789        <!--<copy file="installer/resources/I2P Router Console.webloc" todir="pkg-temp/" />-->
790        <copy todir="pkg-temp/Start I2P Router.app">
791            <fileset dir="installer/resources/Start I2P Router.app" />
792        </copy>
793        <copy todir="pkg-temp/lib/wrapper/macosx/">
794            <fileset dir="installer/lib/wrapper/macosx/" excludes="*.txt" />
795        </copy>
796        <copy file="installer/resources/net.i2p.router.plist.template" todir="pkg-temp/" />
797        <copy file="installer/resources/install_i2p_service_osx.command" todir="pkg-temp/" />
798        <copy file="installer/resources/uninstall_i2p_service_osx.command" todir="pkg-temp/" />
799    </target>
800
801    <target name="preppkg-osx-only" depends="preppkg-osx, jbigi-osx-only" >
802        <copy file="build/jbigi.jar" todir="pkg-temp/lib" />
803        <copy file="installer/lib/wrapper/all/wrapper.jar" todir="pkg-temp/lib" />
804    </target>
805
806    <target name="preppkg-windows" depends="preppkg-base, buildUtilityJar, buildexe">
807        <copy file="build/i2p.exe" todir="pkg-temp/" failonerror="false" />
808        <copy file="apps/systray/java/lib/systray4j.dll" todir="pkg-temp/lib" />
809        <copy file="apps/systray/java/resources/iggy.ico" todir="pkg-temp/icons" />
810        <copy file="apps/systray/java/resources/iggy.xpm" todir="pkg-temp/icons" />
811        <copy file="installer/resources/eepget.bat" todir="pkg-temp/" />
812        <copy file="installer/resources/i2prouter.bat" todir="pkg-temp/" />
813        <copy file="installer/resources/fixperms.bat" todir="pkg-temp/" />
814        <copy file="installer/resources/install_i2p_service_winnt.bat" todir="pkg-temp/" />
815        <copy file="installer/resources/set_config_dir_for_nt_service.bat" todir="pkg-temp/" />
816        <copy file="installer/resources/uninstall_i2p_service_winnt.bat" todir="pkg-temp/" />
817        <copy file="installer/lib/wrapper/all/wrapper.jar" todir="pkg-temp/lib" />
818        <copy file="build/utility.jar" todir="pkg-temp" />
819        <copy todir="pkg-temp/lib/wrapper/win32/">
820            <fileset dir="installer/lib/wrapper/win32/" excludes="*.txt" />
821        </copy>
822        <copy todir="pkg-temp/lib/wrapper/win64/">
823            <fileset dir="installer/lib/wrapper/win64/" excludes="*.txt" />
824        </copy>
825    </target>
826
827    <target name="preppkg-windows-only" depends="preppkg-windows, jbigi-windows-only">
828        <copy file="build/jbigi.jar" todir="pkg-temp/lib" />
829        <copy file="installer/lib/wrapper/all/wrapper.jar" todir="pkg-temp/lib" />
830    </target>
831
832    <target name="preppkg-base" depends="build, preplicenses, prepConsoleDocs, prepthemeupdates, prepCertificates">
833        <!-- if updater200 was run previously, it left *.pack files in pkg-temp -->
834        <!-- Also remove deletelist.txt used for updater only -->
835        <delete>
836            <fileset dir="pkg-temp" includes="**/*.jar.pack **/*.war.pack deletelist.txt" />
837        </delete>
838        <copy file="build/i2p.jar" todir="pkg-temp/lib/" />
839        <copy file="build/i2ptunnel.jar" todir="pkg-temp/lib/" />
840        <!-- all jetty stuff -->
841        <copy todir="pkg-temp/lib" >
842            <fileset dir="build" includes="commons*.jar jasper*.jar javax*.jar jetty*.jar jsp*.jar org.mortbay.*.jar" />
843        </copy>
844        <copy file="build/mstreaming.jar" todir="pkg-temp/lib/" />
845        <copy file="build/streaming.jar" todir="pkg-temp/lib/" />
846        <copy file="build/router.jar" todir="pkg-temp/lib/" />
847        <copy file="build/desktopgui.jar" todir="pkg-temp/lib/" />
848        <copy file="build/routerconsole.jar" todir="pkg-temp/lib/" />
849        <!-- pulled out of routerconsole.jar in 0.7.12; name without version so we can overwrite if we upgrade  -->
850        <copy file="build/jrobin.jar" tofile="pkg-temp/lib/jrobin.jar" />
851        <copy file="build/sam.jar" todir="pkg-temp/lib/" />
852        <copy file="build/BOB.jar" todir="pkg-temp/lib/" />
853        <copy file="build/systray.jar" todir="pkg-temp/lib" />
854        <copy file="build/i2psnark.jar" todir="pkg-temp/lib/" />
855        <copy file="apps/systray/java/lib/systray4j.jar" todir="pkg-temp/lib" />
856        <copy file="build/i2ptunnel.war" todir="pkg-temp/webapps/" />
857        <copy file="build/routerconsole.war" todir="pkg-temp/webapps/" />
858        <copy file="build/addressbook.war" todir="pkg-temp/webapps/" />
859        <copy file="build/susimail.war" todir="pkg-temp/webapps/" />
860        <copy file="build/susidns.war" todir="pkg-temp/webapps/" />
861        <copy file="apps/susidns/src/WEB-INF/lib/jstl.jar" todir="pkg-temp/lib/" />
862        <copy file="apps/susidns/src/WEB-INF/lib/standard.jar" todir="pkg-temp/lib/" />
863        <copy file="build/i2psnark.war" todir="pkg-temp/webapps/" />
864        <!--
865             Disabling per zzz's statement on IRC: jetty-i2psnark.xml is for an obscure feature that is broken anyway,
866                                                   you can remove the file, the link, and the patch from the package
867
868                     So I'm going one further: I'm disabling it in build.xml
869                     +++kytv
870                     -->
871        <!--
872        <copy file="apps/i2psnark/jetty-i2psnark.xml" todir="pkg-temp/" />
873        -->
874        <copy file="apps/i2psnark/i2psnark.config" todir="pkg-temp/" />
875        <copy file="installer/resources/blocklist.txt" todir="pkg-temp/" />
876        <copy file="installer/resources/clients.config" todir="pkg-temp/" />
877        <copy file="installer/resources/i2ptunnel.config" todir="pkg-temp/" />
878        <copy file="installer/resources/systray.config" todir="pkg-temp/" />
879        <copy file="installer/resources/wrapper.config" todir="pkg-temp/" />
880        <copy file="installer/resources/hosts.txt" todir="pkg-temp/" />
881        <copy file="INSTALL-headless.txt" todir="pkg-temp/" />
882        <!-- overwrite the truncated history put in by the updater -->
883        <copy file="history.txt" todir="pkg-temp/" overwrite="true" />
884        <mkdir dir="pkg-temp/scripts" />
885        <copy file="apps/proxyscript/i2pProxy.pac" todir="pkg-temp/scripts/" />
886        <copy file="installer/resources/startconsole.html" todir="pkg-temp/docs/" />
887        <copy file="installer/resources/start.ico" todir="pkg-temp/docs/" />
888        <copy file="installer/resources/console.ico" todir="pkg-temp/docs/" />
889        <copy file="installer/resources/uninstall.ico" todir="pkg-temp/docs/" />
890        <!-- Eepsite stuff here -->
891        <mkdir dir="pkg-temp/eepsite" />
892        <copy todir="pkg-temp/eepsite/" >
893            <fileset dir="installer/resources/eepsite/" excludes="**/.placeholder" />
894        </copy>
895        <copy todir="pkg-temp/eepsite/docroot/help/lib/" >
896            <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" />
897        </copy>
898        <copy file="installer/resources/themes/console/images/favicon.ico" tofile="pkg-temp/eepsite/docroot/favicon.ico" />
899    </target>
900
901    <target name="preplicenses">
902        <copy file="LICENSE.txt" todir="pkg-temp/" />
903        <copy todir="pkg-temp/licenses/" >
904          <fileset dir="licenses/" />
905        </copy>
906        <!--
907              The license in launch4j/ is a BSD license for launch4j
908              The license in launch4j/head is a MIT license for the code that is actually wrapped around the jars
909              So we include the MIT one in our binary package
910         -->
911        <copy file="installer/lib/launch4j/head/LICENSE.txt" tofile="pkg-temp/licenses/LICENSE-Launch4j.txt" />
912        <copy file="apps/jetty/apache-tomcat-deployer/NOTICE" tofile="pkg-temp/licenses/NOTICE-Tomcat.txt" />
913        <!--  Not sure if these are used or should be included -->
914        <copy file="installer/lib/launch4j/lib/foxtrot.LICENSE.txt" tofile="pkg-temp/licenses/LICENSE-Foxtrot.txt" />
915        <copy file="installer/lib/launch4j/lib/JGoodies.Forms.LICENSE.txt" tofile="pkg-temp/licenses/LICENSE-JGoodies-Forms.txt" />
916        <copy file="installer/lib/launch4j/lib/JGoodies.Looks.LICENSE.txt" tofile="pkg-temp/licenses/LICENSE-JGoodies-Looks.txt" />
917        <copy file="installer/lib/launch4j/lib/XStream.LICENSE.txt" tofile="pkg-temp/licenses/LICENSE-XStream.txt" />
918    </target>
919
920    <target name="prepthemeupdates">
921        <copy todir="pkg-temp/docs/themes/" >
922            <fileset dir="installer/resources/themes/" />
923        </copy>
924    </target>
925
926    <!-- SSL Certs -->
927    <target name="prepCertificates">
928        <copy todir="pkg-temp/certificates/" >
929          <fileset dir="installer/resources/certificates/" />
930        </copy>
931    </target>
932
933    <!-- this is no longer required, izpack 4.3.0 supports headless installs with java -jar i2pinstall.exe -console -->
934    <target name="tarball" depends="preppkg">
935        <tar compression="bzip2" destfile="i2p.tar.bz2">
936            <tarfileset dir="pkg-temp" includes="**/*" prefix="i2p" />
937        </tar>
938    </target>
939
940    <target name="deletepkg-temp">
941        <delete dir="pkg-temp" />
942    </target>
943
944    <!-- readme and proxy error page files, initialNews.xml files, GeoIP files, and flag icons -->
945    <target name="prepConsoleDocs" depends="prepConsoleDocUpdates, prepgeoupdate" >
946        <copy todir="pkg-temp/docs/initialNews/">
947          <fileset dir="installer/resources/initialNews/" />
948        </copy>
949        <!-- ensure the proxy files have the correct line endings -->
950        <fixcrlf srcdir="pkg-temp/docs" includes="*.ht" encoding="utf8" eol="crlf" />
951    </target>
952
953    <!-- readme and proxy error page files -->
954    <target name="prepConsoleDocUpdates">
955        <copy todir="pkg-temp/docs/" >
956          <fileset dir="installer/resources/readme/" includes="readme*.html" />
957          <fileset dir="installer/resources/proxy/" includes="*.ht" />
958          <!-- lang_ar.png added in 0.8.4; a1,a2,je, and eu.png added in 0.8.9; gg.png added in 0.8.10; im.png added in 0.8.12; -->
959          <fileset dir="installer/resources/" includes="icons/flags/lang_ar.png icons/flags/gg.png icons/flags/je.png icons/flags/eu.png icons/flags/im.png icons/flags/a1.png icons/flags/a2.png" />
960        </copy>
961    </target>
962
963    <target name="consoleDocs" depends="deletepkg-temp, prepConsoleDocs">
964        <zip destfile="docs.zip" basedir="pkg-temp" whenempty="fail" />
965    </target>
966
967    <target name="copyJavadoc" depends="javadoc">
968        <copy todir="pkg-temp/docs/javadoc" >
969          <fileset dir="build/javadoc/" />
970        </copy>
971    </target>
972
973    <target name="updater200" depends="prepupdate, preplicenses, pack200, zipit200" />
974    <target name="updater200WithJetty" depends="prepjupdate, preplicenses, pack200, zipit200" />
975    <target name="updater200WithJettyFixes" depends="prepjupdatefixes, preplicenses, pack200, zipit200" />
976    <target name="updater200WithJettyFixesAndJbigi" depends="prepjupdatefixes, prepjbigiupdate, preplicenses, pack200, zipit200" />
977    <target name="updater" depends="prepupdate, preplicenses, zipit" />
978    <target name="updaterRepack" depends="prepupdate, preplicenses, repack200, zipit" />
979    <target name="updaterWithJavadoc" depends="prepupdate, preplicenses, copyJavadoc, zipit" />
980    <target name="updater200WithJavadoc" depends="prepupdate, preplicenses, copyJavadoc, pack200, zipit200" />
981    <target name="updaterWithJavadocAndJetty" depends="prepjupdate, preplicenses, copyJavadoc, zipit" />
982    <target name="updater200WithJavadocAndJetty" depends="prepjupdate, preplicenses, copyJavadoc, pack200, zipit200" />
983    <target name="updaterWithGeoIP" depends="prepupdate, prepgeoupdate, preplicenses, zipit" />
984    <target name="updaterWithJetty" depends="prepjupdate, preplicenses, zipit" />
985    <target name="updaterWithJettyRepack" depends="prepjupdate, preplicenses, repack200, zipit" />
986    <target name="updaterWithJettyFixes" depends="prepjupdatefixes, preplicenses, zipit" />
987    <target name="updaterWithJettyFixesAndJbigi" depends="prepjupdatefixes, prepjbigiupdate, preplicenses, zipit" />
988    <target name="updaterWithJettyFixesAndGeoIP" depends="prepjupdatefixes, prepgeoupdate, preplicenses, zipit" />
989    <target name="updaterSmall" depends="prepupdateSmall, zipit" />
990    <target name="updaterRouter" depends="prepupdateRouter, zipit" />
991
992    <target name="zipit" depends="getReleaseNumber" >
993        <!--
994             As of release 0.8.8, the router will enforce a zipfile comment equal to the
995             version number in the sud/su2 header, since the version in the header is NOT
996             covered by the signature.
997         -->
998        <zip destfile="i2pupdate.zip" basedir="pkg-temp" whenempty="fail" comment="${release.number}" />
999       <!-- just a test, makes almost no difference
1000        <tar destfile="i2pupdate.tgz" basedir="pkg-temp" compression="gzip" />
1001        <tar destfile="i2pupdate.tbz" basedir="pkg-temp" compression="bzip2" />
1002       -->
1003    </target>
1004
1005    <target name="zipit200" depends="getReleaseNumber" >
1006        <zip destfile="i2pupdate200.zip" basedir="pkg-temp" whenempty="fail" comment="${release.number}" />
1007    </target>
1008
1009    <target name="pack200">
1010        <!-- pack200 will only pack to a .pack file, and only from a .jar file, so we put another .jar on the end -->
1011        <!-- can't pack an empty jar or one without classes, it will fail to unpack on Java 5;
1012          -  see http://bugs.sun.com/view_bug.do?bug_id=6712743
1013          -->
1014        <!-- *nix here -->
1015        <exec executable="sh" osfamily="unix" failonerror="true">
1016            <arg value="-c" />
1017            <arg value="for i in pkg-temp/lib/*.jar pkg-temp/webapps/*war; do if [ $i = pkg-temp/lib/jasper-compiler.jar -o $i = pkg-temp/lib/jbigi.jar ]; then continue; fi; echo pack200 $i; mv $i $i.jar; pack200 -g $i.pack $i.jar; rm -f $i.jar; done" />
1018        </exec>
1019        <exec executable="sh" osfamily="mac" failonerror="true">
1020            <arg value="-c" />
1021            <arg value="for i in pkg-temp/lib/*.jar pkg-temp/webapps/*war; do if [ $i = pkg-temp/lib/jasper-compiler.jar -o $i = pkg-temp/lib/jbigi.jar ]; then continue; fi; echo pack200 $i; mv $i $i.jar; pack200 -g $i.pack $i.jar; rm -f $i.jar; done" />
1022        </exec>
1023        <!-- windoz here : i admit, i hate escaped symbols in xml, indeed = =! -->
1024        <exec executable="cmd" osfamily="windows" failonerror="true">
1025            <arg value="/c" />
1026            <!-- TODO implement fix above -->
1027            <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" />
1028        </exec>
1029        <exec executable="cmd" osfamily="windows" failonerror="true">
1030                <arg value="/c" />
1031                <arg value="for %i in (pkg-temp\lib\*.jar) do pack200 -g %i.pack %i &amp;&amp; del %i" />
1032        </exec>
1033    </target>
1034
1035    <!-- saves about 1% on average (more on jars with multiple compiled po files since they have lots of common strings) -->
1036    <target name="repack200">
1037        <!-- pack200 will only repack a .jar file, so we put another .jar on the end -->
1038        <!-- *nix here -->
1039        <exec executable="sh" osfamily="unix" failonerror="true">
1040            <arg value="-c" />
1041            <arg value="for i in pkg-temp/lib/*.jar pkg-temp/webapps/*war; do echo pack200 -r $i; mv $i $i.jar; pack200 -r $i.jar; mv $i.jar $i; done" />
1042        </exec>
1043        <exec executable="sh" osfamily="mac" failonerror="true">
1044            <arg value="-c" />
1045            <arg value="for i in pkg-temp/lib/*.jar pkg-temp/webapps/*war; do echo pack200 -r $i; mv $i $i.jar; pack200 -r $i.jar; mv $i.jar $i; done" />
1046        </exec>
1047        <!-- windoz here : i admit, i hate escaped symbols in xml, indeed = =! -->
1048        <exec executable="cmd" osfamily="windows" failonerror="true">
1049            <arg value="/c" />
1050            <arg value="for %i in (pkg-temp\webapps\*.war) do move %i %i.jar &amp;&amp; pack200 -r %i.jar &amp;&amp; move %i.jar %i" />
1051        </exec>
1052        <exec executable="cmd" osfamily="windows" failonerror="true">
1053                <arg value="/c" />
1054                <arg value="for %i in (pkg-temp\lib\*.jar) do pack200 -r %i" />
1055        </exec>
1056    </target>
1057
1058    <target name="prepupdate" depends="build2, prepupdateSmall, prepConsoleDocUpdates, prepCertificates, prep-script-translation">
1059        <copy file="build/BOB.jar" todir="pkg-temp/lib/" />
1060        <copy file="build/sam.jar" todir="pkg-temp/lib/" />
1061        <copy file="build/i2psnark.jar" todir="pkg-temp/lib" />
1062        <!-- include systray changes in 0.7.5 -->
1063        <copy file="build/systray.jar" todir="pkg-temp/lib/" />
1064       <!-- removed from updater in 0.9
1065        <copy file="build/desktopgui.jar" todir="pkg-temp/lib/" />
1066       -->
1067        <copy file="build/susimail.war" todir="pkg-temp/webapps/" />
1068        <copy file="build/susidns.war" todir="pkg-temp/webapps/" />
1069        <!-- as of 0.7.12; someday, we can remove these from the updater -->
1070        <copy file="apps/susidns/src/WEB-INF/lib/jstl.jar" todir="pkg-temp/lib/" />
1071        <copy file="apps/susidns/src/WEB-INF/lib/standard.jar" todir="pkg-temp/lib/" />
1072        <copy file="build/i2psnark.war" todir="pkg-temp/webapps/" />
1073        <copy file="history.txt" todir="pkg-temp/" />
1074        <!-- the following overwrites history.txt on unix to shrink the update file -->
1075        <copy file="history.txt" tofile="pkg-temp/history.txt" overwrite="true">
1076            <filterchain>
1077                <headfilter lines="1500" />
1078            </filterchain>
1079        </copy>
1080        <concat append="true" destfile="pkg-temp/history.txt">&#10;&#10;----------------&#10;&#10;EARLIER HISTORY IS AVAILABLE IN THE SOURCE PACKAGE"</concat>
1081        <copy file="installer/resources/deletelist.txt" todir="pkg-temp/" />
1082    </target>
1083
1084    <target name="prepupdateSmall" depends="buildSmall, prepupdateRouter, prepjupdatefixes, prepthemeupdates">
1085        <copy file="build/i2ptunnel.jar" todir="pkg-temp/lib/" />
1086        <copy file="build/mstreaming.jar" todir="pkg-temp/lib/" />
1087        <copy file="build/streaming.jar" todir="pkg-temp/lib/" />
1088        <copy file="build/routerconsole.jar" todir="pkg-temp/lib/" />
1089        <!-- pulled out of routerconsole.jar in 0.7.12, someday we can take out of updater -->
1090        <!-- name without version so we can overwrite if we upgrade  -->
1091        <copy file="build/jrobin.jar" tofile="pkg-temp/lib/jrobin.jar" />
1092        <copy file="build/i2ptunnel.war" todir="pkg-temp/webapps/" />
1093        <copy file="build/routerconsole.war" todir="pkg-temp/webapps/" />
1094        <copy file="build/addressbook.war" todir="pkg-temp/webapps/" />
1095        <!-- decapitalized the file in 0.7.8 -->
1096       <copy file="installer/resources/countries.txt" todir="pkg-temp/geoip/" />
1097    </target>
1098
1099    <target name="prepupdateRouter" depends="buildrouter, deletepkg-temp">
1100        <copy file="build/i2p.jar" todir="pkg-temp/lib/" />
1101        <copy file="build/router.jar" todir="pkg-temp/lib/" />
1102    </target>
1103
1104    <!-- jbigi.jar -->
1105    <target name="prepjbigiupdate" depends="jbigi">
1106        <copy file="build/jbigi.jar" todir="pkg-temp/lib/" />
1107    </target>
1108
1109    <!-- GeoIP files and flag icons -->
1110    <target name="prepgeoupdate">
1111        <copy file="installer/resources/geoip.txt" todir="pkg-temp/geoip/" />
1112        <copy file="installer/resources/countries.txt" todir="pkg-temp/geoip/" />
1113        <copy todir="pkg-temp/docs/icons/flags" >
1114          <fileset dir="installer/resources/icons/flags" />
1115        </copy>
1116    </target>
1117
1118    <!-- All jetty jars required for update.
1119         We don't need commons-el or commons-logging, they haven't changed.
1120         TODO do we need to bother updating jasper?
1121         TODO where is JMX? We don't need it I hope.
1122      -->
1123    <target name="prepjupdate" depends="prepupdate, buildWEB">
1124        <copy todir="pkg-temp/lib" >
1125            <fileset dir="build" includes="commons*.jar jasper*.jar javax*.jar jetty*.jar jsp*.jar org.mortbay.*.jar" />
1126        </copy>
1127        <!--  We have to package the new eepsite files for MigrateJetty.java, but we
1128              can't overwrite an existing eepsite dir in a non-split configuration.
1129          -->
1130        <copy todir="pkg-temp/eepsite-jetty6" >
1131            <fileset dir="installer/resources/eepsite" includes="*.xml contexts/* etc/*" />
1132        </copy>
1133    </target>
1134
1135    <target name="delete-j6-update">
1136        <delete dir="pkg-temp/eepsite-jetty6" />
1137    </target>
1138
1139    <!-- Jetty 6 I2P logging addons, not really fixes -->
1140    <target name="prepjupdatefixes" depends="buildWEB">
1141        <copy file="build/jetty-i2p.jar" todir="pkg-temp/lib/" />
1142    </target>
1143
1144    <target name="util-list-changes" depends="checkForMtn" if="mtn.available" >
1145        <exec executable="mtn" outputproperty="workspace.changes.util" errorproperty="mtn.error.util" failifexecutionfails="false" >
1146            <arg value="list" />
1147            <arg value="changed" />
1148            <arg value="core/java/src/net/i2p/util" />
1149        </exec>
1150        <!-- \n in an attribute value generates an invalid manifest -->
1151        <exec executable="tr" inputstring="${workspace.changes.util}" outputproperty="workspace.changes.util.tr" errorproperty="mtn.error2" failifexecutionfails="false" >
1152            <arg value="-s" />
1153            <arg value="[:space:]" />
1154            <arg value="," />
1155        </exec>
1156    </target>
1157
1158    <target name="izpack-patches" >
1159            <taskdef name="izpack"
1160                     classpath="${basedir}/installer/lib/izpack/patches.jar:${basedir}/installer/lib/izpack/standalone-compiler.jar"
1161                     classname="com.izforge.izpack.ant.IzPackTask" />
1162        <jar destfile="${basedir}/installer/lib/izpack/patches.jar"
1163             basedir="${basedir}/installer/lib/izpack/patches" />
1164    </target>
1165
1166    <target name="buildUtilityJar" depends="buildCore">
1167        <ant dir="installer/java" target="build" />
1168    </target>
1169
1170    <target name="installer" depends="preppkg, buildProperties, util-list-changes, izpack-patches, buildUtilityJar" >
1171        <!--
1172          Force 1.5 pack200 output
1173          Doesnt work!
1174          http://jira.codehaus.org/browse/IZPACK-404
1175          http://forums.sun.com/thread.jspa?threadID=773439
1176          http://bfo.co.uk/blog/2010/05/13/combining_ant_jar_signatures_and_pack200.html
1177        <property name="com.sun.java.util.jar.pack.package.majver" value="150" />
1178        <property name="com.sun.java.util.jar.pack.package.minver" value="7" />
1179        -->
1180        <izpack input="${basedir}/installer/install.xml" output="${basedir}/install.jar" installerType="standard" basedir="${basedir}" />
1181
1182        <ant target="installerexe" />
1183    </target>
1184
1185    <target name="installerexe" depends="launch4j">
1186        <condition property="noExe">
1187            <or>
1188                <os arch="ppc" />
1189                <os arch="armv5tejl" />
1190                <os arch="armv6l" />
1191                <os arch="armv7l" />
1192            </or>
1193        </condition>
1194        <condition property="noExe">
1195            <not>
1196                <or>
1197                    <os name="Linux" />
1198                    <os family="windows" />
1199                </or>
1200            </not>
1201        </condition>
1202        <ant target="doInstallerEXE" />
1203    </target>
1204
1205    <!-- this makes i2pinstall.exe from install.jar -->
1206    <target name="doInstallerEXE" depends="launch4j" unless="noExe">
1207        <echo message="See the file &quot;build.properties&quot; if this step fails." />
1208        <!-- now the installer exe -->
1209        <launch4j configFile="./installer/i2pinstaller.xml" />
1210        <!-- thazzit -->
1211    </target>
1212
1213    <!-- Custom installers -->
1214    <target name="installer-nowindows" depends="clean, preppkg-nowindows, izpack-patches" >
1215        <fixcrlf srcdir="pkg-temp" includes="*.config **/*.xml **/*.properties **/*.txt scripts/*" encoding="utf8" eol="lf" />
1216        <izpack input="${basedir}/installer/install.xml" output="${basedir}/i2pinstall_${full.version}.jar" installerType="standard" basedir="${basedir}" />
1217    </target>
1218
1219
1220    <target name="installer-freebsd" depends="clean, preppkg-freebsd-only, izpack-patches" >
1221        <fixcrlf srcdir="pkg-temp" includes="*.config **/*.xml **/*.properties **/*.txt scripts/*" encoding="utf8" eol="lf" />
1222        <izpack input="${basedir}/installer/install.xml" output="${basedir}/i2pinstall_${full.version}_freebsd-only.jar" installerType="standard" basedir="${basedir}" />
1223    </target>
1224
1225    <target name="installer-linux" depends="clean, preppkg-linux-only, izpack-patches" >
1226        <fixcrlf srcdir="pkg-temp" includes="*.config **/*.xml **/*.properties **/*.txt scripts/*" encoding="utf8" eol="lf" />
1227        <izpack input="${basedir}/installer/install.xml" output="${basedir}/i2pinstall_${full.version}_linux-only.jar" installerType="standard" basedir="${basedir}" />
1228    </target>
1229
1230
1231    <target name="installer-osx" depends="clean, checkForIzpack2App, preppkg-osx-only, izpack-patches">
1232        <fixcrlf srcdir="pkg-temp" includes="*.config **/*.xml **/*.properties **/*.txt scripts/*" encoding="utf8" eol="lf" />
1233        <mkdir dir="pkg-temp/osx" />
1234        <izpack input="${basedir}/installer/install.xml" output="${basedir}/i2pinstall_${full.version}_osx-only.jar" installerType="standard" basedir="${basedir}" />
1235        <ant target="installer2app" />
1236        <delete dir="pkg-temp/osx" />
1237    </target>
1238
1239    <target name="checkForIzpack2App">
1240        <!-- we'll set the izpack2app binary name if it's not been set elsewhere yet -->
1241        <property name="izpack2app.binary" value="${user.home}/IzPack/utils/wrappers/izpack2app/izpack2app.py" />
1242        <available property="izpack2app.available" file="${izpack2app.binary}" />
1243    </target>
1244
1245    <target name="installer2app" if="izpack2app.available">
1246        <mkdir dir="pkg-temp/osx" />
1247        <exec executable="python" failonerror="true">
1248            <arg value="${izpack2app.binary}" />
1249            <arg value="${basedir}/i2pinstall_${full.version}_osx-only.jar" />
1250            <arg value="${basedir}/pkg-temp/osx/i2p-${full.version}_osx-install.app" />
1251        </exec>
1252
1253        <tar longfile="gnu" destfile="${basedir}/i2pinstall_${full.version}_osx.tar.bz2" compression="bzip2">
1254            <tarfileset dir="${basedir}/pkg-temp/osx/i2p-${full.version}_osx-install.app" prefix="/i2p-${full.version}_osx-install.app" filemode="644">
1255                <include name="**/**" />
1256                <exclude name="Contents/MacOS/*" />
1257            </tarfileset>
1258            <tarfileset dir="${basedir}/pkg-temp/osx/i2p-${full.version}_osx-install.app" prefix="/i2p-${full.version}_osx-install.app" filemode="755">
1259                <include name="Contents/MacOS/*" />
1260            </tarfileset>
1261        </tar>
1262    </target>
1263
1264    <!-- call between installer-xxx and installer-windows -->
1265    <target name="delete-nonwindows">
1266        <delete dir="pkg-temp/lib/wrapper/" />
1267        <delete dir="pkg-temp/locale/" />
1268        <delete dir="pkg-temp/man/" />
1269        <delete dir="pkg-temp/Start I2P Router.app/" />
1270        <delete dir="pkg-temp" includes="eepget i2prouter INSTALL-headless.txt osid postinstall.sh runplain.sh" />
1271    </target>
1272
1273    <target name="installer-windows" depends="clean, preppkg-windows-only, util-list-changes, izpack-patches, buildUtilityJar" >
1274        <fixcrlf srcdir="pkg-temp" includes="*.config *.bat *.cmd **/*.xml **/*.properties **/*.txt scripts/*" encoding="utf8" eol="crlf"/>
1275        <izpack input="${basedir}/installer/install.xml" output="${basedir}/install.jar" installerType="standard" basedir="${basedir}" />
1276        <ant target="installerexe" />
1277        <delete file="${basedir}/install.jar" />
1278        <move file="${basedir}/i2pinstall.exe" tofile="${basedir}/i2pinstall_${full.version}_windows-only.exe" />
1279    </target>
1280
1281    <!-- this is broken as installer-xxx targets may delete (or not delete) things in pkg-temp -->
1282    <target name="installer-all" depends="installer-freebsd, installer-linux, installer-osx, installer-windows, installer-nowindows, installer" >
1283    </target>
1284    <!-- end custom installers -->
1285
1286    <!-- unit tests -->
1287    <target name="updateTest" depends="prepupdate">
1288        <ant dir="core/java/" target="jarTest" />
1289        <copy file="core/java/build/i2ptest.jar" todir="pkg-temp/lib" />
1290        <zip destfile="i2pupdate.zip" basedir="pkg-temp" />
1291    </target>
1292    <target name="junit.test" depends="buildProperties, jbigi" >
1293        <ant dir="core/java/" target="junit.test" />
1294        <ant dir="router/java/" target="junit.test" />
1295    </target>
1296    <target name="scalatest.test" depends="buildProperties, jbigi" >
1297        <ant dir="core/java/" target="scalatest.test" />
1298        <ant dir="router/java/" target="scalatest.test" />
1299    </target>
1300    <target name="test" depends="buildProperties, jbigi" >
1301        <ant dir="core/java/" target="test" />
1302        <ant dir="router/java/" target="test" />
1303    </target>
1304    <target name="scalatest.report" depends="buildProperties" >
1305        <ant dir="core/java/" target="scalatest.report" />
1306        <ant dir="router/java/" target="scalatest.report" />
1307    </target>
1308    <target name="junit.report" depends="buildProperties" >
1309        <ant dir="core/java/" target="junit.report" />
1310        <ant dir="router/java/" target="junit.report" />
1311    </target>
1312    <target name="clover.report" depends="buildProperties" if="with.clover">
1313        <ant dir="core/java/" target="clover.report" />
1314        <ant dir="router/java/" target="clover.report" />
1315    </target>
1316    <target name="cobertura.report" depends="buildProperties" if="with.cobertura">
1317        <ant dir="core/java/" target="cobertura.report" />
1318        <ant dir="router/java/" target="cobertura.report" />
1319    </target>
1320    <target name="test.report" depends="junit.report, scalatest.report, clover.report, cobertura.report"/>
1321    <target name="fulltest" depends="buildProperties, jbigi" >
1322        <ant dir="core/java/" target="fulltest" />
1323        <ant dir="router/java/" target="fulltest" />
1324    </target>
1325    <!-- end unit tests -->
1326
1327    <target name="testscripts" >
1328        <exec executable="tests/scripts/checkcerts.sh" failonerror="true" />
1329        <exec executable="tests/scripts/checkpo.sh" failonerror="true" />
1330        <exec executable="tests/scripts/checkutf8.sh" failonerror="true" />
1331        <exec executable="tests/scripts/checkxml.sh" failonerror="true" />
1332    </target>
1333
1334
1335    <!-- <target name="syndie" >
1336        <ant dir="apps/syndie/java/" target="standalone" />
1337        <copy file="apps/syndie/java/syndie-standalone.zip" todir="." />
1338    </target> -->
1339    <target name="i2psnark" depends="buildProperties" >
1340        <ant dir="apps/i2psnark/java" target="standalone" />
1341        <copy file="apps/i2psnark/java/i2psnark-standalone.zip" todir="." />
1342    </target>
1343    <target name="slackpkg">
1344        <echo message="Building Slackware package." />
1345        <ant dir="Slackware/i2p/" target="slackpkg" />
1346        <ant dir="Slackware/i2p-base/" target="slackpkg" />
1347    </target>
1348    <target name="justBOB" depends="builddepSmall, jbigi">
1349        <ant dir="apps/BOB/" target="onejar" />
1350        <copy file="apps/BOB/dist/BOB-one.jar" todir="." />
1351    </target>
1352
1353    <target name="sloccount.report">
1354        <property name="sloccount.report.file" value="sloccount.sc" />
1355        <echo message="Generating sloccount report (this will take awhile)" />
1356        <exec executable="sloccount" failonerror="true">
1357            <arg value="--details"/>
1358            <arg value="--wide"/>
1359            <arg value="${basedir}"/>
1360            <redirector output="${sloccount.report.file}">
1361                <outputfilterchain>
1362                    <linecontainsregexp negate="true">
1363                        <regexp pattern="(Warning: |lib/launch4j|_MTN|reports|pkg-temp|licenses|i2p\.fba|gmp-|WEB-INF)" />
1364                    </linecontainsregexp>
1365                    <linecontains negate="true">
1366                        <contains value="${sloccount.report.file}" />
1367                    </linecontains>
1368                </outputfilterchain>
1369            </redirector>
1370        </exec>
1371        <echo message="sloccount report saved to the file &quot;${sloccount.report.file}&quot;" />
1372    </target>
1373
1374    <target name="findbugs" depends="build2, buildUtilityJar">
1375        <echo message="Starting findbugs, this will take a while..." />
1376        <exec executable="nice" failonerror="true">
1377            <arg value="findbugs"/>
1378            <arg value="-textui"/>
1379            <arg value="-projectName"/>
1380            <arg value="i2p"/>
1381            <arg value="-sortByClass"/>
1382            <arg value="-xml"/>
1383            <arg value="-output"/>
1384            <arg value="i2p.fba"/>
1385            <arg value="-auxclasspath"/>
1386            <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/all/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"/>
1387            <arg value="-sourcepath"/>
1388            <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/:installer/java/src"/>
1389            <!-- start of the files to be analyzed -->
1390            <arg value="build/BOB.jar"/>
1391            <arg value="build/addressbook.war"/>
1392            <arg value="build/i2p.jar"/>
1393            <arg value="build/i2psnark.jar"/>
1394            <arg value="build/i2psnark.war"/>
1395            <arg value="build/i2ptunnel.jar"/>
1396            <arg value="build/i2ptunnel.war"/>
1397            <arg value="build/mstreaming.jar"/>
1398            <arg value="build/router.jar/"/>
1399            <arg value="build/desktopgui.jar"/>
1400            <arg value="build/routerconsole.jar"/>
1401            <arg value="build/routerconsole.war"/>
1402            <arg value="build/sam.jar"/>
1403            <arg value="build/streaming.jar"/>
1404            <arg value="build/susidns.war"/>
1405            <arg value="build/susimail.war"/>
1406            <arg value="build/systray.jar"/>
1407            <arg value="build/utility.jar"/>
1408        </exec>
1409        <echo message="Findbugs output stored in i2p.fba" />
1410        <echo message="Now run: findbugs i2p.fba" />
1411    </target>
1412
1413    <!-- this is the same dependency as pkg, but with updater200 in the middle,
1414         since preppkg puts too much stuff in pkg-temp -->
1415<!--
1416    <target name="release" depends="distclean, updaterWithJettyFixesAndJbigi , updater200WithJettyFixes, preppkg, installer, getReleaseNumber" >
1417-->
1418    <target name="release" depends="verifyReleaseBuildNumbers, distclean, testscripts, updaterWithJettyRepack, updater200WithJetty, delete-j6-update, installer-nowindows, delete-nonwindows, installer-windows" >
1419        <echo message="================================================================" />
1420        <echo message="Did you update these files?" />
1421        <exec executable="ls" failonerror="true">
1422            <arg value="-l" />
1423            <arg value="history.txt" />
1424            <arg value="installer/install.xml" />
1425            <arg value="core/java/src/net/i2p/CoreVersion.java" />
1426            <arg value="router/java/src/net/i2p/router/RouterVersion.java" />
1427        </exec>
1428        <echo message="Everything is checked in, right? Let's be sure:" />
1429        <exec executable="mtn" failonerror="true">
1430            <arg value="st" />
1431        </exec>
1432        <echo message="If there are any modified files above, stop now!" />
1433
1434        <echo message="New version number is ${release.number}" />
1435        <copy file="i2pupdate.zip" tofile="i2pupdate_${release.number}.zip" />
1436        <copy file="i2pinstall_${full.version}_windows-only.exe" tofile="i2pinstall_${release.number}_windows.exe" />
1437        <copy file="i2pinstall_${full.version}.jar" tofile="i2pinstall_${release.number}.jar" />
1438        <delete file="i2pupdate.sud" />
1439        <delete file="i2pupdate.su2" />
1440        <!-- make this a lot easier by putting release.privkey=/path/to/privkey in override.properties -->
1441        <input message="Enter private signing key file:" addproperty="release.privkey" />
1442        <fail message="You must enter a path." >
1443            <condition>
1444                <equals arg1="${release.privkey}" arg2=""/>
1445            </condition>
1446        </fail>
1447        <echo message="Key file is ${release.privkey}" />
1448        <java classname="net.i2p.crypto.TrustedUpdate" fork="true" failonerror="true">
1449            <classpath>
1450                <pathelement location="build/i2p.jar" />
1451            </classpath>
1452            <arg value="sign" />
1453            <arg value="i2pupdate.zip" />
1454            <arg value="i2pupdate.sud" />
1455            <arg value="${release.privkey}" />
1456            <arg value="${release.number}" />
1457        </java>
1458        <echo message="Verify version and VALID signature:" />
1459        <java classname="net.i2p.crypto.TrustedUpdate" fork="true" failonerror="true">
1460            <classpath>
1461                <pathelement location="build/i2p.jar" />
1462            </classpath>
1463            <arg value="verifysig" />
1464            <arg value="i2pupdate.sud" />
1465        </java>
1466        <java classname="net.i2p.crypto.TrustedUpdate" fork="true" failonerror="true">
1467            <classpath>
1468                <pathelement location="build/i2p.jar" />
1469            </classpath>
1470            <arg value="verifyversion" />
1471            <arg value="i2pupdate.sud" />
1472        </java>
1473        <java classname="net.i2p.crypto.TrustedUpdate" fork="true" failonerror="true">
1474            <classpath>
1475                <pathelement location="build/i2p.jar" />
1476            </classpath>
1477            <arg value="showversion" />
1478            <arg value="i2pupdate.sud" />
1479        </java>
1480        <!-- now build and verify the packed sud from the packed zip -->
1481        <java classname="net.i2p.crypto.TrustedUpdate" fork="true" failonerror="true">
1482            <classpath>
1483                <pathelement location="build/i2p.jar" />
1484            </classpath>
1485            <arg value="sign" />
1486            <arg value="i2pupdate200.zip" />
1487            <arg value="i2pupdate.su2" />
1488            <arg value="${release.privkey}" />
1489            <arg value="${release.number}" />
1490        </java>
1491        <echo message="Verify version and VALID signature:" />
1492        <java classname="net.i2p.crypto.TrustedUpdate" fork="true" failonerror="true">
1493            <classpath>
1494                <pathelement location="build/i2p.jar" />
1495            </classpath>
1496            <arg value="verifysig" />
1497            <arg value="i2pupdate.su2" />
1498        </java>
1499        <java classname="net.i2p.crypto.TrustedUpdate" fork="true" failonerror="true">
1500            <classpath>
1501                <pathelement location="build/i2p.jar" />
1502            </classpath>
1503            <arg value="verifyversion" />
1504            <arg value="i2pupdate.su2" />
1505        </java>
1506        <java classname="net.i2p.crypto.TrustedUpdate" fork="true" failonerror="true">
1507            <classpath>
1508                <pathelement location="build/i2p.jar" />
1509            </classpath>
1510            <arg value="showversion" />
1511            <arg value="i2pupdate.su2" />
1512        </java>
1513        <!-- will this use the monotonerc file in the current workspace? -->
1514        <echo message="Checking out fresh copy into ../i2p-${release.number} for tarballing:" />
1515        <delete dir="../i2p-${release.number}" />
1516        <exec executable="mtn" failonerror="true">
1517            <arg value="co" />
1518            <arg value="-b" />
1519            <arg value="i2p.i2p" />
1520            <!-- w: is the revision of the current workspace -->
1521            <arg value="-r" />
1522            <arg value="w:" />
1523            <arg value="../i2p-${release.number}/" />
1524        </exec>
1525        <exec executable="tar" failonerror="true">
1526            <arg value="cjf" />
1527            <arg value="i2psource_${release.number}.tar.bz2" />
1528            <arg value="-C" />
1529            <arg value=".." />
1530            <arg value="--exclude" />
1531            <arg value="i2p-${release.number}/_MTN*" />
1532            <arg value="i2p-${release.number}/" />
1533        </exec>
1534        <echo message="Sign the files:" />
1535        <delete file="i2pinstall_${release.number}_windows.exe.sig" />
1536        <delete file="i2pinstall_${release.number}.jar.sig" />
1537        <delete file="i2psource_${release.number}.tar.bz2.sig" />
1538        <delete file="i2pupdate_${release.number}.zip.sig" />
1539        <exec executable="gpg" failonerror="true">
1540            <arg value="-b" />
1541            <arg value="i2pinstall_${release.number}_windows.exe" />
1542        </exec>
1543        <exec executable="gpg" failonerror="true">
1544            <arg value="-b" />
1545            <arg value="i2pinstall_${release.number}.jar" />
1546        </exec>
1547        <exec executable="gpg" failonerror="true">
1548            <arg value="-b" />
1549            <arg value="i2psource_${release.number}.tar.bz2" />
1550        </exec>
1551        <exec executable="gpg" failonerror="true">
1552            <arg value="-b" />
1553            <arg value="i2pupdate_${release.number}.zip" />
1554        </exec>
1555        <exec executable="chmod" failonerror="true">
1556            <arg value="444" />
1557            <arg value="i2pinstall_${release.number}_windows.exe" />
1558            <arg value="i2pinstall_${release.number}.jar" />
1559            <arg value="i2psource_${release.number}.tar.bz2" />
1560            <arg value="i2pupdate_${release.number}.zip" />
1561            <arg value="i2pupdate.su2" />
1562            <arg value="i2pupdate.sud" />
1563            <arg value="i2pinstall_${release.number}_windows.exe.sig" />
1564            <arg value="i2pinstall_${release.number}.jar.sig" />
1565            <arg value="i2psource_${release.number}.tar.bz2.sig" />
1566            <arg value="i2pupdate_${release.number}.zip.sig" />
1567        </exec>
1568        <echo message="File sizes:" />
1569        <exec executable="ls" failonerror="true">
1570            <arg value="-l" />
1571            <arg value="i2pinstall_${release.number}_windows.exe" />
1572            <arg value="i2pinstall_${release.number}.jar" />
1573            <arg value="i2psource_${release.number}.tar.bz2" />
1574            <arg value="i2pupdate_${release.number}.zip" />
1575            <arg value="i2pupdate.su2" />
1576            <arg value="i2pupdate.sud" />
1577            <arg value="i2pinstall_${release.number}_windows.exe.sig" />
1578            <arg value="i2pinstall_${release.number}.jar.sig" />
1579            <arg value="i2psource_${release.number}.tar.bz2.sig" />
1580            <arg value="i2pupdate_${release.number}.zip.sig" />
1581        </exec>
1582        <echo message="SHA256 sums:" />
1583        <exec executable="sha256sum" failonerror="true">
1584            <arg value="i2pinstall_${release.number}_windows.exe" />
1585            <arg value="i2pinstall_${release.number}.jar" />
1586            <arg value="i2psource_${release.number}.tar.bz2" />
1587            <arg value="i2pupdate_${release.number}.zip" />
1588            <arg value="i2pupdate.su2" />
1589            <arg value="i2pupdate.sud" />
1590        </exec>
1591        <!-- make torrent files -->
1592        <copy file="i2pupdate.sud" tofile="i2pupdate-${release.number}.sud" />
1593        <java classname="org.klomp.snark.Storage" fork="true" failonerror="true">
1594            <classpath>
1595                <pathelement location="build/i2p.jar" />
1596                <pathelement location="build/i2psnark.jar" />
1597            </classpath>
1598            <arg value="i2pupdate-${release.number}.sud" />
1599            <arg value="http://tracker2.postman.i2p/announce.php" />
1600        </java>
1601        <copy file="i2pupdate.su2" tofile="i2pupdate-${release.number}.su2" />
1602        <java classname="org.klomp.snark.Storage" fork="true" failonerror="true">
1603            <classpath>
1604                <pathelement location="build/i2p.jar" />
1605                <pathelement location="build/i2psnark.jar" />
1606            </classpath>
1607            <arg value="i2pupdate-${release.number}.su2" />
1608            <arg value="http://tracker2.postman.i2p/announce.php" />
1609        </java>
1610        <echo message="Don't forget to mtn tag w: i2p-${release.number}" />
1611        <echo message="... and mtn cert t:i2p-${release.number} branch i2p.i2p.release" />
1612    </target>
1613
1614    <target name="debian" depends="debian-clean, debchange, debian-binary" />
1615
1616    <target name="getExtendedVersion" depends="buildProperties, trimMtnRev">
1617        <property name="MtnShortHash" value="unknown" />
1618        <condition property="Extended.Version" value="${full.version}-${MtnShortHash}">
1619            <not>
1620                <or>
1621                    <equals arg1="${MtnShortHash}" arg2="" />
1622                    <equals arg1="${MtnShortHash}" arg2="unknown" />
1623                </or>
1624            </not>
1625        </condition>
1626        <!-- if not set above we'll set it here -->
1627        <property name="Extended.Version" value="${full.version}" />
1628    </target>
1629
1630    <target name="debchange" depends="getExtendedVersion" unless="noAutoDebchange">
1631        <echo message= "Debian version is ${Extended.Version}-1" />
1632        <exec executable="dch" failonerror="true">
1633            <arg value="-b" />
1634            <arg value="--check-dirname-level" />
1635            <arg value="0" />
1636            <arg value="-v" />
1637            <arg value="${Extended.Version}-1" />
1638            <arg value="Unofficial Debian package built using &quot;ant debian&quot;" />
1639        </exec>
1640    </target>
1641
1642    <target name="debian-binary" depends="getExtendedVersion">
1643        <exec executable="fakeroot" failonerror="true">
1644            <arg value="debian/rules" />
1645            <arg value="patch" />
1646            <arg value="binary" />
1647            <arg value="clean" />
1648        </exec>
1649        <delete dir=".pc" />
1650        <move todir=".">
1651            <fileset dir=".." includes="libjbigi*${release.number}*.deb i2p*${release.number}*.deb" />
1652        </move>
1653        <echo message="" />
1654        <echo message="====================" />
1655        <echo message="Packages have been built and moved to ${basedir}" />
1656        <echo message="====================" />
1657    </target>
1658
1659    <target name="debian-clean" depends="getExtendedVersion" >
1660        <exec executable="fakeroot" failonerror="true">
1661            <arg value="debian/rules" />
1662            <arg value="clean" />
1663        </exec>
1664        <delete dir="./.pc" />
1665    </target>
1666
1667    <target name="debian-tarball" depends="getExtendedVersion">
1668        <!-- will this use the monotonerc file in the current workspace? -->
1669        <fail message="This target cannot be used without Monotone! Use &quot;fakeroot debian/rules get-orig-source&quot; instead.">
1670            <condition>
1671                <not>
1672                    <isset property="mtn.available" />
1673                </not>
1674            </condition>
1675        </fail>
1676        <property name="debian.tarball.name" value="i2p_${Extended.Version}.orig.tar.bz2" />
1677        <echo message="Checking out fresh copy into ../i2p-${Extended.Version} for tarballing:" />
1678        <delete dir="../i2p-${Extended.Version}" />
1679        <exec executable="mtn" failonerror="true">
1680            <arg value="co" />
1681            <arg value="-b" />
1682            <arg value="i2p.i2p" />
1683            <!-- w: is the revision of the current workspace -->
1684            <arg value="-r" />
1685            <arg value="w:" />
1686            <arg value="../i2p-${Extended.Version}" />
1687        </exec>
1688        <delete includeemptydirs="true" quiet="false">
1689            <fileset dir="../i2p-${Extended.Version}/installer/lib/" />
1690            <fileset dir="../i2p-${Extended.Version}/Slackware" />
1691            <fileset dir="../i2p-${Extended.Version}/_MTN" />
1692        </delete>
1693        <tar longfile="gnu" destfile="../${debian.tarball.name}" compression="bzip2">
1694            <tarfileset dir="../i2p-${Extended.Version}" prefix="/i2p-${Extended.Version}">
1695                <include name="**/**" />
1696                <exclude name="debian/**"/>
1697                <exclude name="**/*.sh"/>
1698            </tarfileset>
1699            <tarfileset dir="../i2p-${Extended.Version}" prefix="/i2p-${Extended.Version}" filemode="755">
1700                <exclude name="debian/**" />
1701                <include name="**/*.sh" />
1702            </tarfileset>
1703        </tar>
1704    </target>
1705
1706    <target name="debian-patch" depends="getExtendedVersion" >
1707        <exec executable="quilt" failonerror="true">
1708            <arg value="-a" />
1709            <arg value="push" />
1710        </exec>
1711        <echo message="====================" />
1712    </target>
1713    <target name="debian-unpatch" depends="buildProperties">
1714        <exec executable="quilt" failonerror="false">
1715            <arg value="-a" />
1716            <arg value="pop" />
1717        </exec>
1718    </target>
1719
1720    <target name="debianrepo" depends="debian">
1721        <exec dir="debian" executable="./makerepo.sh" failonerror="true"/>
1722    </target>
1723
1724<!-- the following are appened to help build barebone portable version,
1725     none of the above is modified for this purpose -->
1726        <target name = "pkg-portable-clean">
1727                <delete dir="build/" />
1728                <delete dir="pkg-temp/" />
1729                <delete>
1730                        <fileset dir="." includes="portable-**.zip**" />
1731                </delete>
1732        </target>
1733<!-- build a portable archive -->
1734
1735<!-- *0* Since we simply pack all files in folder "build/" into our archieve,
1736                we need to make sure its small, with NO redundent jars or wars.
1737                thus cleaning is required before each build-->
1738        <target name="buildSmallOnly" depends="pkg-portable-clean,buildSmall"/>
1739
1740<!-- *1* preparing the jars by OS dependent de-bloating -->
1741        <target name="preppkg-portable-win32-jbigi" depends="buildSmallOnly, jbigi-windows-only" />
1742
1743        <target name="preppkg-portable-linux-jbigi"  depends="buildSmallOnly, jbigi-linux-only" />
1744
1745<!-- *2* os independent procedure  -->
1746        <target name="preppkg-portable-basic" >
1747                <mkdir dir="pkg-temp" />
1748                        <!-- non OS dependent configurations only, dont add *nux/win stuff here -->
1749                        <copy todir="pkg-temp">
1750                                <fileset dir="installer/resources/portable/configs/" />
1751                        </copy>
1752                        <copy file="installer/resources/blocklist.txt" todir="pkg-temp/" />
1753                        <copy file="installer/resources/hosts.txt" todir="pkg-temp/" />
1754                        <copy file="installer/resources/readme.license.txt" todir="pkg-temp/" />
1755                <mkdir dir="pkg-temp/addressbook" />
1756                        <copy file="apps/addressbook/subscriptions.txt" todir="pkg-temp/addressbook/" />
1757                        <copy file="apps/addressbook/myhosts.txt"  todir="pkg-temp/addressbook/" />
1758                        <!-- config.txt is in installer/resources/portable -->
1759                <mkdir dir="pkg-temp/docs" />
1760                        <copy file="installer/resources/initialNews/initialNews.xml" tofile="pkg-temp/docs/news.xml" overwrite="true" />
1761                        <copy file="installer/resources/readme/readme.html" tofile="pkg-temp/docs/readme.html" />
1762                        <copy file="installer/resources/startconsole.html" todir="pkg-temp/docs/" />
1763                        <copy file="installer/resources/start.ico" todir="pkg-temp/docs/" />
1764                        <copy file="installer/resources/console.ico" todir="pkg-temp/docs/" />
1765                        <!-- HTTP Header files, english only,
1766                                if you need a different lang do it in a seperate target -->
1767                        <copy todir="pkg-temp/docs/" >
1768                                <fileset dir="installer/resources/proxy/"  includes="**-header.ht" />
1769                        </copy>
1770                        <!-- Theme light only -->
1771                        <copy todir="pkg-temp/docs/themes/console/light/" overwrite="true" >
1772                                <fileset dir="installer/resources/themes/console/light/" includes="**.css" />
1773                        </copy>
1774                        <copy file="installer/resources/themes/console/light/console_big.css" todir="portable/docs/themes/console/light/" />
1775                        <copy todir="pkg-temp/docs/themes/console/images/" >
1776                                <fileset dir="installer/resources/themes/console/images/" />
1777                        </copy>
1778                        <!-- FLAGs for language icon (not for ip)-->
1779                        <copy todir="pkg-temp/docs/icons/flags" >
1780                                <fileset dir="installer/resources/icons/flags/" includes="cn.png,de.png,fr.png,nl.png,ru.png,se.png,us.png" />
1781                        </copy>
1782                <mkdir dir="pkg-temp/webapps" />
1783                        <copy todir="pkg-temp/webapps/">
1784                                <fileset dir="build/" includes="**.war" />
1785                        </copy>
1786                <mkdir dir="pkg-temp/lib" />
1787                        <copy todir ="pkg-temp/lib/" >
1788                                <fileset dir="build/" includes="**.jar" />
1789                        </copy>
1790                        <!-- 3rd party jars from apps/  -->
1791                                <!-- jrobin - without jobin , you lost graph and get a lot error entry in logs -->
1792                        <copy file="build/jrobin.jar" tofile="pkg-temp/lib/jrobin.jar" />
1793        </target>
1794<!-- *3* os dependent procedure/commands -->
1795        <target name = "preppkg-portable-win32" depends="preppkg-portable-win32-jbigi,preppkg-portable-basic">
1796                        <!-- systray4.j  - why do we need trayicons for portable version ? dependency hardcoded in console -->
1797                <copy file="apps/systray/java/lib/systray4j.dll" todir="pkg-temp/lib" />
1798                <copy file="apps/systray/java/lib/systray4j.jar" todir="pkg-temp/lib" />
1799                        <!--wrapper - dont even think about it. i2p cosumes appreantly more mem without it on win32-->
1800                <copy file="installer/lib/wrapper/win32/wrapper.dll" todir="pkg-temp/lib" />
1801                <copy file="installer/lib/wrapper/all/wrapper.jar" todir="pkg-temp/lib" />
1802                <copy file="installer/lib/wrapper/win32/I2Psvc.exe" tofile="pkg-temp/i2psvc.ex_" />
1803                        <!--  copy the unpack/start batchfiles -->
1804                <copy todir="pkg-temp">
1805                        <fileset dir="installer/resources/portable/win32/" />
1806                </copy>
1807        </target>
1808<!-- *4* command for windows package -->
1809        <target name = "pkg-portable-win32"     depends="preppkg-portable-win32, pack200" >
1810                <!-- i need the portable\ folder in .zip so basedir is set to . -->
1811                <move file="pkg-temp" tofile="portable"/>
1812                <zip destfile="portable-win32.zip" basedir="." level="9" includes="portable\**" />
1813                <checksum file="portable-win32.zip" forceOverwrite="yes"/>
1814                <move file="portable" tofile="pkg-temp"/>
1815        </target>
1816</project>
Note: See TracBrowser for help on using the repository browser.