source: build.xml @ c3f5c04

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

typo

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