source: branches/4.2/components/visbio/build.xml @ 6016

Revision 6016, 6.8 KB checked in by curtis, 10 years ago (diff)

Move a bunch of Ant junk into its own folder.

Line 
1<!--
2build.xml
3
4Ant build file for VisBio project.
5Download Apache Ant from http://ant.apache.org/.
6Type "ant -p" for a list of targets.
7-->
8
9<project name="visbio" default="jar" basedir=".">
10  <description>Build file for VisBio project</description>
11  <property name="root.dir" location="../.."/>
12  <import file="${root.dir}/ant/java.xml"/>
13  <property file="build.properties"/>
14
15  <target name="dist"
16    depends="dist-win32, dist-win32-nojre, dist-macosx, dist-linux, dist-nojre"
17    description="create distribution bundles for VisBio"/>
18
19  <target name="dist-win32" depends="jar"
20    description="create distribution bundle: Windows w/ JRE">
21    <copy todir="${visbio.dist-win32-dir}/VisBio" preservelastmodified="true">
22      <fileset dir="dist/win32"/>
23      <fileset dir="${dest.dir}/loci/visbio"
24        includes="${visbio.dist-resources}"/>
25      <fileset dir="${artifact.dir}" includes=
26        "${component.jar} ${component.manifest-cp} ${visbio.dist-jars}"/>
27    </copy>
28    <fixcrlf srcdir="${visbio.dist-win32-dir}/VisBio"
29      eol="dos" includes="${visbio.dist-text-files}"/>
30    <untar src="${root.dir}/dist/jre-win32.tar.gz"
31      dest="${visbio.dist-win32-dir}/VisBio"
32      overwrite="false" compression="gzip"/>
33    <zip destfile="${dist.dir}/visbio${visbio.version}_win32.zip"
34      basedir="${visbio.dist-win32-dir}"/>
35  </target>
36
37  <target name="dist-win32-nojre" depends="jar"
38    description="create distribution bundle: Windows no JRE">
39    <copy todir="${visbio.dist-win32-nojre-dir}/VisBio"
40      preservelastmodified="true">
41      <fileset dir="dist/win32" excludes="launcher.cfg"/>
42      <fileset dir="dist/win32-nojre"/>
43      <fileset dir="${dest.dir}/loci/visbio"
44        includes="${visbio.dist-resources}"/>
45      <fileset dir="${artifact.dir}" includes=
46        "${component.jar} ${component.manifest-cp} ${visbio.dist-jars}"/>
47    </copy>
48    <fixcrlf srcdir="${visbio.dist-win32-nojre-dir}/VisBio"
49      eol="dos" includes="${visbio.dist-text-files}"/>
50    <zip destfile="${dist.dir}/visbio${visbio.version}_win32_nojre.zip"
51      basedir="${visbio.dist-win32-nojre-dir}"/>
52  </target>
53
54  <!-- HACK - limit OS to *nix due to file permission issues -->
55  <target name="dist-macosx" if="isUnix" depends="jar"
56    description="create distribution bundle: Mac OS X">
57    <copy todir="${visbio.dist-macosx-dir}/VisBio"
58      preservelastmodified="true">
59      <fileset dir="dist/macosx"/>
60      <fileset dir="${dest.dir}/loci/visbio"
61        includes="${visbio.dist-resources}"/>
62    </copy>
63    <fixcrlf srcdir="${visbio.dist-macosx-dir}/VisBio"
64      eol="mac" includes="${visbio.dist-text-files}"/>
65    <!-- HACK - copy does not preserve permissions; chmod them back -->
66    <chmod perm="+x">
67      <fileset dir="${visbio.dist-macosx-dir}/VisBio"
68        includes="${visbio.exec-macosx}"/>
69    </chmod>
70    <copy todir=
71      "${visbio.dist-macosx-dir}/VisBio/VisBio.app/Contents/Resources/Java">
72      <fileset dir="${artifact.dir}" includes=
73        "${component.jar} ${component.manifest-cp} ${visbio.dist-jars}"/>
74    </copy>
75    <!--<tar destfile="${dist.dir}/visbio${visbio.version}_macosx.tar.gz"
76      basedir="${visbio.dist-macosx-dir}" compression="gzip"/>-->
77    <!-- HACK - tar does not preserve permissions; use exec instead -->
78    <echo>Building tar: visbio${visbio.version}_macosx.tar.gz</echo>
79    <exec executable="tar">
80      <arg value="czf"/>
81      <arg value="${dist.dir}/visbio${visbio.version}_macosx.tar.gz"/>
82      <arg value="-C"/>
83      <arg value="${visbio.dist-macosx-dir}"/>
84      <arg value="VisBio"/>
85    </exec>
86  </target>
87
88  <!-- HACK - limit OS to *nix due to file permission issues -->
89  <target name="dist-linux" if="isUnix"
90    depends="jar"
91    description="create distribution bundle: Linux w/ JRE">
92    <copy todir="${visbio.dist-linux-dir}/visbio${visbio.version}"
93      preservelastmodified="true">
94      <fileset dir="dist/linux"/>
95      <fileset dir="${dest.dir}/loci/visbio"
96        includes="${visbio.dist-resources}"/>
97      <fileset dir="${artifact.dir}" includes=
98        "${component.jar} ${component.manifest-cp} ${visbio.dist-jars}"/>
99    </copy>
100    <fixcrlf srcdir="${visbio.dist-linux-dir}/visbio${visbio.version}"
101      eol="unix" includes="${visbio.dist-text-files}"/>
102    <!-- HACK - copy does not preserve permissions; chmod them back -->
103    <chmod perm="+x">
104      <fileset dir="${visbio.dist-linux-dir}/visbio${visbio.version}"
105        includes="${visbio.exec-linux}"/>
106    </chmod>
107    <!--<untar src="${root.dir}/dist/jre-linux.tar.gz"
108      dest="${visbio.dist-linux-dir}/visbio${visbio.version}"
109      overwrite="false" compression="gzip"/>-->
110    <!-- HACK - untar does not restore permissions; use exec instead -->
111    <echo>Expanding: jre-linux.tar.gz</echo>
112    <exec executable="tar">
113      <arg value="xzf"/>
114      <arg value="${root.dir}/dist/jre-linux.tar.gz"/>
115      <arg value="-C"/>
116      <arg value="${visbio.dist-linux-dir}/visbio${visbio.version}"/>
117    </exec>
118    <!--<tar destfile="${dist.dir}/visbio${visbio.version}_linux.tar.gz"
119      basedir="${visbio.dist-linux-dir}" compression="gzip"/>-->
120    <!-- HACK - tar does not preserve permissions; use exec instead -->
121    <echo>Building tar: visbio${visbio.version}_linux.tar.gz</echo>
122    <exec executable="tar">
123      <arg value="czf"/>
124      <arg value="${dist.dir}/visbio${visbio.version}_linux.tar.gz"/>
125      <arg value="-C"/>
126      <arg value="${visbio.dist-linux-dir}"/>
127      <arg value="visbio${visbio.version}"/>
128    </exec>
129  </target>
130
131  <!-- HACK - limit OS to *nix due to file permission issues -->
132  <target name="dist-nojre" if="isUnix" depends="jar"
133    description="create distribution bundle: cross-platform">
134    <copy todir="${visbio.dist-nojre-dir}/visbio${visbio.version}"
135      preservelastmodified="true">
136      <fileset dir="dist/linux"/>
137      <fileset dir="${dest.dir}/loci/visbio"
138        includes="${visbio.dist-resources}"/>
139      <fileset dir="${artifact.dir}" includes=
140        "${component.jar} ${component.manifest-cp} ${visbio.dist-jars}"/>
141    </copy>
142    <fixcrlf srcdir="${visbio.dist-nojre-dir}/visbio${visbio.version}"
143      eol="unix" includes="${visbio.dist-text-files}"/>
144    <!-- HACK - copy does not preserve permissions; chmod them back -->
145    <chmod perm="+x">
146      <fileset dir="${visbio.dist-nojre-dir}/visbio${visbio.version}"
147        includes="${visbio.exec-linux}"/>
148    </chmod>
149    <!--<tar destfile="${dist.dir}/visbio${visbio.version}.tar.gz"
150      basedir="${visbio.dist-nojre-dir}" compression="gzip"/>-->
151    <!-- HACK - tar does not preserve permissions; use exec instead -->
152    <echo>Building tar: visbio${visbio.version}.tar.gz</echo>
153    <exec executable="tar">
154      <arg value="czf"/>
155      <arg value="${dist.dir}/visbio${visbio.version}.tar.gz"/>
156      <arg value="-C"/>
157      <arg value="${visbio.dist-nojre-dir}"/>
158      <arg value="visbio${visbio.version}"/>
159    </exec>
160  </target>
161</project>
Note: See TracBrowser for help on using the repository browser.