-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.xml
114 lines (98 loc) · 3.75 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<project name="xmax" default="compile" basedir=".">
<description>
XMAX
</description>
<!-- set global properties for this build -->
<property name="src.dir" location="src"/>
<property name="build.root" location="build"/>
<property name="build.resources" location="build/resources"/>
<property name="libs.dir" location="libs"/>
<property name="project.main" value="com.isti.xmax.XMAX" />
<property name="project.archive" value="xmax.jar" />
<property name="manifest.file" value="${src.dir}/META-INF/MANIFEST.MF" />
<!-- Classpath for compile -->
<path id="compile.class.path">
<pathelement location="${src.dir}"/>
<fileset dir="${libs.dir}">
<include name="**/*.jar"/>
</fileset>
</path>
<!-- Classpath for run -->
<path id="run.class.path">
<pathelement location="${build.root}"/>
<fileset dir="${libs.dir}">
<include name="**/*.jar"/>
</fileset>
<dirset dir="plugins/">
<include name="**/classes"/>
</dirset>
<!-- Doesn't seem to look for images anymore ... ? -->
<pathelement location="${build.resources}/images"/>
</path>
<path id="classpath">
<fileset dir="libs" includes="*.jar" />
</path>
<typedef resource="org/java/plugin/tools/ant/jpf-tasks.properties">
<classpath refid="classpath" />
</typedef>
<target name="build-plugins">
<!--
<mkdir dir="${build.root}/plugins" />
-->
<ant dir="plugins/com.isti.xmax.filter.lowpass" target="build" />
<ant dir="plugins/com.isti.xmax.filter.highpass" target="build" />
<ant dir="plugins/com.isti.xmax.filter.bandpass" target="build" />
<ant dir="plugins/com.isti.xmax.filter.dyo" target="build" />
</target>
<!--CLEAN-->
<target name="clean">
<delete dir="${build.root}" verbose="true"/>
</target>
<!--INIT-->
<target name="init" depends="clean">
<tstamp/>
<mkdir dir="${build.root}"/>
<!-- <mkdir dir="${build.resources}"/> -->
</target>
<!--COMPILE-->
<target name="compile" depends="init" description="Compile the source">
<javac verbose="true" srcdir="${src.dir}" destdir="${build.root}" listfiles="true" encoding="utf-8" debug="true" includeantruntime="no">
<classpath refid="compile.class.path"/>
<compilerarg value="-Xlint" />
</javac>
</target>
<!--RUN-->
<target name="run" description="">
<property name="myclasspath" refid="run.class.path"/>
<echo message="Classpath = ${myclasspath}"/>
<echo message="project.main = ${project.main}"/>
<java classname="${project.main}" classpathref="run.class.path" fork="true" >
<jvmarg value="-Xms64m"/>
<jvmarg value="-Xmx512m"/>
</java>
</target>
<!--LIBRARIES-->
<target name="libraries" description="Add libraries">
<copy todir="${build.root}/libs">
<fileset dir="${libs.dir}"/>
</copy>
<copy file="${src.dir}/log4j.properties" todir="${build.root}"/>
<!--
<unjar dest="${build.root}">
<fileset dir="${libs.dir}">
<include name="**/*.jar"/>
</fileset>
</unjar>
<delete dir="${build.root}/META-INF"/>
-->
</target>
<!--
<available file="${manifest.file}" property="has.manifest" />
<target name="jar" if="has.manifest" description="generate the distribution" >
-->
<!--JAR-->
<target name="jar" depends="libraries" description="generate the distribution" >
<jar jarfile="${project.archive}" manifest="${manifest.file}" basedir="${build.root}" >
</jar>
</target>
</project>