source: trunk/build.xml @ 1499

Revision 1499, 23.9 KB checked in by curtis, 14 years ago (diff)

Make "jars" the default build operation.

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