source: trunk/components/visbio/build.xml @ 4382

Revision 4382, 6.4 KB checked in by curtis, 11 years ago (diff)

Shuffle around dist targets -- still broken though.

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