source: build.xml @ 1bff62e3

Last change on this file since 1bff62e3 was 1bff62e3, checked in by z3d <z3d@…>, 9 years ago

I2PSnark: Relocate theme to /themes/snark/ubergine/; update build.xml

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