source: trunk/build.xml @ 1388

Revision 1388, 23.5 KB checked in by curtis, 14 years ago (diff)

Some work on style checking targets; fix some style issues.

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