source: build.xml @ 239fe51

Last change on this file since 239fe51 was 239fe51, checked in by zzz <zzz@…>, 6 years ago

Update: Partial implementation of su3 news with atom feed.
No spec yet, just followed str4d's testnews.atom.xml proposal.
Atom parsing is tested, su3 part is incomplete and untested.
Todo: add spec to http://i2p-projekt.i2p/en/docs/spec/updates,
finish su3 and test.

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