-
Notifications
You must be signed in to change notification settings - Fork 114
/
build.xml
83 lines (72 loc) · 3.66 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<?xml version="1.0" encoding="UTF-8"?>
<project name="FlightPlot" default="all">
<path id="libsclasspath">
<fileset dir="lib">
<include name="*.jar"/>
</fileset>
</path>
<target name="all" description="Do the entire build" depends="flightplot"/>
<target name="make_dirs" description="Make dirs">
<mkdir dir="out/production/FlightPlot"/>
</target>
<path id="javac2.class.path">
<pathelement location="lib/javac2.jar"/>
<pathelement location="lib/asm4-all.jar"/>
<pathelement location="lib/jdom.jar"/>
<pathelement location="lib/vecmath.jar"/>
</path>
<taskdef name="javac2" classname="com.intellij.ant.Javac2" classpathref="javac2.class.path"/>
<target name="compile" description="Compile java sources" depends="make_dirs">
<javac2 destdir="out/production/FlightPlot" includeantruntime="false" debug="true" encoding="UTF8" target="1.6" source="1.6">
<compilerarg value="-Djava.ext.dirs="/>
<classpath refid="libsclasspath"/>
<src path="src"/>
<src path="jMAVlib/src"/>
</javac2>
</target>
<target name="flightplot" description="Link classes and JARs for FlightPlot" depends="compile">
<jar id="flightplot" jarfile="out/production/flightplot.jar">
<manifest>
<attribute name="Main-Class" value="me.drton.flightplot.FlightPlot"/>
</manifest>
<fileset dir="out/production/FlightPlot">
<include name="**/*.class"/>
</fileset>
<zipgroupfileset dir="lib" includes="jfreechart-*.jar"/>
<zipgroupfileset dir="lib" includes="jcommon-*.jar"/>
<zipgroupfileset dir="lib" includes="forms_rt.jar"/>
<zipgroupfileset dir="lib" includes="vecmath.jar"/>
</jar>
</target>
<taskdef name="jarbundler" classpath="lib/jarbundler-2.4.0.jar" classname="net.sourceforge.jarbundler.JarBundler"/>
<target name="flightplot_mac_os_app" description="Build FlightPlot Mac OS X app" depends="flightplot">
<jarbundler dir="out/production" name="FlightPlot" mainclass="me.drton.flightplot.FlightPlot"
jar="out/production/flightplot.jar" version="0.2.25"
vmoptions="-Dapple.eawt.quitStrategy=CLOSE_ALL_WINDOWS -Djava.ext.dirs="
stubfile="lib/universalJavaApplicationStub"
jvmversion="1.6+"
useJavaXKey="true"
hirescapable="true"
icon="flightplot.icns"
/>
</target>
<target name="gen_deb" description="generate deb file" depends="flightplot">
<copy file = "out/production/flightplot.jar" tofile="packaging/ubuntu/FlightPlot/usr/local/bin/flightplot.jar" />
<chmod file = "packaging/ubuntu/FlightPlot/usr/local/bin/flightplot.jar" perm="755"/>
<exec executable="dpkg">
<arg value="-b"/>
<arg value="packaging/ubuntu/FlightPlot" />
<arg value="out/production/FlightPlot.deb" />
</exec>
<delete file="packaging/ubuntu/FlightPlot/usr/local/bin/flightplot.jar"/>
</target>
<target name="zip_artifacts" description="Zip build artifacts for distribution" depends="flightplot_mac_os_app">
<zip destfile="out/production/flightplot.jar.zip" basedir="out/production" includes="flightplot.jar" />
<zip destfile="out/production/flightplot.app.zip">
<zipfileset dir="out/production" includes="FlightPlot.app/**/*" filemode="755" />
</zip>
</target>
<target name="clean" description="Clean up">
<delete dir="out/production"/>
</target>
</project>