source: build.xml @ 71038c3

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