source: build.xml @ 8845ce6

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

Findbugs all over:

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