source: build.xml @ cf10cb1c

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

Fixed out-of-date references to wrapper.jar and jbigi.jar so that the justBOB target works

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