source: trunk/build.xml @ 1656

Revision 1656, 26.5 KB checked in by curtis, 14 years ago (diff)

Slim Plotter now uses Bio-Formats library externally.

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