source: build.xml @ 094cf14

Last change on this file since 094cf14 was 094cf14, checked in by zzz <zzz@…>, 4 years ago

Debian:
Prep for dependency on libtomcat7
Doesn't work yet, breaks susidns.
glassfish-javaee for jstl.jar and standard.jar version 1.2 won't work with tomcat7,
it's ancient and not compatible with recent el libs.
Add back option to depend on libjakarta-taglibs-standard and libjstl1.1-java which are version 1.1.2,
but not clear if they will work with tomcat7 either, even though they are
dependencies of libjetty8-extra-java.
We switched from JSTL 1.1.2 to JSTL 1.2 when we went from Jetty 5 to Jetty 6 in 2012.
1.2 libs are not available anywhere except for Glassfish, and
Debian only has the ancient Java EE 5 Glassfish 2.1.
Not clear there's any way to get susidns (and bote) to work with both Tomcat 6 and 7.

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