Changeset 1313


Ignore:
Timestamp:
08/21/06 16:27:04 (14 years ago)
Author:
curtis
Message:

Add targets for VisBio source and docs; split properties into separate file.

Location:
trunk
Files:
1 added
1 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/build.xml

    r1310 r1313  
    3232                   xmlrpc-1.2-b1.jar (ome-java.jar) 
    3333    Targets:       jar-visbio 
     34                   source-visbio 
     35                   docs-visbio 
    3436                   dist-visbio 
    3537 
     
    154156  </description> 
    155157 
    156   <!-- Global properties --> 
    157  
    158   <property name="src.dir" value="."/> 
    159   <property name="build.dir" value="build"/> 
    160   <property name="dest.dir" value="${build.dir}/src"/> 
    161   <property name="classes.dir" value="${build.dir}/classes"/> 
    162   <property name="jar.dir" value="${build.dir}/jar"/> 
    163   <property name="docs.dir" value="${build.dir}/docs"/> 
    164   <property name="dist.dir" value="${build.dir}/dist"/> 
     158  <property resource="build.properties"/> 
     159  <property file="${user.home}/.ant-global.properties"/> 
    165160 
    166161  <condition property="isUnix"><os family="unix"/></condition> 
    167162 
    168163  <!-- Global build targets --> 
    169  
    170   <property name="ext.jars" value="jar/AppleJavaExtensions.jar:jar/commons-httpclient-2.0-rc2.jar:jar/commons-logging.jar:jar/forms-1.0.4.jar:jar/ij.jar:jar/looks-1.2.2.jar:jar/ome-java.jar:jar/visad-lite.jar:jar/xmlrpc-1.2-b1.jar"/> 
    171164 
    172165  <target name="init"> 
     
    194187      <packageset dir="${dest.dir}"/> 
    195188      <doctitle><![CDATA[<h1>LOCI Software</h1>]]></doctitle> 
    196       <bottom><![CDATA[<i>Copyright &#169; ${YEAR} Laboratory for Optical and Computational Instrumentation</i>]]></bottom> 
     189      <bottom><![CDATA[${copyright}]]></bottom> 
    197190      <link href="http://java.sun.com/j2se/1.4.2/docs/api/"/> 
    198191    </javadoc> 
    199192  </target> 
    200193 
    201   <target name="clean" 
    202     description="remove all build files"> 
     194  <target name="clean" description="remove all build files"> 
    203195    <delete dir="${build.dir}"/> 
    204196  </target> 
    205197 
    206198  <!-- Internal build targets --> 
    207  
    208   <property name="ignore.source" 
    209     value="loci/plugins/HandleExtraFileTypes.java *.tar.gz"/> 
    210199 
    211200  <target name="copy-source" depends="init"> 
    212201    <!-- copy binary files without filtering --> 
    213202    <copy todir="${dest.dir}" preservelastmodified="true"> 
    214       <fileset dir="${src.dir}" includes="loci/**" excludes="**/*.class **/*.java **/*.config **/*.txt ${ignore.source}"/> 
     203      <fileset dir="${src.dir}" includes="loci/**" 
     204        excludes="**/*.class **/*.java **/*.config **/*.txt ${ignore.source}"/> 
    215205    </copy> 
    216206    <!-- copy source files with filtering --> 
    217207    <filter token="date" value="${DATE}"/> 
    218208    <copy todir="${dest.dir}" filtering="true" preservelastmodified="true"> 
    219       <fileset dir="${src.dir}" includes="loci/**" excludes="**/*.class ${ignore.source}"/> 
     209      <fileset dir="${src.dir}" includes="loci/**" 
     210        excludes="**/*.class ${ignore.source}"/> 
    220211    </copy> 
    221212  </target> 
     
    230221  <!-- Bio-Formats --> 
    231222 
    232   <property name="formats.files" value="loci/browser/** loci/formats/**"/> 
    233   <property name="formats.resources" value="loci/formats/*.txt"/> 
    234  
    235223  <target name="jar-formats" depends="compile" 
    236224    description="generate JAR file for Bio-Formats"> 
     
    249237  <!-- VisBio --> 
    250238 
    251   <property name="visbio.classpath" value="bio-formats.jar commons-httpclient-2.0-rc2.jar commons-logging.jar forms-1.0.4.jar ij.jar looks-1.2.2.jar ome-java.jar visad-lite.jar xmlrpc-1.2-b1.jar"/> 
    252   <property name="visbio.files" value="loci/visbio/**"/> 
    253   <property name="visbio.resources" value="loci/visbio/classes.txt loci/visbio/*.png loci/visbio/*.gif loci/visbio/help/*.html loci/visbio/help/*.png loci/visbio/overlays/*.png loci/visbio/view/*.png"/> 
    254  
    255   <target name="jar-visbio" 
    256     depends="compile, copy-jars, jar-formats" 
     239  <target name="jar-visbio" depends="compile, copy-jars, jar-formats" 
    257240    description="generate JAR file for VisBio"> 
    258241    <copy todir="${classes.dir}" preservelastmodified="true"> 
     
    268251  </target> 
    269252 
     253  <target name="source-visbio" depends="copy-source" 
     254    description="generate source bundle for VisBio"> 
     255    <zip zipfile="${build.dir}/visbio_src.zip" basedir="${dest.dir}" 
     256      includes="loci/visbio/**"/> 
     257  </target> 
     258 
    270259  <target name="docs-visbio" depends="copy-source" 
    271260    description="generate Javadocs for VisBio"> 
    272     <javadoc sourcepath="${dest.dir}" destdir="${docs.dir}/visbio/api" 
     261    <javadoc sourcepath="${dest.dir}" destdir="${visbio.docs-dir}/docs/api" 
    273262      author="true" version="true" use="true" windowtitle="LOCI Software API"> 
    274263      <packageset dir="${dest.dir}" includes="loci/visbio/**"/> 
    275264      <doctitle><![CDATA[<h1>VisBio</h1>]]></doctitle> 
    276       <bottom><![CDATA[<i>Copyright &#169; ${YEAR} Laboratory for Optical and Computational Instrumentation</i>]]></bottom> 
     265      <bottom><![CDATA[${copyright}]]></bottom> 
    277266      <link href="http://java.sun.com/j2se/1.4.2/docs/api/"/> 
    278267    </javadoc> 
    279   </target> 
    280  
    281   <property name="visbio.dist-files" value="bsd-forms.txt bsd-looks.txt gpl-visbio.txt omeul.txt whatsnew.txt *.cpp *.m"/> 
     268    <zip zipfile="${build.dir}/visbio_docs.zip" basedir="${visbio.docs-dir}"/> 
     269  </target> 
    282270 
    283271  <target name="dist-visbio" depends="dist-visbio-win32, dist-visbio-win32-nojre, dist-visbio-macosx, dist-visbio-linux, dist-visbio-nojre"/> 
    284  
    285   <property name="visbio.win32-dir" value="${dist.dir}/visbio/win32/VisBio"/> 
    286272 
    287273  <target name="dist-visbio-win32" depends="jar-visbio, jar-formats"> 
     
    298284      basedir="${dist.dir}/visbio/win32"/> 
    299285  </target> 
    300  
    301   <property name="visbio.win32-nojre-dir" 
    302     value="${dist.dir}/visbio/win32-nojre/VisBio"/> 
    303286 
    304287  <target name="dist-visbio-win32-nojre" depends="jar-visbio, jar-formats"> 
     
    315298      basedir="${dist.dir}/visbio/win32-nojre"/> 
    316299  </target> 
    317  
    318   <property name="visbio.macosx-dir" value="${dist.dir}/visbio/macosx/VisBio"/> 
    319300 
    320301  <!-- HACK - limit OS to *nix due to file permission issues --> 
     
    342323    <!-- HACK - tar does not preserve permissions; use exec instead --> 
    343324    <exec executable="tar"> 
    344       <arg line="czf ${dist.dir}/visbio${visbio.version}_macosx.tar.gz -C ${dist.dir}/visbio/macosx VisBio"/> 
     325      <arg value="czf"/> 
     326      <arg value="${dist.dir}/visbio${visbio.version}_macosx.tar.gz"/> 
     327      <arg value="-C"/> 
     328      <arg value="${dist.dir}/visbio/macosx VisBio"/> 
    345329    </exec> 
    346330  </target> 
    347  
    348   <property name="visbio.linux-dir" 
    349     value="${dist.dir}/visbio/linux/visbio${visbio.version}"/> 
    350331 
    351332  <!-- HACK - limit OS to *nix due to file permission issues --> 
     
    369350    <!-- HACK - untar does not restore permissions; use exec instead --> 
    370351    <exec executable="tar"> 
    371       <arg line="xzf dist/jre-linux.tar.gz -C ${visbio.linux-dir}"/> 
     352      <arg value="xzf"/> 
     353      <arg value="dist/jre-linux.tar.gz"/> 
     354      <arg value="-C"/> 
     355      <arg value="${visbio.linux-dir}"/> 
    372356    </exec> 
    373357<!-- 
     
    377361    <!-- HACK - tar does not preserve permissions; use exec instead --> 
    378362    <exec executable="tar"> 
    379       <arg line="czf ${dist.dir}/visbio${visbio.version}_linux.tar.gz -C ${dist.dir}/visbio/linux visbio${visbio.version}"/> 
     363      <arg value="czf"/> 
     364      <arg value="${dist.dir}/visbio${visbio.version}_linux.tar.gz"/> 
     365      <arg value="-C"/> 
     366      <arg value="${dist.dir}/visbio/linux visbio${visbio.version}"/> 
    380367    </exec> 
    381368  </target> 
    382  
    383   <property name="visbio.nojre-dir" 
    384     value="${dist.dir}/visbio/nojre/visbio${visbio.version}"/> 
    385369 
    386370  <!-- HACK - limit OS to *nix due to file permission issues --> 
     
    404388    <!-- HACK - tar does not preserve permissions; use exec instead --> 
    405389    <exec executable="tar"> 
    406       <arg line="czf ${dist.dir}/visbio${visbio.version}.tar.gz -C ${dist.dir}/visbio/nojre visbio${visbio.version}"/> 
     390      <arg value="czf"/> 
     391      <arg value="${dist.dir}/visbio${visbio.version}.tar.gz"/> 
     392      <arg value="-C"/> 
     393      <arg value="${dist.dir}/visbio/nojre visbio${visbio.version}"/> 
    407394    </exec> 
    408395  </target> 
     
    410397  <!-- LOCI Plugins for ImageJ --> 
    411398 
    412   <property name="plugins.files" value="loci/plugins/** loci/ome/viewer/**"/> 
    413  
    414   <target name="jar-plugins" 
    415     depends="compile, copy-jars, jar-formats" 
     399  <target name="jar-plugins" depends="compile, copy-jars, jar-formats" 
    416400    description="generate JAR file for LOCI Plugins for ImageJ"> 
    417401    <jar jarfile="${jar.dir}/loci_plugins.jar" 
     
    429413  <!-- OME Metadata Notebook --> 
    430414 
    431   <property name="notebook.classpath" value="bio-formats.jar commons-httpclient-2.0-rc2.jar commons-logging.jar forms-1.0.4.jar ome-java.jar xmlrpc-1.2-b1.jar"/> 
    432   <property name="notebook.files" 
    433     value="loci/ome/notebook/** loci/ome/viewer/**"/> 
    434   <property name="notebook.resources" value="loci/ome/notebook/Template.xml loci/ome/notebook/Icons/* loci/ome/notebook/TypeDefs/**"/> 
    435  
    436   <target name="jar-notebook" 
    437     depends="compile, copy-jars, jar-formats" 
     415  <target name="jar-notebook" depends="compile, copy-jars, jar-formats" 
    438416    description="generate JAR file for OME Metadata Notebook"> 
    439417    <copy todir="${classes.dir}" preservelastmodified="true"> 
     
    451429 
    452430  <!-- Leica Converter --> 
    453  
    454   <property name="leica.classpath" value="bio-formats.jar ome-java.jar"/> 
    455   <property name="leica.files" value="loci/apps/leica/**"/> 
    456431 
    457432  <target name="jar-leica" depends="compile, copy-jars, jar-formats" 
     
    467442 
    468443  <!-- QT TIFF Converter --> 
    469  
    470   <property name="qt.files" value="loci/apps/qt/* loci/formats/BitBuffer* loci/formats/BitWriter* loci/formats/ByteVector* loci/formats/ComboFileFilter* loci/formats/Compression* loci/formats/DataTools* loci/formats/DummyMetadataStore* loci/formats/ExtensionFileFilter* loci/formats/FilePattern* loci/formats/FileStitcher* loci/formats/FormatException* loci/formats/FormatFileFilter* loci/formats/FormatHandler* loci/formats/FormatReader* loci/formats/FormatWriter* loci/formats/IFormatHandler* loci/formats/IFormatReader* loci/formats/ImageTools* loci/formats/LZWTreeNode* loci/formats/LegacyQTTools* loci/formats/MetadataStore* loci/formats/NumberFilter* loci/formats/OMEXMLMetadataStore* loci/formats/RandomAccessArray* loci/formats/RandomAccessStream* loci/formats/ReflectException* loci/formats/ReflectedUniverse* loci/formats/TiffRational* loci/formats/TiffTools* loci/formats/in/BaseTiffReader* loci/formats/in/LegacyQTReader* loci/formats/in/QTReader* loci/formats/in/TiffReader* loci/formats/out/TiffWriter*"/> 
    471444 
    472445  <target name="jar-qt" depends="compile" 
     
    483456  <!-- Slim Plotter --> 
    484457 
    485   <property name="slim.classpath" value="visad-lite.jar"/> 
    486   <property name="slim.files" value="loci/apps/slim/* loci/formats/DataTools* loci/formats/ExtensionFileFilter* loci/formats/ComboFileFilter* loci/visbio/util/OutputConsole* loci/visbio/util/OutputEvent* loci/visbio/util/SwingUtil* loci/visbio/util/LAFUtil*"/> 
    487  
    488458  <target name="jar-slim" depends="compile, copy-jars" 
    489459    description="generate JAR file for Slim Plotter"> 
     
    497467  </target> 
    498468 
    499   <property name="slim.dist-dir" value="${dist.dir}/slim/SlimPlotter"/> 
    500  
    501469  <target name="dist-slim" if="isUnix" depends="copy-jars, jar-slim"> 
    502470    <copy todir="${slim.dist-dir}" preservelastmodified="true"> 
     
    513481    <!-- HACK - zip does not preserve permissions; use exec instead --> 
    514482    <exec executable="zip" dir="${dist.dir}/slim"> 
    515       <arg line="-r9 ../slim.zip SlimPlotter"/> 
     483      <arg value="-r9"/> 
     484      <arg value="../slim.zip"/> 
     485      <arg value="SlimPlotter"/> 
    516486    </exec> 
    517487  </target> 
Note: See TracChangeset for help on using the changeset viewer.