source: build.xml @ f8d323b

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

propagate from branch 'i2p.i2p' (head 5737078c5993e2fcf73520cc610a71125b12520b)

to branch 'i2p.i2p.zzz.jetty7' (head a93a47d79b1db119ec8c62b46a4a4e226043bd17)

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