source: build.xml @ be308a0

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

merge of '398a24f487b61ef778a2e849660e953ef7e43b39'

and '598d00efae4c9b675b64fd626bc2eab2b921e0c5'

  • Property mode set to 100644
File size: 53.1 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<project basedir="." default="all" name="i2p">
3   
4    <!-- Things you might want to change -->
5    <!-- This keeps gcj a lot quieter -->
6    <!--
7        <property name="javac.compilerargs" value="-warn:-unchecked,raw,unused,serial" />
8    -->
9    <!-- Add Apache Harmony's Pack200 library if you don't have java.util.jar.Pack200
10         See core/java/src/net/i2p/util/FileUtil.java for code changes required
11         to use this library instead of Sun's version.
12         Or to comment it all out if you don't have either.
13    -->
14    <!--
15        <property name="javac.classpath" value="/PATH/TO/pack200.jar" />
16    -->
17
18    <!-- You probably don't want to change anything from here down -->
19    <target name="help" depends="all" />
20    <target name="all" >
21        <echo message="Useful targets: " />
22        <echo message="  pkg:       distclean then package everything up (installer, clean tarball, update tarball)" />
23        <echo message="  dist:      pkg and javadoc" />
24        <echo message="  installer: build the GUI installer" />
25        <echo message="  tarball:   tar the full install into i2p.tar.bz2 (extracts to build a new clean install)" />
26        <echo message="  updater:   tar the built i2p specific files into an i2pupdate.zip (extracts safely over existing installs)" />
27        <echo message="  updaterWithJetty:   tar the built i2p specific files and jetty into an i2pupdate.zip (extracts safely over existing installs)" />
28        <echo message="  updaterWithJettyFixes: updater including local jetty patches" />
29        <echo message="  updaterWithGeoIP: updater including GeoIP Files" />
30        <echo message="  updaterWithJettyFixesAndGeoIP" />
31        <echo message="  updaterSmall:   updater with the essentials only - no SAM, i2psnark, SusiMail, SusiDNS, news.xml, or history.txt" />
32        <echo message="  updaterRouter:  updater with the i2p.jar and router.jar only" />
33        <echo message="  distclean: clean up all derived files" />
34        <echo message="  syndie:    generate a standalone syndie install" />
35        <echo message="  i2psnark:  generate a standalone i2psnark install" />
36        <echo message="  justBOB:  generate a standalone BOB-one.jar" />
37        <echo message="  javadoc:   generate javadoc for the entire project into ./build/javadoc" />
38        <echo message="  slackpkg:  generate Slackware packages in ./Slackware/i2p and ./Slackware/i2p-base" />
39        <echo message="  debianhowto: instructions on building Debian packages" />
40        <echo message="  updaterWithDesktopgui: tar the built files and desktopgui in an i2pupdate.zip" />
41        <echo message="  pkgWithDesktopgui: distclean then package everything up with the desktopgui" />
42        <echo message="  distWithDesktopgui: pkgWithDesktopgui and javadoc" />
43        <echo message="  distcleanWithDesktopgui: clean up all derived files (including desktopgui files)" />
44        <echo message="  poupdate: update the .po files for translators" />
45    </target>
46    <target name="debianhowto">
47        <echo message="To build debian packages, you must run dpkg-buildpackage as root in the source directory. It will then run ant for you. dpkg-buildpackage is found in the 'dpkg-dev' package. Also it should work fine to use the 'fakeroot' package with dpkg-buildpackage, if you don't want to run as root. Please read 'man dpkg-buildpackage' before building any packages yourself." />
48    </target>
49    <target name="dist" depends="pkg, javadoc">
50    </target>
51    <target name="build" depends="build2">
52        <!-- so we don't build standalone for the updater -->
53        <!-- This builds apps/i2psnark/java/i2psnark-standalone.zip,
54          -   which we don't distribute anywhere...
55        <ant dir="apps/i2psnark/java/" target="standalone" />
56        -->
57    </target>
58    <target name="build2" depends="builddep, jar, buildWEB" />
59    <target name="buildSmall" depends="builddepSmall, jarSmall, buildWEB" />
60    <target name="buildclean" depends="distclean, build" />
61    <target name="builddep" depends="builddepSmall">
62        <!-- build *everything* here, but only once -->
63        <ant dir="apps/BOB/" target="jar" />
64        <ant dir="apps/sam/java/" target="jar" />
65        <ant dir="apps/susimail/" target="war" />
66        <ant dir="apps/susidns/src" target="all" />
67        <ant dir="apps/i2psnark/java/" target="war" />
68    </target>
69    <target name="builddepSmall">
70        <ant dir="core/java/" target="jar" />
71        <ant dir="router/java/" target="jar" />
72        <ant dir="apps/systray/java/" target="jar" />
73        <ant dir="apps/routerconsole/java/" target="jar" />
74        <ant dir="apps/ministreaming/java/" target="jar" />
75        <ant dir="apps/streaming/java/" target="jar" />
76        <ant dir="apps/i2ptunnel/java/" target="build" />
77        <ant dir="apps/addressbook/" target="war" />
78    </target>
79    <target name="buildrouter">
80        <ant dir="core/java/" target="jar" />
81        <ant dir="router/java/" target="jar" />
82        <copy file="core/java/build/i2p.jar" todir="build/" />
83        <copy file="router/java/build/router.jar" todir="build/" />
84    </target>
85    <target name="buildWEB">
86        <ant dir="apps/jetty" target="ensureJettylib" />
87        <ant dir="apps/routerconsole/java" target="build" />
88        <copy file="apps/routerconsole/java/build/routerconsole.jar" todir="build/" />
89        <copy file="apps/routerconsole/java/build/routerconsole.war" todir="build/" />
90        <copy file="apps/jetty/jettylib/org.mortbay.jetty.jar" todir="build/" />
91        <copy file="apps/jetty/jettylib/jasper-compiler.jar" todir="build/" />
92        <copy file="apps/jetty/jettylib/jasper-runtime.jar" todir="build/" />
93        <copy file="apps/jetty/jettylib/commons-logging.jar" todir="build/" />
94        <copy file="apps/jetty/jettylib/commons-el.jar" todir="build/" />
95        <copy file="apps/jetty/jettylib/javax.servlet.jar" todir="build/" />
96    </target>
97    <target name="buildexe">
98        <condition property="noExe">
99            <os arch="x86_64" />
100        </condition>
101        <condition property="noExe">
102            <os arch="ppc" />
103        </condition>
104        <condition property="noExe">
105            <os arch="amd64" />
106        </condition>
107        <condition property="noExe">
108           <not>
109            <or>
110             <os name="Linux" />
111             <os family="windows" />
112            </or>
113           </not>
114        </condition>
115        <ant target="doBuildEXE" />
116    </target>
117    <target name="doBuildEXE" unless="noExe">
118        <jar destfile="./build/launchi2p.jar">
119            <manifest>
120             <attribute name="Main-Class" value="net.i2p.router.RouterLaunch" />
121             <attribute name="Class-Path" value="lib/i2p.jar lib/router.jar lib/jbigi.jar lib/BOB.jar lib/sam.jar lib/mstreaming.jar lib/streaming.jar lib/routerconsole.jar lib/i2ptunnel.jar lib/org.mortbay.jetty.jar lib/javax.servlet.jar lib/jasper-compiler.jar lib/jasper-runtime.jar lib/commons-logging.jar lib/commons-el.jar lib/wrapper.jar lib/systray.jar lib/systray4j.jar" />
122            </manifest>
123        </jar>
124        <!-- now the standalone launcher exe -->
125        <taskdef name="launch4j"
126                 classname="net.sf.launch4j.ant.Launch4jTask"
127                 classpath="${basedir}/installer/lib/launch4j/launch4j.jar:${basedir}/installer/lib/launch4j/lib/xstream.jar" />
128        <launch4j configFile="./installer/i2pstandalone.xml" />
129        <!-- thazzit -->
130    </target>
131    <target name="compile" />
132    <target name="jar" depends="jarSmall" >
133        <copy file="apps/BOB/dist/BOB.jar" todir="build/" />
134        <copy file="apps/sam/java/build/sam.jar" todir="build/" />
135        <copy file="apps/susimail/susimail.war" todir="build/" />
136        <copy file="apps/susidns/src/susidns.war" todir="build/" />
137        <copy file="apps/i2psnark/i2psnark.war" todir="build/" />
138        <copy file="apps/i2psnark/java/build/i2psnark.jar" todir="build/" />
139    </target>
140    <target name="jarSmall" depends="compile" >
141        <copy file="core/java/build/i2p.jar" todir="build/" />
142        <copy file="router/java/build/router.jar" todir="build/" />
143        <copy file="apps/ministreaming/java/build/mstreaming.jar" todir="build/" />
144        <copy file="apps/streaming/java/build/streaming.jar" todir="build/" />
145        <copy file="apps/i2ptunnel/java/build/i2ptunnel.jar" todir="build/" />
146        <copy file="apps/i2ptunnel/java/build/i2ptunnel.war" todir="build/" />
147        <copy file="apps/systray/java/build/systray.jar" todir="build/" />
148        <copy file="installer/lib/jbigi/jbigi.jar" todir="build" />
149        <copy file="apps/addressbook/dist/addressbook.war" todir="build/" />
150    </target>
151    <target name="poupdate">
152        <ant dir="apps/routerconsole/java/" target="poupdate" />
153        <ant dir="apps/i2psnark/java/" target="poupdate" />
154        <ant dir="apps/i2ptunnel/java/" target="poupdate" />
155        <ant dir="apps/susidns/src/" target="poupdate" />
156    </target>
157    <target name="javadoc">
158        <mkdir dir="./build" />
159        <mkdir dir="./build/javadoc" />
160        <javadoc access="package" 
161            destdir="./build/javadoc" 
162            packagenames="*" 
163            use="true" 
164            splitindex="true" 
165            windowtitle="I2P Anonymous Network - Java Documentation">
166            <group title="Core SDK (i2p.jar)" packages="net.i2p:net.i2p.*:net.i2p.client:net.i2p.client.*:freenet.support.CPUInformation:org.bouncycastle.crypto:org.bouncycastle.crypto.*:gnu.crypto.*:gnu.gettext:org.xlattice.crypto.filters:com.nettgryppa.security" />
167            <group title="Streaming Library" packages="net.i2p.client.streaming" />
168            <group title="Router" packages="net.i2p.router:net.i2p.router.*:net.i2p.data.i2np:org.cybergarage.*:org.freenetproject" />
169            <group title="Router Console" packages="net.i2p.router.web" />
170            <group title="Addressbook Application" packages="net.i2p.addressbook" />
171            <group title="BOB Bridge" packages="net.i2p.BOB" />
172            <group title="I2PSnark Application" packages="org.klomp.snark:org.klomp.snark.*" />
173            <group title="I2PTunnel Application" packages="net.i2p.i2ptunnel:net.i2p.i2ptunnel.*" />
174            <group title="SAM Bridge" packages="net.i2p.sam:net.i2p.sam.client" />
175            <group title="SusiDNS Application" packages="i2p.susi.dns" />
176            <group title="SusiMail Application" packages="i2p.susi.webmail:i2p.susi.webmail.*:i2p.susi.debug:i2p.susi.util" />
177            <group title="Systray Application" packages="net.i2p.apps.systray" />
178            <sourcepath>
179                <pathelement location="core/java/src" />
180                <!--<pathelement location="core/java/test" />-->
181                <pathelement location="router/java/src" />
182                <!--<pathelement location="router/java/test" />-->
183                <pathelement location="apps/ministreaming/java/src" />
184                <pathelement location="apps/streaming/java/src" />
185                <pathelement location="apps/i2ptunnel/java/src" />
186                <pathelement location="apps/systray/java/src" />
187                <pathelement location="apps/routerconsole/java/src" />
188                <pathelement location="apps/addressbook/java/src" />
189                <pathelement location="apps/i2psnark/java/src" />
190                <pathelement location="apps/sam/java/src" />
191                <pathelement location="apps/BOB/src" />
192                <pathelement location="apps/susidns/src/java/src" />
193                <pathelement location="apps/susimail/src/src" />
194            </sourcepath>
195            <classpath>
196                <pathelement location="apps/jetty/jettylib/org.mortbay.jetty.jar" />
197                <pathelement location="apps/jetty/jettylib/javax.servlet.jar" />
198                <pathelement location="apps/systray/java/lib/systray4j.jar" />
199                <pathelement location="apps/jrobin/jrobin-1.4.0.jar" />
200                <pathelement location="installer/lib/wrapper/win32/wrapper.jar" />
201                <pathelement location="core/lib/junit.jar" />               
202            </classpath>
203        </javadoc>
204    </target>
205    <target name="clean" depends="pkgclean" >
206        <delete dir="./build" />
207        <delete file="i2pinstall.exe" failonerror="false" quiet="true" />       
208        <delete file="i2p.exe" failonerror="false" quiet="true" />
209        <delete file="syndie-standalone.zip" failonerror="false" quiet="true" />
210        <delete file="i2psnark-standalone.zip" failonerror="false" quiet="true" />
211        <delete file="BOB-one.jar" failonerror="false" quiet="true" /> 
212    </target>
213    <target name="distclean" depends="clean">
214        <delete dir="debian/tmp" />
215        <delete file="debian/files" />
216        <ant dir="core/java/" target="distclean" />
217        <ant dir="router/java/" target="distclean" />
218        <ant dir="apps/ministreaming/java/" target="distclean" />
219        <ant dir="apps/streaming/java/" target="distclean" />
220        <ant dir="apps/i2ptunnel/java/" target="distclean" />
221        <ant dir="apps/sam/java/" target="distclean" />
222        <ant dir="apps/BOB" target="clean" />
223        <ant dir="apps/routerconsole/java/" target="distclean" />
224        <ant dir="apps/addressbook/" target="distclean" />
225        <ant dir="apps/susimail/" target="distclean" />
226        <ant dir="apps/susidns/src/" target="distclean" />
227        <ant dir="apps/systray/java/" target="distclean" />
228        <ant dir="apps/i2psnark/java/" target="distclean" />
229        <ant dir="apps/jetty/" target="distclean" />
230        <!--
231                NOTE! We need to turn off the default excludes for these
232                patterns to work.
233                These are the defaultexcludes in Ant as seen on
234                http://ant.apache.org/manual/CoreTasks/defaultexcludes.html
235                     **/*~
236                     **/#*#
237                     **/.#*
238                     **/%*%
239                     **/._*
240                     **/CVS
241                     **/CVS/**
242                     **/.cvsignore
243                     **/SCCS
244                     **/SCCS/**
245                     **/vssver.scc
246                     **/.svn
247                     **/.svn/**
248                     **/.DS_Store
249                The only recourse is to remove the offending ones.
250                We do this here, as we only need one change, and then put it
251                back after we are done with it.
252        -->
253        <defaultexcludes remove="**/*~"/>
254
255        <delete>
256            <fileset dir="." includes="**/*.class **/*.java~ **/*.txt~ **/*.xml~ **/*.sh~ **/*.SlackBuild~" />
257            <!--
258                Less common, but they pollute my workspace here, so we
259                might as well nuke these as well. Are there any others?
260               
261                !!??? Why don't we just nuke "**/*~" ???!!
262
263                ++Sponge
264            -->
265        </delete>
266        <!--
267                Now we put the defaults back
268        -->
269        <defaultexcludes default="true"/>
270    </target>
271
272    <target name="pkg" depends="distclean, updater, preppkg, installer" />
273
274    <target name="pkgclean" depends="deletepkg-temp">
275        <delete>
276            <fileset dir="." includes="i2p.tar.bz2 install.jar i2pupdate.zip i2pupdate200.zip" />
277        </delete>
278    </target>
279
280    <target name="preppkg" depends="preppkg-linux, preppkg-windows">
281        <copy file="build/jbigi.jar" todir="pkg-temp/lib" />
282        <copy todir="pkg-temp/lib/wrapper/freebsd/">
283            <fileset dir="installer/lib/wrapper/freebsd/" />
284        </copy>
285        <copy todir="pkg-temp/lib/wrapper/macosx/">
286            <fileset dir="installer/lib/wrapper/macosx/" />
287        </copy>
288        <copy todir="pkg-temp/lib/wrapper/solaris/">
289            <fileset dir="installer/lib/wrapper/solaris/" />
290        </copy>
291    </target>
292
293    <target name="preppkg-windows" depends="preppkg-base, buildexe">
294        <copy file="i2p.exe" todir="pkg-temp/" failonerror="false" />
295        <copy file="apps/systray/java/lib/systray4j.dll" todir="pkg-temp/lib" />
296        <copy file="apps/systray/java/resources/iggy.ico" todir="pkg-temp/icons" />
297        <copy file="apps/systray/java/resources/iggy.xpm" todir="pkg-temp/icons" />
298        <copy file="installer/resources/eepget.bat" todir="pkg-temp/" />
299        <copy file="installer/resources/i2prouter.bat" todir="pkg-temp/" />
300        <copy file="installer/resources/fixperms.bat" todir="pkg-temp/" />
301        <copy file="installer/resources/install_i2p_service_winnt.bat" todir="pkg-temp/" />
302        <copy file="installer/resources/postinstall.bat" todir="pkg-temp/" />
303        <copy file="installer/resources/uninstall_i2p_service_winnt.bat" todir="pkg-temp/" />
304        <copy todir="pkg-temp/lib/wrapper/win32/">
305            <fileset dir="installer/lib/wrapper/win32/" />
306        </copy>
307    </target>
308
309    <!-- only what is needed for debian, etc. -->
310    <target name="preppkg-linux-only" depends="preppkg-linux">
311        <!-- rip the non-linux stuff out of jbigi.jar -->
312        <mkdir dir="tmpextract" />
313        <unjar src="build/jbigi.jar" dest="tmpextract/" />
314        <jar destfile="pkg-temp/lib/jbigi.jar" >
315            <fileset dir="tmpextract/" includes="*linux*" />
316        </jar>
317        <delete dir="tmpextract/" />
318    </target>
319
320    <target name="preppkg-linux" depends="preppkg-base">
321        <copy file="installer/resources/runplain.sh" todir="pkg-temp/" />
322        <copy file="apps/i2psnark/launch-i2psnark" todir="pkg-temp/" />
323        <copy file="installer/resources/eepget" todir="pkg-temp/" />
324        <copy file="installer/resources/i2prouter" todir="pkg-temp/" />
325        <copy file="installer/resources/osid" todir="pkg-temp/" />
326        <copy file="installer/resources/postinstall.sh" todir="pkg-temp/" />
327        <copy todir="pkg-temp/lib/wrapper/linux/">
328            <fileset dir="installer/lib/wrapper/linux/" />
329        </copy>
330        <copy todir="pkg-temp/lib/wrapper/linux64/">
331            <fileset dir="installer/lib/wrapper/linux64/" />
332        </copy>
333    </target>
334
335    <target name="preppkg-base" depends="build, preplicenses, prepconsoleDocs">
336        <!-- if updater200 was run previously, it left *.pack files in pkg-temp -->
337        <delete>
338            <fileset dir="pkg-temp" includes="**/*.jar.pack **/*.war.pack" />
339        </delete>
340        <copy file="build/i2p.jar" todir="pkg-temp/lib/" />
341        <copy file="build/i2ptunnel.jar" todir="pkg-temp/lib/" />
342        <copy file="build/jasper-compiler.jar" todir="pkg-temp/lib/" />
343        <copy file="build/jasper-runtime.jar" todir="pkg-temp/lib/" />
344        <copy file="build/commons-logging.jar" todir="pkg-temp/lib/" />
345        <copy file="build/commons-el.jar" todir="pkg-temp/lib/" />
346        <copy file="build/javax.servlet.jar" todir="pkg-temp/lib/" />
347        <copy file="build/mstreaming.jar" todir="pkg-temp/lib/" />
348        <copy file="build/streaming.jar" todir="pkg-temp/lib/" />
349        <copy file="build/org.mortbay.jetty.jar" todir="pkg-temp/lib/" />
350        <copy file="build/router.jar" todir="pkg-temp/lib/" />
351        <copy file="build/routerconsole.jar" todir="pkg-temp/lib/" />
352        <!-- pulled out of routerconsole.jar in 0.7.12; name without version so we can overwrite if we upgrade  -->
353        <copy file="apps/jrobin/jrobin-1.4.0.jar" tofile="pkg-temp/lib/jrobin.jar" />
354        <copy file="build/sam.jar" todir="pkg-temp/lib/" />
355        <copy file="build/BOB.jar" todir="pkg-temp/lib/" />
356        <copy file="build/systray.jar" todir="pkg-temp/lib" />
357        <copy file="build/i2psnark.jar" todir="pkg-temp/lib/" />
358        <copy file="apps/systray/java/lib/systray4j.jar" todir="pkg-temp/lib" />
359        <copy file="build/i2ptunnel.war" todir="pkg-temp/webapps/" />
360        <copy file="build/routerconsole.war" todir="pkg-temp/webapps/" />
361        <copy file="build/addressbook.war" todir="pkg-temp/webapps/" />
362        <copy file="build/susimail.war" todir="pkg-temp/webapps/" />
363        <copy file="build/susidns.war" todir="pkg-temp/webapps/" />
364        <copy file="apps/susidns/src/WEB-INF/lib/jstl.jar" todir="pkg-temp/lib/" />
365        <copy file="apps/susidns/src/WEB-INF/lib/standard.jar" todir="pkg-temp/lib/" />
366        <copy file="build/i2psnark.war" todir="pkg-temp/webapps/" />
367        <copy file="apps/i2psnark/jetty-i2psnark.xml" todir="pkg-temp/" />
368        <copy file="apps/i2psnark/i2psnark.config" todir="pkg-temp/" />
369        <copy file="installer/resources/blocklist.txt" todir="pkg-temp/" />
370        <copy file="installer/resources/clients.config" todir="pkg-temp/" />
371        <copy file="installer/resources/i2ptunnel.config" todir="pkg-temp/" />
372        <copy file="installer/resources/systray.config" todir="pkg-temp/" />
373        <copy file="installer/resources/wrapper.config" todir="pkg-temp/" />
374        <copy file="installer/resources/hosts.txt" todir="pkg-temp/" />
375        <copy file="INSTALL-headless.txt" todir="pkg-temp/" />
376        <!-- overwrite the truncated history put in by the updater -->
377        <copy file="history.txt" todir="pkg-temp/" overwrite="true" />
378        <mkdir dir="pkg-temp/scripts" />
379        <copy file="apps/proxyscript/i2pProxy.pac" todir="pkg-temp/scripts/" />
380        <!-- overwrite the news put in by the updater -->
381        <copy file="installer/resources/initialNews.xml" tofile="pkg-temp/docs/news.xml" overwrite="true" />
382        <copy file="installer/resources/startconsole.html" todir="pkg-temp/docs/" />
383        <copy file="installer/resources/start.ico" todir="pkg-temp/docs/" />
384        <copy file="installer/resources/console.ico" todir="pkg-temp/docs/" />
385        <copy file="installer/resources/uninstall.ico" todir="pkg-temp/docs/" />
386        <mkdir dir="pkg-temp/docs/themes/" />
387        <copy todir="pkg-temp/docs/themes/" >
388          <fileset dir="installer/resources/themes/" />
389        </copy>
390        <!-- Eepsite stuff here -->
391        <mkdir dir="pkg-temp/eepsite" />
392        <mkdir dir="pkg-temp/eepsite/webapps" />
393        <mkdir dir="pkg-temp/eepsite/logs" />
394        <mkdir dir="pkg-temp/eepsite/cgi-bin" />
395        <mkdir dir="pkg-temp/eepsite/docroot" />
396        <mkdir dir="pkg-temp/eepsite/docroot/help" />
397        <mkdir dir="pkg-temp/eepsite/docroot/help/lib" />
398        <copy todir="pkg-temp/eepsite/docroot/" >
399            <fileset dir="installer/resources/eepsite.help/"  includes="robots.txt index.html help/pagetemplate.html help/index*.html **/*.png **/*.css" />
400        </copy>
401        <copy file="installer/resources/themes/console/images/favicon.ico" tofile="pkg-temp/eepsite/docroot/favicon.ico" />
402        <copy file="installer/resources/jetty.xml" tofile="pkg-temp/eepsite/jetty.xml" />
403    </target>
404
405    <target name="preplicenses">
406        <copy file="LICENSE.txt" todir="pkg-temp/" />
407        <copy todir="pkg-temp/licenses/" >
408          <fileset dir="licenses/" />
409        </copy>
410        <!--
411              The license in launch4j/ is a BSD license for launch4j
412              The license in launch4j/head is a MIT license for the code that is actually wrapped around the jars
413              So we include the MIT one in our binary package
414         -->
415        <copy file="installer/lib/launch4j/head/LICENSE.txt" tofile="pkg-temp/licenses/LICENSE-Launch4j.txt" />
416        <!--  Not sure if these are used or should be included -->
417        <copy file="installer/lib/launch4j/lib/foxtrot.LICENSE.txt" tofile="pkg-temp/licenses/LICENSE-Foxtrot.txt" />
418        <copy file="installer/lib/launch4j/lib/JGoodies.Forms.LICENSE.txt" tofile="pkg-temp/licenses/LICENSE-JGoodies-Forms.txt" />
419        <copy file="installer/lib/launch4j/lib/JGoodies.Looks.LICENSE.txt" tofile="pkg-temp/licenses/LICENSE-JGoodies-Looks.txt" />
420        <copy file="installer/lib/launch4j/lib/XStream.LICENSE.txt" tofile="pkg-temp/licenses/LICENSE-XStream.txt" />
421    </target>
422    <target name="prepthemeupdates">
423        <!-- Migrated all Snark content to its own dir. Need to ensure snark dir excluded from console theme choices!! -->
424        <!-- Snark's visible Assets -->
425        <copy todir="pkg-temp/docs/themes/snark/ubergine/" >
426            <fileset dir="installer/resources/themes/snark/ubergine/" />
427        </copy>
428        <!-- No need to copy these individually, we're copying the whole dir below..
429        <copy file="installer/resources/themes/console/images/favicon.ico" todir="pkg-temp/docs/themes/console/images/" />
430        <copy file="installer/resources/themes/console/images/i2plogo.png" todir="pkg-temp/docs/themes/console/images/" />
431        -->
432        <!-- Since the logo moved, we have to update the error pages -->
433        <copy todir="pkg-temp/docs/" >
434          <fileset dir="installer/resources/proxy" />
435        </copy>
436        <!-- make a "classic" theme -->
437        <copy todir="pkg-temp/docs/themes/console/classic/" >
438            <fileset  dir="installer/resources/themes/console/classic/" />
439        </copy>
440        <!-- Add dark theme -->
441        <copy todir="pkg-temp/docs/themes/console/dark/" >
442            <fileset  dir="installer/resources/themes/console/dark/" />
443        </copy>
444        <!-- Add light theme -->
445        <copy todir="pkg-temp/docs/themes/console/light/" >
446            <fileset  dir="installer/resources/themes/console/light/" />
447        </copy>
448         <!-- Add midnight theme -->
449        <copy todir="pkg-temp/docs/themes/console/midnight/" >
450            <fileset  dir="installer/resources/themes/console/midnight/" />
451        </copy>       
452        <!-- Add shared images.. these are subject to flux and change! -->
453        <copy todir="pkg-temp/docs/themes/console/images/" >
454            <fileset  dir="installer/resources/themes/console/images/" />
455        </copy>         
456        <copy todir="pkg-temp/docs/" >
457          <fileset dir="installer/resources/readme/" includes="readme*.html" />
458        </copy>
459    </target>
460
461    <!-- this is no longer required, izpack 4.3.0 supports headless installs with java -jar i2pinstall.exe -console -->
462    <target name="tarball" depends="preppkg">
463        <tar compression="bzip2" destfile="i2p.tar.bz2">
464            <tarfileset dir="pkg-temp" includes="**/*" prefix="i2p" />
465        </tar>
466    </target>
467    <target name="deletepkg-temp">
468        <delete dir="pkg-temp" />
469    </target>
470    <target name="prepconsoleDocs" depends="prepgeoupdate">
471        <copy todir="pkg-temp/docs/" >
472          <fileset dir="installer/resources/readme/" includes="readme*.html" />
473          <fileset dir="installer/resources/proxy" />
474        </copy>
475    </target>
476    <target name="consoleDocs" depends="deletepkg-temp, prepconsoleDocs">
477        <zip destfile="docs.zip" basedir="pkg-temp" whenempty="fail" />
478    </target>
479
480    <target name="updater200" depends="prepupdate, preplicenses, pack200, zipit200" />
481    <target name="updater200WithJettyFixes" depends="prepjupdatefixes, preplicenses, pack200, zipit200" />
482    <target name="updater" depends="prepupdate, preplicenses, zipit" />
483    <target name="updaterWithGeoIP" depends="prepupdate, prepgeoupdate, preplicenses, zipit" />
484    <target name="updaterWithJetty" depends="prepjupdate, preplicenses, zipit" />
485    <target name="updaterWithJettyFixes" depends="prepjupdatefixes, preplicenses, zipit" />
486    <target name="updaterWithJettyFixesAndGeoIP" depends="prepjupdatefixes, prepgeoupdate, preplicenses, zipit" />
487    <target name="updaterSmall" depends="prepupdateSmall, zipit" />
488    <target name="updaterRouter" depends="prepupdateRouter, zipit" />
489    <target name="zipit">
490        <zip destfile="i2pupdate.zip" basedir="pkg-temp" whenempty="fail" />
491       <!-- just a test, makes almost no difference
492        <tar destfile="i2pupdate.tgz" basedir="pkg-temp" compression="gzip" />
493        <tar destfile="i2pupdate.tbz" basedir="pkg-temp" compression="bzip2" />
494       -->
495    </target>
496    <target name="zipit200">
497        <zip destfile="i2pupdate200.zip" basedir="pkg-temp" whenempty="fail" />
498    </target>
499
500    <target name="pack200">
501<!-- *nix here -->
502        <exec executable="sh" osfamily="unix" failonerror="true">
503            <arg value="-c" />
504            <arg value="for i in pkg-temp/lib/*.jar pkg-temp/webapps/*war; do echo pack200 $i; mv $i $i.jar; pack200 -g $i.pack $i.jar; rm -f $i.jar; done" />
505        </exec>
506        <exec executable="sh" osfamily="mac" failonerror="true">
507            <arg value="-c" />
508            <!-- pack200 will only pack to a .pack file, and only from a .jar file, so we put another .jar on the end -->
509            <arg value="for i in pkg-temp/lib/*.jar pkg-temp/webapps/*war; do echo pack200 $i; mv $i $i.jar; pack200 -g $i.pack $i.jar; rm -f $i.jar; done" />
510        </exec>
511<!-- windoz here : i admit, i hate escaped symbols in xml, indeed = =! -->
512                <exec executable="cmd" osfamily="windows" failonerror="true">
513                        <arg value="/c" />
514                        <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" />
515        </exec>
516                <exec executable="cmd" osfamily="windows" failonerror="true">
517                        <arg value="/c" />
518                        <arg value="for %i in (pkg-temp\lib\*.jar) do move %i %i.jar &amp;&amp; pack200 -g pkg-temp\lib\%~ni.jar.pack %i.jar &amp;&amp; del %i.jar" />
519        </exec>
520    </target>
521
522    <target name="updateTest" depends="prepupdate">
523        <ant dir="core/java/" target="jarTest" />   
524        <copy file="core/java/build/i2ptest.jar" todir="pkg-temp/lib" />
525        <zip destfile="i2pupdate.zip" basedir="pkg-temp" />
526    </target>
527    <target name="prepupdate" depends="build2, prepupdateSmall">
528        <copy file="build/BOB.jar" todir="pkg-temp/lib/" />
529        <copy file="build/sam.jar" todir="pkg-temp/lib/" />
530        <copy file="build/i2psnark.jar" todir="pkg-temp/lib" />
531        <!-- include systray changes in 0.7.5 -->
532        <copy file="build/systray.jar" todir="pkg-temp/lib/" />
533        <copy file="build/susimail.war" todir="pkg-temp/webapps/" />
534        <copy file="build/susidns.war" todir="pkg-temp/webapps/" />
535        <!-- as of 0.7.12; someday, we can remove these from the updater -->
536        <copy file="apps/susidns/src/WEB-INF/lib/jstl.jar" todir="pkg-temp/lib/" />
537        <copy file="apps/susidns/src/WEB-INF/lib/standard.jar" todir="pkg-temp/lib/" />
538        <copy file="build/i2psnark.war" todir="pkg-temp/webapps/" />
539        <copy file="history.txt" todir="pkg-temp/" />
540        <!-- the following overwrites history.txt on unix to shrink the update file -->
541        <exec executable="head" osfamily="unix" failifexecutionfails="true" output="pkg-temp/history.txt">
542            <arg value="-n" />
543            <arg value="1500" />
544            <arg value="history.txt" />
545        </exec>
546        <exec executable="echo" osfamily="unix" failifexecutionfails="true" output="pkg-temp/history.txt" append="true">
547            <arg value="EARLIER HISTORY IS AVAILABLE IN THE SOURCE PACKAGE" />
548        </exec>
549        <!-- may be pointless now, people with split directories will never see this -->
550        <copy file="installer/resources/news.xml" todir="pkg-temp/docs/" />
551    </target>
552    <target name="prepupdateSmall" depends="buildSmall, prepupdateRouter, prepthemeupdates">
553        <copy file="build/i2ptunnel.jar" todir="pkg-temp/lib/" />
554        <copy file="build/mstreaming.jar" todir="pkg-temp/lib/" />
555        <copy file="build/streaming.jar" todir="pkg-temp/lib/" />
556        <copy file="build/routerconsole.jar" todir="pkg-temp/lib/" />
557        <!-- pulled out of routerconsole.jar in 0.7.12, someday we can take out of updater -->
558        <!-- name without version so we can overwrite if we upgrade  -->
559        <copy file="apps/jrobin/jrobin-1.4.0.jar" tofile="pkg-temp/lib/jrobin.jar" />
560        <copy file="build/i2ptunnel.war" todir="pkg-temp/webapps/" />
561        <copy file="build/routerconsole.war" todir="pkg-temp/webapps/" />
562        <copy file="build/addressbook.war" todir="pkg-temp/webapps/" />
563        <!-- decapitalized the file in 0.7.8 -->
564       <copy file="installer/resources/countries.txt" todir="pkg-temp/geoip/" />
565    </target>
566    <target name="prepupdateRouter" depends="buildrouter, deletepkg-temp">
567        <copy file="build/i2p.jar" todir="pkg-temp/lib/" />
568        <copy file="build/router.jar" todir="pkg-temp/lib/" />
569    </target>
570    <target name="prepgeoupdate">
571        <copy file="installer/resources/geoip.txt" todir="pkg-temp/geoip/" />
572        <copy file="installer/resources/countries.txt" todir="pkg-temp/geoip/" />
573        <copy todir="pkg-temp/docs/icons/flags" >
574          <fileset dir="installer/resources/icons/flags" />
575        </copy>
576    </target>
577    <target name="prepjupdate" depends="prepupdate, buildWEB">
578        <copy file="build/jasper-compiler.jar" todir="pkg-temp/lib/" />
579        <copy file="build/jasper-runtime.jar" todir="pkg-temp/lib/" />
580        <copy file="build/commons-logging.jar" todir="pkg-temp/lib/" />
581        <copy file="build/commons-el.jar" todir="pkg-temp/lib/" />
582        <copy file="build/javax.servlet.jar" todir="pkg-temp/lib/" />
583        <copy file="build/org.mortbay.jetty.jar" todir="pkg-temp/lib/" />
584    </target>
585    <target name="prepjupdatefixes" depends="prepupdate, buildWEB">
586        <copy file="build/org.mortbay.jetty.jar" todir="pkg-temp/lib/" />
587    </target>
588    <target name="installer" depends="preppkg">
589        <taskdef name="izpack" classpath="${basedir}/installer/lib/izpack/standalone-compiler.jar" classname="com.izforge.izpack.ant.IzPackTask" />
590        <mkdir dir="pkg-temp/installer" />
591        <jar destfile="./pkg-temp/installer/copy.jar" basedir="./core/java/build/obj" includes="net/i2p/util/Copy.class net/i2p/util/FileUtil.class">
592            <manifest><attribute name="Main-Class" value="net.i2p.util.Copy" /></manifest>
593        </jar>
594        <jar destfile="./pkg-temp/installer/delete.jar" basedir="./core/java/build/obj" includes="net/i2p/util/Delete.class net/i2p/util/FileUtil.class">
595            <manifest><attribute name="Main-Class" value="net.i2p.util.Delete" /></manifest>
596        </jar>
597        <jar destfile="./pkg-temp/installer/exec.jar" basedir="./core/java/build/obj" includes="net/i2p/util/Exec.class">
598            <manifest><attribute name="Main-Class" value="net.i2p.util.Exec" /></manifest>
599        </jar>
600        <!--
601          Force 1.5 pack200 output
602          Doesnt work!
603          http://jira.codehaus.org/browse/IZPACK-404
604          http://forums.sun.com/thread.jspa?threadID=773439
605          http://bfo.co.uk/blog/2010/05/13/combining_ant_jar_signatures_and_pack200.html
606        <property name="com.sun.java.util.jar.pack.package.majver" value="150" />
607        <property name="com.sun.java.util.jar.pack.package.minver" value="7" />
608        -->
609        <izpack input="${basedir}/installer/install.xml" output="${basedir}/install.jar" installerType="standard" basedir="${basedir}" />
610
611        <ant target="installerexe" />
612    </target>
613    <target name="installerexe">
614        <condition property="noExe">
615            <os arch="x86_64" />
616        </condition>
617        <condition property="noExe">
618            <os arch="amd64" />
619        </condition>
620        <condition property="noExe">
621           <not>
622            <or>
623             <os name="Linux" />
624             <os family="windows" />
625            </or>
626           </not>
627        </condition>
628        <ant target="doInstallerEXE" />
629    </target>
630    <target name="doInstallerEXE" unless="noExe">
631        <!-- now the installer exe -->
632        <taskdef name="launch4j"
633                 classname="net.sf.launch4j.ant.Launch4jTask"
634                 classpath="${basedir}/installer/lib/launch4j/launch4j.jar:${basedir}/installer/lib/launch4j/lib/xstream.jar" />
635        <launch4j configFile="./installer/i2pinstaller.xml" />
636        <launch4j configFile="./installer/i2pstandalone.xml" />
637        <!-- thazzit -->
638    </target>
639    <target name="test">
640        <ant dir="core/java/" target="test" />
641    </target>
642    <target name="junit.report">
643        <ant dir="core/java/" target="junit.report" />
644    </target>
645    <target name="clover.report">
646        <ant dir="core/java/" target="clover.report" />
647    </target>
648    <target name="test.report" depends="junit.report, clover.report"/>
649    <target name="fulltest">
650                <ant dir="core/java/" target="fulltest" />
651                <ant dir="router/java/" target="fulltest" />
652    </target>
653    <target name="fullclovertest">
654                <ant dir="core/java/" target="fullclovertest" />
655                <ant dir="router/java/" target="fullclovertest" />
656    </target>
657    <target name="syndie" >
658        <ant dir="apps/syndie/java/" target="standalone" />
659        <copy file="apps/syndie/java/syndie-standalone.zip" todir="." />
660    </target>
661    <target name="i2psnark">
662        <ant dir="apps/i2psnark/java" target="standalone" />
663        <copy file="apps/i2psnark/java/i2psnark-standalone.zip" todir="." />
664    </target>
665    <target name="slackpkg">
666        <echo message="Building Slackware package." />
667        <ant dir="Slackware/i2p/" target="slackpkg" />
668        <ant dir="Slackware/i2p-base/" target="slackpkg" />
669    </target>
670    <target name="justBOB" depends="builddepSmall">
671        <ant dir="apps/BOB/" target="onejar" />
672        <copy file="apps/BOB/dist/BOB-one.jar" todir="." />
673    </target>
674    <target name="findbugs" depends="build2">
675        <echo message="Starting findbugs, this will take a while..." />
676        <exec executable="nice">
677            <arg value="findbugs"/>
678            <arg value="-textui"/>
679            <arg value="-projectName"/>
680            <arg value="i2p"/>
681            <arg value="-sortByClass"/>
682            <arg value="-xml"/>
683            <arg value="-output"/>
684            <arg value="findbugs.xml"/>
685            <arg value="-auxclasspath"/>
686            <arg value="build/commons-el.jar:build/commons-logging.jar:build/jasper-compiler.jar:build/jasper-runtime.jar:build/javax.servlet.jar:build/org.mortbay.jetty.jar:apps/jrobin/jrobin-1.4.0.jar:apps/systray/java/lib/systray4j.jar:installer/lib/wrapper/linux/wrapper.jar"/>
687            <arg value="-sourcepath"/>
688            <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/"/>
689            <!-- start of the files to be analyzed -->
690            <arg value="build/BOB.jar"/>
691            <arg value="build/addressbook.war"/>
692            <arg value="build/i2p.jar"/>
693            <arg value="build/i2psnark.jar"/>
694            <arg value="build/i2psnark.war"/>
695            <arg value="build/i2ptunnel.jar"/>
696            <arg value="build/i2ptunnel.war"/>
697            <arg value="build/jbigi.jar"/>
698            <arg value="build/mstreaming.jar"/>
699            <arg value="build/router.jar/"/>
700            <!-- use the class files rather than the jar for routerconsole so we don't analyze jrobin -->
701            <arg value="apps/routerconsole/java/build/obj/"/>
702            <arg value="build/sam.jar"/>
703            <arg value="build/streaming.jar"/>
704            <arg value="build/susidns.war"/>
705            <arg value="build/susimail.war"/>
706            <arg value="build/systray.jar"/>
707        </exec>
708        <echo message="Findbugs output stored in findbugs.xml" />
709    </target>
710    <target name="buildWithDesktopgui" depends="buildrouter,builddepSmall">
711        <ant dir="apps/desktopgui" target="build_jar" />
712    </target>
713    <target name="preppkgWithDesktopgui" depends="buildWithDesktopgui,preppkg">
714        <copy file="apps/desktopgui/dist/desktopgui.jar" todir="pkg-temp/lib/" />
715        <copy file="apps/desktopgui/lib/swing-worker.jar" todir="pkg-temp/lib/" />
716        <copy file="apps/desktopgui/lib/appframework.jar" todir="pkg-temp/lib/" />
717        <mkdir dir="pkg-temp/desktopgui/resources/" />
718        <copy todir="pkg-temp/desktopgui/resources/">
719            <fileset dir="apps/desktopgui/desktopgui/resources/" />
720        </copy>
721    </target>
722    <target name="installerWithDesktopgui" depends="preppkgWithDesktopgui,installer" />
723    <target name="prepupdateWithDesktopgui" depends="buildWithDesktopgui,prepupdate">
724        <copy file="apps/desktopgui/dist/desktopgui.jar" todir="pkg-temp/lib/" />
725        <copy file="apps/desktopgui/lib/swing-worker.jar" todir="pkg-temp/lib/" />
726        <copy file="apps/desktopgui/lib/appframework.jar" todir="pkg-temp/lib/" />
727        <mkdir dir="pkg-temp/desktopgui/resources/" />
728        <copy todir="pkg-temp/desktopgui/resources/">
729            <fileset dir="apps/desktopgui/desktopgui/resources/" />
730        </copy>
731    </target>
732    <target name="updaterWithDesktopgui" depends="prepupdateWithDesktopgui,updater" />
733    <target name="pkgWithDesktopgui" depends="distclean, updaterWithDesktopgui, installerWithDesktopgui, preppkg" />
734    <target name="distWithDesktopgui" depends="pkgWithDesktopgui, javadoc" />
735    <target name="distcleanWithDesktopgui" depends="distclean">
736        <ant dir="apps/desktopgui" target="build_clean" />
737    </target>
738
739    <!-- this is the same dependency as pkg, but with updater200 in the middle,
740         since preppkg puts too much stuff in pkg-temp -->
741    <target name="release" depends="distclean, updater, updater200, preppkg, installer" >
742        <echo message="================================================================" />
743        <echo message="Did you update these files?" />
744        <exec executable="ls" failonerror="true">
745            <arg value="-l" />
746            <arg value="history.txt" />
747            <arg value="installer/resources/initialNews.xml" />
748            <arg value="installer/install.xml" />
749            <arg value="installer/resources/news.xml" />
750            <arg value="core/java/src/net/i2p/CoreVersion.java" />
751            <arg value="router/java/src/net/i2p/router/RouterVersion.java" />
752        </exec>
753        <echo message="Everything is checked in, right? Let's be sure:" />
754        <exec executable="mtn" failonerror="true">
755            <arg value="st" />
756        </exec>
757        <echo message="If there are any modified files above, stop now!" />
758        <!-- get release version number -->
759        <exec executable="grep" outputproperty="versionLine" failonerror="true" >
760            <arg value="public final static String VERSION" />
761            <arg value="core/java/src/net/i2p/CoreVersion.java" />
762        </exec>
763        <exec executable="cut" inputstring="${versionLine}" outputproperty="release.number" failonerror="true" >
764            <arg value="-f2" />
765            <arg value="-d&quot;" />
766        </exec>
767        <echo message="New version number is ${release.number}" />
768        <copy file="i2pupdate.zip" tofile="i2pupdate_${release.number}.zip" />
769        <copy file="i2pinstall.exe" tofile="i2pinstall_${release.number}.exe" />
770        <delete file="i2pupdate.sud" failonerror="false" />
771        <delete file="i2pupdate.su2" failonerror="false" />
772        <input message="Enter private signing key file:" addproperty="release.privkey" />
773        <fail message="You must enter a path." >
774            <condition>
775                <equals arg1="${release.privkey}" arg2=""/>
776            </condition>
777        </fail>
778        <echo message="Key file is ${release.privkey}" />
779        <java classname="net.i2p.crypto.TrustedUpdate" fork="true" failonerror="true">
780            <classpath>
781                <pathelement location="build/i2p.jar" />
782            </classpath>
783            <arg value="sign" />
784            <arg value="i2pupdate.zip" />
785            <arg value="i2pupdate.sud" />
786            <arg value="${release.privkey}" />
787            <arg value="${release.number}" />
788        </java>
789        <echo message="Verify version and VALID signature:" />
790        <java classname="net.i2p.crypto.TrustedUpdate" fork="true" failonerror="true">
791            <classpath>
792                <pathelement location="build/i2p.jar" />
793            </classpath>
794            <arg value="verifysig" />
795            <arg value="i2pupdate.sud" />
796        </java>
797        <java classname="net.i2p.crypto.TrustedUpdate" fork="true" failonerror="true">
798            <classpath>
799                <pathelement location="build/i2p.jar" />
800            </classpath>
801            <arg value="showversion" />
802            <arg value="i2pupdate.sud" />
803        </java>
804        <!-- now build and verify the packed sud from the packed zip -->
805        <java classname="net.i2p.crypto.TrustedUpdate" fork="true" failonerror="true">
806            <classpath>
807                <pathelement location="build/i2p.jar" />
808            </classpath>
809            <arg value="sign" />
810            <arg value="i2pupdate200.zip" />
811            <arg value="i2pupdate.su2" />
812            <arg value="${release.privkey}" />
813            <arg value="${release.number}" />
814        </java>
815        <echo message="Verify version and VALID signature:" />
816        <java classname="net.i2p.crypto.TrustedUpdate" fork="true" failonerror="true">
817            <classpath>
818                <pathelement location="build/i2p.jar" />
819            </classpath>
820            <arg value="verifysig" />
821            <arg value="i2pupdate.su2" />
822        </java>
823        <java classname="net.i2p.crypto.TrustedUpdate" fork="true" failonerror="true">
824            <classpath>
825                <pathelement location="build/i2p.jar" />
826            </classpath>
827            <arg value="showversion" />
828            <arg value="i2pupdate.su2" />
829        </java>
830        <!-- will this use the monotonerc file in the current workspace? -->
831        <echo message="Checking out fresh copy into ../i2p-${release.number} for tarballing:" />
832        <delete dir="../i2p-${release.number}" />
833        <exec executable="mtn" failonerror="true">
834            <arg value="co" />
835            <arg value="-b" />
836            <arg value="i2p.i2p" />
837            <!-- w: is the revision of the current workspace -->
838            <arg value="-r" />
839            <arg value="w:" />
840            <arg value="../i2p-${release.number}/" />
841        </exec>
842        <exec executable="tar" failonerror="true">
843            <arg value="cjf" />
844            <arg value="i2psource_${release.number}.tar.bz2" />
845            <arg value="-C" />
846            <arg value=".." />
847            <arg value="--exclude" />
848            <arg value="i2p-${release.number}/_MTN*" />
849            <arg value="i2p-${release.number}/" />
850        </exec>
851        <echo message="Sign the files:" />
852        <delete file="i2pinstall_${release.number}.exe.sig" />
853        <delete file="i2psource_${release.number}.tar.bz2.sig" />
854        <delete file="i2pupdate_${release.number}.zip.sig" />
855        <exec executable="gpg" failonerror="true">
856            <arg value="-b" />
857            <arg value="i2pinstall_${release.number}.exe" />
858        </exec>
859        <exec executable="gpg" failonerror="true">
860            <arg value="-b" />
861            <arg value="i2psource_${release.number}.tar.bz2" />
862        </exec>
863        <exec executable="gpg" failonerror="true">
864            <arg value="-b" />
865            <arg value="i2pupdate_${release.number}.zip" />
866        </exec>
867        <echo message="File sizes:" />
868        <exec executable="ls" failonerror="true">
869            <arg value="-l" />
870            <arg value="i2pinstall_${release.number}.exe" />
871            <arg value="i2psource_${release.number}.tar.bz2" />
872            <arg value="i2pupdate_${release.number}.zip" />
873            <arg value="i2pupdate.su2" />
874            <arg value="i2pupdate.sud" />
875            <arg value="i2pinstall_${release.number}.exe.sig" />
876            <arg value="i2psource_${release.number}.tar.bz2.sig" />
877            <arg value="i2pupdate_${release.number}.zip.sig" />
878        </exec>
879        <echo message="SHA256 sums:" />
880        <exec executable="sha256sum" failonerror="true">
881            <arg value="i2pinstall_${release.number}.exe" />
882            <arg value="i2psource_${release.number}.tar.bz2" />
883            <arg value="i2pupdate_${release.number}.zip" />
884            <arg value="i2pupdate.su2" />
885            <arg value="i2pupdate.sud" />
886        </exec>
887        <echo message="Don't forget to mtn tag w: i2p-${release.number}" />
888        <echo message="... and mtn cert t:i2p-${release.number} branch i2p.i2p.release" />
889    </target>
890
891    <target name="debian">
892        <!-- binary only -->
893        <echo message="Did you update the version in these files?" />
894        <exec executable="ls" failonerror="true">
895            <arg value="-l" />
896            <arg value="debian/changelog" />
897        </exec>
898        <echo message="====================" />
899        <exec executable="dpkg-buildpackage" failifexecutionfails="true" >
900            <arg value="-b" />
901        </exec>
902    </target>
903    <target name="debian-source">
904        <!-- bundle the 20MB jetty 5 lib since there probably isn't a deb for it -->
905        <ant dir="apps/jetty" target="verifyJettylib" />
906        <echo message="Did you update the version in these files?" />
907        <exec executable="ls" failonerror="true">
908            <arg value="-l" />
909            <arg value="debian/changelog" />
910        </exec>
911        <echo message="====================" />
912        <exec executable="dpkg-buildpackage" failifexecutionfails="true" >
913            <arg value="-S" />
914            <arg value="-I_MTN" />
915        </exec>
916    </target>
917
918<!-- the following are appened to help build barebone portable version,
919     none of the above is modified for this purpose -->
920        <target name = "pkg-portable-clean">
921                <delete dir="build/" />
922                <delete dir="pkg-temp/" />
923                <delete>
924                        <fileset dir="." includes="portable-**.zip**" />
925                </delete>
926        </target>
927<!-- build a portable archive -->
928
929<!-- *0* Since we simply pack all files in folder "build/" into our archieve,
930                we need to make sure its small, with NO redundent jars or wars.
931                thus cleaning is required before each build-->
932        <target name="buildSmallOnly" depends="pkg-portable-clean,buildSmall"/>
933<!-- *1* preparing the jars by OS dependent de-bloating -->
934        <target name="preppkg-portable-win32-jbigi" depends="buildSmallOnly">
935                <!-- rip the non-windows stuff out of jbigi.jar -->
936                <mkdir dir="tmpextract" />
937                <unjar src="build/jbigi.jar" dest="tmpextract/" />
938                <jar destfile="build/jbigi.jar" >
939                        <fileset dir="tmpextract/" includes="*windows*" />
940                </jar>
941                <delete dir="tmpextract/" />
942        </target>
943        <target name="preppkg-portable-linux-jbigi"  depends="buildSmallOnly">
944                <!-- rip the non-linux stuff out of jbigi.jar -->
945                <mkdir dir="tmpextract" />
946                <unjar src="build/jbigi.jar" dest="tmpextract/" />
947                <jar destfile="build/jbigi.jar" >
948                        <fileset dir="tmpextract/" includes="*linux*" />
949                </jar>
950                <delete dir="tmpextract/" />
951        </target>
952
953<!-- *2* os independent procedure  -->
954        <target name="preppkg-portable-basic" >
955                <mkdir dir="pkg-temp" />
956                        <!-- non OS dependent configurations only, dont add *nux/win stuff here -->
957                        <copy todir="pkg-temp">
958                                <fileset dir="installer/resources/portable/configs/" />
959                        </copy>
960                        <copy file="installer/resources/blocklist.txt" todir="pkg-temp/" />
961                        <copy file="installer/resources/hosts.txt" todir="pkg-temp/" />
962                        <copy file="installer/resources/readme.license.txt" todir="pkg-temp/" />
963                <mkdir dir="pkg-temp/addressbook" />
964                        <copy file="apps/addressbook/subscriptions.txt" todir="pkg-temp/addressbook/" />
965                        <copy file="apps/addressbook/myhosts.txt"  todir="pkg-temp/addressbook/" />
966                        <!-- config.txt is in installer/resources/portable -->
967                <mkdir dir="pkg-temp/docs" />
968                        <copy file="installer/resources/initialNews.xml" tofile="pkg-temp/docs/news.xml" overwrite="true" />
969                        <copy file="installer/resources/readme/readme.html" tofile="pkg-temp/docs/readme.html" />
970                        <copy file="installer/resources/startconsole.html" todir="pkg-temp/docs/" />
971                        <copy file="installer/resources/start.ico" todir="pkg-temp/docs/" />
972                        <copy file="installer/resources/console.ico" todir="pkg-temp/docs/" />
973                        <!-- HTTP Header files, english only,
974                                if you need a different lang do it in a sepreate target -->
975                        <copy todir="pkg-temp/docs/" >
976                                <fileset dir="installer/resources/proxy/"  includes="**-header.ht" />
977                        </copy>
978                        <!-- Theme light only -->
979                        <copy todir="pkg-temp/docs/themes/console/light/" overwrite="true" >
980                                <fileset dir="installer/resources/themes/console/light/" includes="**.css" />
981                        </copy>
982<!-- @dr.zed where is your CJK fix for the default theme ??     put it here             <copy file="installer/resources/themes/console/classic/console_big.css" todir="portable/docs/themes/console/light/" / -->
983                        <copy todir="pkg-temp/docs/themes/console/images/" >
984                                <fileset dir="installer/resources/themes/console/images/" />
985                        </copy>
986                        <!-- FLAGs for language icon (not for ip)-->
987                        <copy todir="pkg-temp/docs/icons/flags" >
988                                <fileset dir="installer/resources/icons/flags/" includes="cn.png,de.png,fr.png,nl.png,ru.png,se.png,us.png" />
989                        </copy>
990                <mkdir dir="pkg-temp/webapps" />
991                        <copy todir="pkg-temp/webapps/">
992                                <fileset dir="build/" includes="**.war" />
993                        </copy>
994                <mkdir dir="pkg-temp/lib" />
995                        <copy todir ="pkg-temp/lib/" >
996                                <fileset dir="build/" includes="**.jar" />
997                        </copy>
998                        <!-- 3rd party jars from apps/  -->
999                                <!-- jrobin - without jobin , you lost graph and get a lot error entry in logs -->
1000                        <copy file="apps/jrobin/jrobin-1.4.0.jar" tofile="pkg-temp/lib/jrobin.jar" />
1001        </target>
1002<!-- *3* os dependent procedure/commands -->
1003        <target name = "preppkg-portable-win32" depends="preppkg-portable-win32-jbigi,preppkg-portable-basic">
1004                        <!-- systray4.j  - why do we need trayicons for portable version ? dependency hardcoded in console -->
1005                <copy file="apps/systray/java/lib/systray4j.dll" todir="pkg-temp/lib" />
1006                <copy file="apps/systray/java/lib/systray4j.jar" todir="pkg-temp/lib" />
1007                        <!--wrapper - dont even think about it. i2p cosumes appreantly more mem without it on win32-->
1008                <copy file="installer/lib/wrapper/win32/wrapper.dll" todir="pkg-temp/lib" />
1009                <copy file="installer/lib/wrapper/win32/wrapper.jar" todir="pkg-temp/lib" />
1010                <copy file="installer/lib/wrapper/win32/I2Psvc.exe" tofile="pkg-temp/i2psvc.ex_" />
1011                        <!--  copy the unpack/start batchfiles -->
1012                <copy todir="pkg-temp">
1013                        <fileset dir="installer/resources/portable/win32/" />
1014                </copy>
1015        </target>
1016<!-- *4* command for windows package -->
1017        <target name = "pkg-portable-win32"     depends="preppkg-portable-win32, pack200" >
1018                <!-- i need the portable\ folder in .zip so basedir is set to . -->
1019                <move file="pkg-temp" tofile="portable"/>
1020                <zip destfile="portable-win32.zip" basedir="." level="9" includes="portable\**" />
1021                <checksum file="portable-win32.zip" forceOverwrite="yes"/>
1022                <move file="portable" tofile="pkg-temp"/>
1023        </target>
1024</project>
Note: See TracBrowser for help on using the repository browser.