0
|
1 <?xml version="1.0" encoding="iso-8859-1"?>
|
|
2 <project name="java-genomics-toolkit" default="jar" basedir=".">
|
|
3 <description>
|
|
4 build the toolkit
|
|
5 </description>
|
|
6
|
|
7 <!-- set global properties for this build -->
|
|
8 <property name="version" value="1.1.0"/>
|
|
9 <property name="buildnumber" value="1"/>
|
|
10 <property name="copyright" value="Copyright © 2011 Timothy Palpant"/>
|
|
11
|
|
12 <!-- directory variables -->
|
|
13 <property name="src" location="src"/>
|
|
14 <property name="test" location="test"/>
|
|
15 <property name="gui" location="gui"/>
|
|
16 <property name="build" location="build"/>
|
|
17 <property name="dist" location="dist"/>
|
|
18 <property name="lib" location="lib"/>
|
|
19
|
|
20 <!-- compile all Java code -->
|
|
21 <target name="compile" description="compile the scripts">
|
|
22 <!-- Create the build directory structure used by compile -->
|
|
23 <mkdir dir="${build}"/>
|
|
24
|
|
25 <!-- Compile the java code from ${src} into ${build} -->
|
|
26 <javac srcdir="${src}" destdir="${build}" source="1.7" target="1.7">
|
|
27 <classpath>
|
|
28 <path id="lib.path.ref">
|
|
29 <fileset dir="lib" includes="*.jar"/>
|
|
30 </path>
|
|
31 </classpath>
|
|
32 </javac>
|
|
33
|
|
34 <!-- Compile the java code from ${gui} into ${build} -->
|
|
35 <javac srcdir="${gui}" destdir="${build}" source="1.7" target="1.7">
|
|
36 <classpath>
|
|
37 <path id="lib.path.ref">
|
|
38 <fileset dir="lib" includes="*.jar"/>
|
|
39 </path>
|
|
40 </classpath>
|
|
41 </javac>
|
|
42 </target>
|
|
43
|
|
44 <!-- package all Java code into a JAR file -->
|
|
45 <target name="jar" depends="compile" description="generate the jarfile">
|
|
46 <!-- Create the distribution directory -->
|
|
47 <mkdir dir="${dist}"/>
|
|
48
|
|
49 <!-- Put everything in ${build} into the jar file -->
|
|
50 <jar jarfile="${dist}/${ant.project.name}.jar" manifest="META-INF/MANIFEST.MF">
|
|
51 <fileset dir="${build}" />
|
|
52 </jar>
|
|
53 </target>
|
|
54
|
|
55 <!-- Package the jar file into a Mac OS X application with jarbundler -->
|
|
56 <target name="package-osx" depends="jar" description="Build the application for OS X">
|
|
57 <taskdef name="jarbundler"
|
|
58 classpath="${lib}/jarbundler-2.2.0.jar"
|
|
59 classname="net.sourceforge.jarbundler.JarBundler"/>
|
|
60
|
|
61 <jarbundler dir="${dist}" verbose="false" showPlist="false"
|
|
62 name="Genomics Toolkit"
|
|
63 mainclass="edu.unc.genomics.ToolRunner"
|
|
64 jvmversion="1.7+"
|
|
65 stubfile="stubFile.sh"
|
|
66 version="${version}"
|
|
67 infostring="${ant.project.name}, ${copyright}"
|
|
68 build="${buildnumber}"
|
|
69 bundleid="edu.unc.genomics.GenomicsToolkit">
|
|
70
|
|
71 <jarfilelist dir="${dist}" files="${ant.project.name}.jar"/>
|
|
72 <jarfileset dir="${lib}">
|
|
73 <include name="*.jar" />
|
|
74 <exclude name="launch4j.jar" />
|
|
75 <exclude name="xstream.jar" />
|
|
76 <exclude name="jarbundler-2.2.0.jar" />
|
|
77 </jarfileset>
|
|
78
|
|
79 <!-- Adjust the look, feel and behavior -->
|
|
80 <javaproperty name="apple.laf.useScreenMenuBar" value="true"/>
|
|
81 <javaproperty name="apple.awt.brushMetal" value="true"/>
|
|
82 <javaproperty name="apple.awt.showGrowBox" value="false"/>
|
|
83 <javaproperty name="apple.awt.textantialiasing" value="true"/>
|
|
84 <javaproperty name="apple.awt.antialiasing" value="true"/>
|
|
85
|
|
86 <!-- Associate document types with this application -->
|
|
87 <documenttype name="Assembly files"
|
|
88 extensions="len"
|
|
89 role="Viewer" />
|
|
90
|
|
91 <!-- Include resource files -->
|
|
92 <resourcefilelist dir="." files="README.rdoc"/>
|
|
93 <resourcefilelist dir="." files="toolConf.xml"/>
|
|
94 <resourcefileset dir="." includes="resources/assemblies/*.len"/>
|
|
95 <javafilelist dir="." files="log4j.properties"/>
|
|
96 </jarbundler>
|
|
97 </target>
|
|
98
|
|
99 <!-- Package the jar file into a Windows application with launch4j -->
|
|
100 <target name="package-win" depends="jar" description="Build the application for Windows">
|
|
101 <taskdef name="launch4j"
|
|
102 classname="net.sf.launch4j.ant.Launch4jTask"
|
|
103 classpath="${lib}/launch4j.jar:${lib}/xstream.jar" />
|
|
104
|
|
105 <launch4j configFile="launch4j.xml" />
|
|
106 </target>
|
|
107
|
|
108 <target name="clean" description="clean up" >
|
|
109 <delete dir="${build}"/>
|
|
110 <delete dir="${dist}"/>
|
|
111 </target>
|
|
112 </project>
|