source: trunk/build.xml @ 1602

Revision 1602, 24.5 KB checked in by curtis, 14 years ago (diff)

Rely on external jars for MovieStitcher.jar, instead of bundling internally.

Line 
1<!--
2build.xml
3
4Master ant build file for all Java software projects at LOCI.
5Download Apache Ant from http://ant.apache.org/.
6Type "ant -p" for a list of targets.
7
8===============================================================================
9This build file handles the following projects:
10
11Bio-Formats
12    JAR file:      bio-formats.jar
13    Folders:       loci/formats
14                   loci/formats/*
15    Main class:    loci.formats.ImageViewer
16    Dependencies:  ome-java.jar
17                   poi-loci.jar
18    Targets:       style-formats
19                   compile-formats
20                   jar-formats
21    License:       LGPL
22
23VisBio
24    JAR file:      visbio.jar
25    Folders:       loci/visbio
26                   loci/visbio/*
27    Main class:    loci.visbio.VisBio
28    Dependencies:  bio-formats.jar
29                   commons-httpclient-2.0-rc2.jar (ome-java.jar)
30                   commons-logging.jar (ome-java.jar)
31                   forms-1.0.4.jar
32                   ij.jar
33                   looks-1.2.2.jar
34                   ome-java.jar
35                   poi-loci.jar (bio-formats.jar)
36                   visad-lite.jar
37                   xmlrpc-1.2-b1.jar (ome-java.jar)
38    Targets:       style-visbio
39                   compile-visbio
40                   jar-visbio
41                   source-visbio
42                   docs-visbio
43                   dist-visbio
44    License:       GPL
45
46LOCI Plugins for ImageJ
47    JAR file:      loci_plugins.jar
48    Folders:       loci/plugins
49                   loci/plugins/*
50                   loci/ome/viewer (temporary)
51    Main class:    loci.plugins.About
52    IJ plugins:    loci.plugins.browser.LociDataBrowser
53                   loci.plugins.LociImporter
54                   loci.plugins.LociExporter
55                   loci.plugins.ome.OMEPlugin
56    Dependencies:  bio-formats.jar
57                   commons-httpclient-2.0-rc2.jar (ome-java.jar)
58                   commons-logging.jar (ome-java.jar)
59                   ome-java.jar (bio-formats.jar)
60                   poi-loci.jar (bio-formats.jar)
61                   xmlrpc-1.2-b1.jar (ome-java.jar)
62    Targets:       style-plugins
63                   compile-plugins
64                   jar-plugins
65    License:       LGPL
66
67OME Metadata Notebook
68    JAR file:      ome-notebook.jar
69    Folders:       loci/ome/notebook
70                   loci/ome/viewer (temporary)
71    Main class:    loci.ome.notebook.MetadataNotebook
72    Dependencies:  bio-formats.jar
73                   commons-httpclient-2.0-rc2.jar (ome-java.jar)
74                   commons-logging.jar (ome-java.jar)
75                   forms-1.0.4.jar
76                   ome-java.jar
77                   xmlrpc-1.2-b1.jar (ome-java.jar)
78    Targets:       style-notebook
79                   compile-notebook
80                   jar-notebook
81    License:       LGPL
82
83Leica Converter
84    JAR file:      LeicaConverter.jar
85    Folders:       loci/apps/leica
86    Main class:    loci.apps.leica.LeicaConverter
87    Dependencies:  bio-formats.jar
88                   ome-java.jar
89    Targets:       style-leica
90                   compile-leica
91                   jar-leica
92    License:       Public domain
93
94Movie Stitcher
95    JAR file:      MovieStitcher.jar
96    Folders:       loci/apps/stitcher
97                   loci/formats
98                   loci/formats/*
99    Main class:    loci.apps.sticher.MovieStitcher
100    Dependencies:  None (custom built)
101    Targets:       style-stitcher
102                   compile-stitcher
103                   jar-stitcher
104    License:       Public domain
105
106Slim Plotter
107    JAR file:      SlimPlotter.jar
108    Folders:       loci/apps/slim
109                   some loci/formats, loci/formats/in and loci/visbio
110    Main class:    loci.apps.slim.SlimPlotter
111    Dependencies:  lma.jar
112                   visad-lite.jar
113    Targets:       style-slim
114                   compile-slim
115                   jar-slim
116                   dist-slim
117    License:       Public domain
118
119===============================================================================
120The following external dependencies (in the jar folder) may be required:
121
122Apple eAWT stubs
123    JAR file:  AppleJavaExtensions.jar
124    URL:       http://developer.apple.com/samplecode/AppleJavaExtensions/
125    Notes:     Required to compile VisBio on non-Mac OS X machines
126
127Checkstyle
128    JAR file:  checkstyle-all-4.2.jar
129    URL:       http://checkstyle.sourceforge.net/
130    Notes:     Used for style targets to check source code style conventions
131    License:   LGPL
132
133Apache Jakarta Commons HttpClient
134    JAR file:  commons-httpclient-2.0-rc2.jar
135    URL:       http://jakarta.apache.org/commons/httpclient/
136    Notes:     Required for OME Java to communicate with OME servers
137    License:   Apache
138
139Apache Jakarta Commons Logging
140    JAR file:  commons-logging.jar
141    URL:       http://jakarta.apache.org/commons/logging/
142    Notes:     Used by OME Java
143    License:   Apache
144
145JGoodies Forms
146    JAR file:  forms-1.0.4.jar
147    URL:       http://www.jgoodies.com/freeware/forms/index.html
148    Notes:     Used for layout by VisBio and OME Metadata Notebook
149    License:   BSD
150
151ImageJ
152    JAR file:  ij.jar
153    URL:       http://rsb.info.nih.gov/ij/
154    Notes:     Bundled with VisBio to achieve ImageJ interconnectivity
155    License:   Public domain
156
157JGoodies Looks
158    JAR file:  looks-1.2.2.jar
159    URL:       http://www.jgoodies.com/freeware/looks/index.html
160    Notes:     Used for a nicer Look & Feel by VisBio and OME Metadata Notebook
161    License:   BSD
162
163L-M Fit
164    JAR file:  lma.jar
165    URL:       http://users.utu.fi/jaolho/
166    Notes:     Levenberg-Marquardt algorithm for exponential curve fitting
167               with Slim Plotter
168    License:   LGPL
169
170OME Java
171    JAR file:  ome-java.jar
172    URL:       http://openmicroscopy.org/api/java/
173    Notes:     Used by VisBio and the OME Plugin for ImageJ to connect to OME;
174               used by Bio-Formats and the OME Notebook to work with OME-XML
175    License:   LGPL
176
177Apache Jakarta POI
178    JAR file:  poi-loci.jar
179    URL:       http://jakarta.apache.org/poi/
180    Notes:     Used by Bio-Formats for OLE support (OIB, ZVI, IPW); based on
181               poi-2.5.1-final-20040804.jar, with bugfixes so that OLE v2 works
182    License:   Apache
183
184Skin Look and Feel
185    JAR file:  skinlf.jar
186    URL:       http://skinlf.l2fprod.com/
187    Notes:     Not used (may be used in the future for flexible skinning)
188    License:   Custom (BSD-like)
189
190VisAD
191    JAR file:  visad-lite.jar
192    URL:       http://www.ssec.wisc.edu/~billh/visad.html
193    Notes:     Stripped down VisAD library used by VisBio and Slim Plotter
194    License:   LGPL
195
196Apache XML-RPC
197    JAR file:  xmlrpc-1.2-b1.jar
198    URL:       http://ws.apache.org/xmlrpc/
199    Notes:     Required for OME Java to communicate with OME servers
200    License:   Apache
201-->
202
203<project name="LOCI Software" default="jars" basedir=".">
204  <description>
205    Master build file for all Java software projects at LOCI
206  </description>
207
208  <property file="build.properties"/>
209  <property file="${user.home}/.ant-global.properties"/>
210
211  <condition property="isUnix"><os family="unix"/></condition>
212
213  <taskdef resource="checkstyletask.properties"
214    classpath="jar/checkstyle-all-4.2.jar"/>
215
216  <!-- Global build targets -->
217
218  <target name="init">
219    <tstamp>
220      <format property="DATE" pattern="d MMMMM yyyy"/>
221      <format property="YEAR" pattern="yyyy"/>
222    </tstamp>
223  </target>
224
225  <target name="style"
226    depends="style-formats, style-visbio, style-plugins, style-notebook, style-leica, style-stitcher, style-slim"
227    description="check source code style for LOCI software packages"/>
228
229<!--
230  <target name="compile" depends="copy-source"
231    description="compile classes for LOCI software packages">
232    <mkdir dir="${classes.dir}"/>
233    <javac srcdir="${dest.dir}" destdir="${classes.dir}" debug="true"
234      classpath="${ext.jars}" deprecation="true" source="1.4" target="1.4"/>
235  </target>
236-->
237  <target name="compile"
238    depends="compile-formats, compile-visbio, compile-plugins, compile-notebook, compile-leica, compile-stitcher, compile-slim"
239    description="compile classes for LOCI software packages"/>
240
241  <target name="jars"
242    depends="jar-formats, jar-visbio, jar-plugins, jar-notebook, jar-leica, jar-stitcher, jar-slim"
243    description="generate JAR files for LOCI software packages"/>
244
245  <target name="docs" depends="copy-source"
246    description="generate Javadocs for LOCI software packages">
247    <javadoc sourcepath="${dest.dir}" destdir="${docs.dir}/api"
248      author="true" version="true" use="true" windowtitle="LOCI Software API">
249      <packageset dir="${dest.dir}"/>
250      <doctitle><![CDATA[<h1>LOCI Software</h1>]]></doctitle>
251      <bottom><![CDATA[${copyright}]]></bottom>
252      <link href="http://java.sun.com/j2se/1.4.2/docs/api/"/>
253    </javadoc>
254  </target>
255
256  <target name="clean" description="remove all build files">
257    <delete dir="${build.dir}"/>
258  </target>
259
260  <!-- Internal build targets -->
261
262  <target name="copy-source" depends="init">
263    <!-- copy binary files without filtering -->
264    <copy todir="${dest.dir}" preservelastmodified="true">
265      <fileset dir="${src.dir}" includes="loci/**"
266        excludes="**/*.class **/*.java **/*.config **/*.txt ${ignore.source}"/>
267    </copy>
268    <!-- copy source files with filtering -->
269    <filter token="date" value="${DATE}"/>
270    <copy todir="${dest.dir}" filtering="true" preservelastmodified="true">
271      <fileset dir="${src.dir}" includes="loci/**"
272        excludes="**/*.class ${ignore.source}"/>
273    </copy>
274  </target>
275
276  <target name="copy-jars">
277    <!-- copy needed external JARs into build jars folder -->
278    <copy todir="${jar.dir}" preservelastmodified="true">
279      <fileset dir="jar"/>
280    </copy>
281  </target>
282
283  <!-- Bio-Formats -->
284
285  <target name="style-formats" depends="copy-source"
286    description="check source code style for Bio-Formats">
287    <checkstyle config="checkstyle.xml">
288      <fileset dir="${dest.dir}" includes="${formats.source}"/>
289    </checkstyle>
290  </target>
291
292  <target name="compile-formats" depends="copy-source"
293    description="compile classes for Bio-Formats">
294    <mkdir dir="${classes.dir}"/>
295    <javac srcdir="${dest.dir}" destdir="${classes.dir}"
296      includes="${formats.source}" classpath="${ext.jars}"
297      debug="true" deprecation="true" source="1.4" target="1.4"/>
298  </target>
299
300  <target name="jar-formats" depends="compile-formats, copy-jars"
301    description="generate JAR file for Bio-Formats">
302    <copy todir="${classes.dir}" preservelastmodified="true">
303      <fileset dir="${src.dir}" includes="${formats.resources}"/>
304    </copy>
305    <mkdir dir="${jar.dir}"/>
306    <jar jarfile="${jar.dir}/${formats.jar}" basedir="${classes.dir}"
307      includes="${formats.files}">
308      <manifest>
309        <attribute name="Main-Class" value="${formats.main}"/>
310        <attribute name="Class-Path" value="${formats.classpath}"/>
311      </manifest>
312    </jar>
313  </target>
314
315  <!-- VisBio -->
316
317  <target name="style-visbio" depends="copy-source"
318    description="check source code style for VisBio">
319    <checkstyle config="checkstyle.xml">
320      <fileset dir="${dest.dir}" includes="${visbio.source}"/>
321    </checkstyle>
322  </target>
323
324  <target name="compile-visbio" depends="copy-source"
325    description="compile classes for VisBio">
326    <mkdir dir="${classes.dir}"/>
327    <javac srcdir="${dest.dir}" destdir="${classes.dir}"
328      includes="${visbio.source}" classpath="${ext.jars}"
329      debug="true" deprecation="true" source="1.4" target="1.4"/>
330  </target>
331
332  <target name="jar-visbio" depends="compile-visbio, copy-jars, jar-formats"
333    description="generate JAR file for VisBio">
334    <copy todir="${classes.dir}" preservelastmodified="true">
335      <fileset dir="${src.dir}" includes="${visbio.resources}"/>
336    </copy>
337    <jar jarfile="${jar.dir}/${visbio.jar}" basedir="${classes.dir}"
338      includes="${visbio.files}">
339      <manifest>
340        <attribute name="Main-Class" value="${visbio.main}"/>
341        <attribute name="Class-Path" value="${visbio.classpath}"/>
342      </manifest>
343    </jar>
344  </target>
345
346  <target name="source-visbio" depends="copy-source"
347    description="generate source bundle for VisBio">
348    <zip zipfile="${build.dir}/visbio_src.zip" basedir="${dest.dir}"
349      includes="loci/visbio/**"/>
350  </target>
351
352  <target name="docs-visbio" depends="copy-source"
353    description="generate Javadocs for VisBio">
354    <javadoc sourcepath="${dest.dir}" destdir="${visbio.docs-dir}/docs/api"
355      author="true" version="true" use="true" windowtitle="LOCI Software API">
356      <packageset dir="${dest.dir}" includes="loci/visbio/**"/>
357      <doctitle><![CDATA[<h1>VisBio</h1>]]></doctitle>
358      <bottom><![CDATA[${copyright}]]></bottom>
359      <link href="http://java.sun.com/j2se/1.4.2/docs/api/"/>
360    </javadoc>
361    <zip zipfile="${build.dir}/visbio_docs.zip" basedir="${visbio.docs-dir}"/>
362  </target>
363
364  <target name="dist-visbio"
365    depends="dist-visbio-win32, dist-visbio-win32-nojre, dist-visbio-macosx, dist-visbio-linux, dist-visbio-nojre"
366    description="create distribution bundles for VisBio"/>
367
368  <target name="dist-visbio-win32" depends="jar-visbio, jar-formats"
369    description="create distribution bundle for VisBio: Windows w/ JRE">
370    <copy todir="${visbio.win32-dir}" preservelastmodified="true">
371      <fileset dir="dist/visbio/win32"/>
372      <fileset dir="loci/visbio" includes="${visbio.dist-files}"/>
373      <fileset dir="${jar.dir}" includes="visbio.jar ${visbio.classpath}"/>
374    </copy>
375    <fixcrlf srcdir="${visbio.win32-dir}" eol="dos"
376      includes="*.txt *.cpp *.m plugins/*.txt"/>
377    <untar src="dist/jre-win32.tar.gz" dest="${visbio.win32-dir}"
378      overwrite="false" compression="gzip"/>
379    <zip destfile="${dist.dir}/visbio${visbio.version}_win32.zip"
380      basedir="${dist.dir}/visbio/win32"/>
381  </target>
382
383  <target name="dist-visbio-win32-nojre" depends="jar-visbio, jar-formats"
384    description="create distribution bundle for VisBio: Windows no JRE">
385    <copy todir="${visbio.win32-nojre-dir}"
386      preservelastmodified="true">
387      <fileset dir="dist/visbio/win32" excludes="launcher.cfg"/>
388      <fileset dir="dist/visbio/win32-nojre"/>
389      <fileset dir="loci/visbio" includes="${visbio.dist-files}"/>
390      <fileset dir="${jar.dir}" includes="visbio.jar ${visbio.classpath}"/>
391    </copy>
392    <fixcrlf srcdir="${visbio.win32-nojre-dir}" eol="dos"
393      includes="*.txt *.cpp *.m plugins/*.txt"/>
394    <zip destfile="${dist.dir}/visbio${visbio.version}_win32_nojre.zip"
395      basedir="${dist.dir}/visbio/win32-nojre"/>
396  </target>
397
398  <!-- HACK - limit OS to *nix due to file permission issues -->
399  <target name="dist-visbio-macosx" if="isUnix"
400    depends="jar-visbio, jar-formats"
401    description="create distribution bundle for VisBio: Mac OS X">
402    <copy todir="${visbio.macosx-dir}"
403      preservelastmodified="true">
404      <fileset dir="dist/visbio/macosx"/>
405      <fileset dir="loci/visbio" includes="${visbio.dist-files}"/>
406    </copy>
407    <fixcrlf srcdir="${visbio.macosx-dir}" eol="mac"
408      includes="*.txt *.cpp *.m plugins/*.txt"/>
409    <!-- HACK - copy does not preserve permissions; chmod them back -->
410    <chmod perm="+x">
411      <fileset dir="${visbio.macosx-dir}"
412        includes="visbio omeul VisBio.app/Contents/MacOS/JavaApplicationStub"/>
413    </chmod>
414    <copy todir="${visbio.macosx-dir}/VisBio.app/Contents/Resources/Java">
415      <fileset dir="${jar.dir}" includes="visbio.jar ${visbio.classpath}"/>
416    </copy>
417<!--
418    <tar destfile="${dist.dir}/visbio${visbio.version}_macosx.tar.gz"
419      basedir="${dist.dir}/visbio/macosx" compression="gzip"/>
420-->
421    <!-- HACK - tar does not preserve permissions; use exec instead -->
422    <exec executable="tar">
423      <arg value="czf"/>
424      <arg value="${dist.dir}/visbio${visbio.version}_macosx.tar.gz"/>
425      <arg value="-C"/>
426      <arg value="${dist.dir}/visbio/macosx VisBio"/>
427    </exec>
428  </target>
429
430  <!-- HACK - limit OS to *nix due to file permission issues -->
431  <target name="dist-visbio-linux" if="isUnix"
432    depends="jar-visbio, jar-formats"
433    description="create distribution bundle for VisBio: Linux w/ JRE">
434    <copy todir="${visbio.linux-dir}" preservelastmodified="true">
435      <fileset dir="dist/visbio/linux"/>
436      <fileset dir="loci/visbio" includes="${visbio.dist-files}"/>
437      <fileset dir="${jar.dir}" includes="visbio.jar ${visbio.classpath}"/>
438    </copy>
439    <fixcrlf srcdir="${visbio.linux-dir}" eol="unix"
440      includes="*.txt *.cpp *.m plugins/*.txt"/>
441    <!-- HACK - copy does not preserve permissions; chmod them back -->
442    <chmod perm="+x">
443      <fileset dir="${visbio.linux-dir}" includes="visbio omeul"/>
444    </chmod>
445<!--
446    <untar src="dist/jre-linux.tar.gz" dest="${visbio.linux-dir}"
447      overwrite="false" compression="gzip"/>
448-->
449    <!-- HACK - untar does not restore permissions; use exec instead -->
450    <exec executable="tar">
451      <arg value="xzf"/>
452      <arg value="dist/jre-linux.tar.gz"/>
453      <arg value="-C"/>
454      <arg value="${visbio.linux-dir}"/>
455    </exec>
456<!--
457    <tar destfile="${dist.dir}/visbio${visbio.version}_linux.tar.gz"
458      basedir="${dist.dir}/visbio/linux" compression="gzip"/>
459-->
460    <!-- HACK - tar does not preserve permissions; use exec instead -->
461    <exec executable="tar">
462      <arg value="czf"/>
463      <arg value="${dist.dir}/visbio${visbio.version}_linux.tar.gz"/>
464      <arg value="-C"/>
465      <arg value="${dist.dir}/visbio/linux visbio${visbio.version}"/>
466    </exec>
467  </target>
468
469  <!-- HACK - limit OS to *nix due to file permission issues -->
470  <target name="dist-visbio-nojre" if="isUnix"
471    depends="jar-visbio, jar-formats"
472    description="create distribution bundle for VisBio: cross-platform">
473    <copy todir="${visbio.nojre-dir}" preservelastmodified="true">
474      <fileset dir="dist/visbio/linux"/>
475      <fileset dir="loci/visbio" includes="${visbio.dist-files}"/>
476      <fileset dir="${jar.dir}" includes="visbio.jar ${visbio.classpath}"/>
477    </copy>
478    <fixcrlf srcdir="${visbio.nojre-dir}" eol="unix"
479      includes="*.txt *.cpp *.m plugins/*.txt"/>
480    <!-- HACK - copy does not preserve permissions; chmod them back -->
481    <chmod perm="+x">
482      <fileset dir="${visbio.nojre-dir}" includes="visbio omeul"/>
483    </chmod>
484<!--
485    <tar destfile="${dist.dir}/visbio${visbio.version}.tar.gz"
486      basedir="${dist.dir}/visbio/nojre" compression="gzip"/>
487-->
488    <!-- HACK - tar does not preserve permissions; use exec instead -->
489    <exec executable="tar">
490      <arg value="czf"/>
491      <arg value="${dist.dir}/visbio${visbio.version}.tar.gz"/>
492      <arg value="-C"/>
493      <arg value="${dist.dir}/visbio/nojre visbio${visbio.version}"/>
494    </exec>
495  </target>
496
497  <!-- LOCI Plugins for ImageJ -->
498
499  <target name="style-plugins" depends="copy-source"
500    description="check source code style for LOCI Plugins for ImageJ">
501    <checkstyle config="checkstyle.xml">
502      <fileset dir="${dest.dir}" includes="${plugins.source}"/>
503    </checkstyle>
504  </target>
505
506  <target name="compile-plugins" depends="copy-source"
507    description="compile classes for LOCI Plugins for ImageJ">
508    <mkdir dir="${classes.dir}"/>
509    <javac srcdir="${dest.dir}" destdir="${classes.dir}"
510      includes="${plugins.source}" classpath="${ext.jars}"
511      debug="true" deprecation="true" source="1.4" target="1.4"/>
512  </target>
513
514  <target name="jar-plugins" depends="compile-plugins, copy-jars, jar-formats"
515    description="generate JAR file for LOCI Plugins for ImageJ">
516    <jar jarfile="${jar.dir}/${plugins.jar}"
517      basedir="${src.dir}/loci/plugins" includes="plugins.config">
518      <manifest>
519        <attribute name="Main-Class" value="${plugins.main}"/>
520      </manifest>
521    </jar>
522    <jar jarfile="${jar.dir}/${plugins.jar}" basedir="${classes.dir}"
523      includes="${plugins.files}" excludes="loci/plugins/plugins.config"
524      update="true">
525    </jar>
526  </target>
527
528  <!-- OME Metadata Notebook -->
529
530  <target name="style-notebook" depends="copy-source"
531    description="check source code style for OME Metadata Notebook">
532    <checkstyle config="checkstyle.xml">
533      <fileset dir="${dest.dir}" includes="${notebook.source}"/>
534    </checkstyle>
535  </target>
536
537  <target name="compile-notebook" depends="copy-source"
538    description="compile classes for OME Metadata Notebook">
539    <mkdir dir="${classes.dir}"/>
540    <javac srcdir="${dest.dir}" destdir="${classes.dir}"
541      includes="${notebook.source}" classpath="${ext.jars}"
542      debug="true" deprecation="true" source="1.4" target="1.4"/>
543  </target>
544
545  <target name="jar-notebook"
546    depends="compile-notebook, copy-jars, jar-formats"
547    description="generate JAR file for OME Metadata Notebook">
548    <copy todir="${classes.dir}" preservelastmodified="true">
549      <fileset dir="${src.dir}" includes="${notebook.resources}"/>
550    </copy>
551    <jar jarfile="${jar.dir}/${notebook.jar}" basedir="${classes.dir}"
552      includes="${notebook.files}">
553      <manifest>
554        <attribute name="Main-Class" value="${notebook.main}"/>
555        <attribute name="Class-Path" value="${notebook.classpath}"/>
556      </manifest>
557    </jar>
558  </target>
559
560  <!-- Leica Converter -->
561
562  <target name="style-leica" depends="copy-source"
563    description="check source code style for Leica Converter">
564    <checkstyle config="checkstyle.xml">
565      <fileset dir="${dest.dir}" includes="${leica.source}"/>
566    </checkstyle>
567  </target>
568
569  <target name="compile-leica" depends="copy-source"
570    description="compile classes for Leica Converter">
571    <mkdir dir="${classes.dir}"/>
572    <javac srcdir="${dest.dir}" destdir="${classes.dir}"
573      includes="${leica.source}" classpath="${ext.jars}"
574      debug="true" deprecation="true" source="1.4" target="1.4"/>
575  </target>
576
577  <target name="jar-leica" depends="compile-leica, copy-jars, jar-formats"
578    description="generate JAR file for Leica Converter">
579    <jar jarfile="${jar.dir}/${leica.jar}" basedir="${classes.dir}"
580      includes="${leica.files}">
581      <manifest>
582        <attribute name="Main-Class" value="${leica.main}"/>
583        <attribute name="Class-Path" value="${leica.classpath}"/>
584      </manifest>
585    </jar>
586  </target>
587
588  <!-- Movie Stitcher -->
589
590  <target name="style-stitcher" depends="copy-source"
591    description="check source code style for Movie Stitcher">
592    <checkstyle config="checkstyle.xml">
593      <fileset dir="${dest.dir}" includes="${stitcher.source}"/>
594    </checkstyle>
595  </target>
596
597  <target name="compile-stitcher" depends="copy-source"
598    description="compile classes for Movie Stitcher">
599    <mkdir dir="${classes.dir}"/>
600    <javac srcdir="${dest.dir}" destdir="${classes.dir}"
601      includes="${stitcher.source}" classpath="${ext.jars}"
602      debug="true" deprecation="true" source="1.4" target="1.4"/>
603  </target>
604
605  <target name="jar-stitcher" depends="compile-stitcher"
606    description="generate JAR file for Movie Stitcher">
607    <mkdir dir="${jar.dir}"/>
608    <jar jarfile="${jar.dir}/${stitcher.jar}" basedir="${classes.dir}"
609      includes="${stitcher.files}">
610      <manifest>
611        <attribute name="Main-Class" value="${stitcher.main}"/>
612        <attribute name="Class-Path" value="${stitcher.classpath}"/>
613      </manifest>
614    </jar>
615  </target>
616
617  <!-- Slim Plotter -->
618
619  <target name="style-slim" depends="copy-source"
620    description="check source code style for Slim Plotter">
621    <checkstyle config="checkstyle.xml">
622      <fileset dir="${dest.dir}" includes="${slim.source}"/>
623    </checkstyle>
624  </target>
625
626  <target name="compile-slim" depends="copy-source"
627    description="compile classes for Slim Plotter">
628    <mkdir dir="${classes.dir}"/>
629    <javac srcdir="${dest.dir}" destdir="${classes.dir}"
630      includes="${slim.source}" classpath="${ext.jars}"
631      debug="true" deprecation="true" source="1.4" target="1.4"/>
632  </target>
633
634  <target name="jar-slim" depends="compile-slim, copy-jars"
635    description="generate JAR file for Slim Plotter">
636    <jar jarfile="${jar.dir}/${slim.jar}" basedir="${classes.dir}"
637      includes="${slim.files}">
638      <manifest>
639        <attribute name="Main-Class" value="${slim.main}"/>
640        <attribute name="Class-Path" value="${slim.classpath}"/>
641      </manifest>
642    </jar>
643  </target>
644
645  <target name="dist-slim" if="isUnix" depends="copy-jars, jar-slim"
646    description="create distribution bundle for Slim Plotter">
647    <copy todir="${slim.dist-dir}" preservelastmodified="true">
648      <fileset dir="dist/slim"/>
649      <fileset dir="${jar.dir}" includes="SlimPlotter.jar ${slim.classpath}"/>
650    </copy>
651    <!-- HACK - copy does not preserve permissions; chmod them back -->
652    <chmod perm="+x">
653      <fileset dir="${slim.dist-dir}" includes="slim"/>
654    </chmod>
655<!--
656    <zip destfile="${dist.dir}/slim.zip" basedir="${dist.dir}/slim"/>
657-->
658    <!-- HACK - zip does not preserve permissions; use exec instead -->
659    <exec executable="zip" dir="${dist.dir}/slim">
660      <arg value="-r9"/>
661      <arg value="../slim.zip"/>
662      <arg value="SlimPlotter"/>
663    </exec>
664  </target>
665
666</project>
Note: See TracBrowser for help on using the repository browser.