source: trunk/components/slim-plotter/build.xml @ 4822

Revision 4822, 1.9 KB checked in by curtis, 11 years ago (diff)

Better build system for Bio-Formats C++ bindings on Linux.

Line 
1<!--
2build.xml
3
4Ant build file for SLIM Plotter project.
5Download Apache Ant from http://ant.apache.org/.
6Type "ant -p" for a list of targets.
7-->
8
9<project name="slim" default="jar" basedir=".">
10  <description>
11    Build file for SLIM Plotter project
12  </description>
13  <property file="base.properties"/>
14  <import file="${root.dir}/java.xml"/>
15  <property file="build.properties"/>
16
17  <target name="dist" if="isUnix" depends="jar"
18    description="create distribution bundle for Slim Plotter">
19    <copy todir="${slim.dist-dir}" preservelastmodified="true">
20      <fileset dir="dist"/>
21      <fileset dir="${artifact.dir}" includes="${component.jar}"/>
22    </copy>
23    <!-- copy JAR libraries in the classpath -->
24    <for list="${component.manifest-cp}" param="jar" delimiter=" " trim="true">
25      <sequential>
26        <for list="${jar.dirs}" param="jardir" delimiter=" " trim="true">
27          <sequential>
28            <available file="${root.dir}/@{jardir}/@{jar}"
29              property="@{jardir}.@{jar}.present"/>
30            <if>
31              <equals arg1="${@{jardir}.@{jar}.present}" arg2="true" />
32              <then>
33                <copy todir="${slim.dist-dir}" preservelastmodified="true">
34                  <fileset dir="${root.dir}/@{jardir}" includes="@{jar}"/>
35                </copy>
36              </then>
37            </if>
38          </sequential>
39        </for>
40      </sequential>
41    </for>
42    <!-- HACK - copy does not preserve permissions; chmod them back -->
43    <chmod perm="+x">
44      <fileset dir="${slim.dist-dir}" includes="${slim.exec}"/>
45    </chmod>
46    <!--<zip destfile="${dist.dir}/slim.zip" basedir="${dist.dir}/slim"/>-->
47    <!-- HACK - zip does not preserve permissions; use exec instead -->
48    <exec executable="zip" dir="${dist.dir}">
49      <arg value="-r9"/>
50      <arg value="slim.zip"/>
51      <arg value="SlimPlotter"/>
52    </exec>
53  </target>
54</project>
Note: See TracBrowser for help on using the repository browser.