-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.xml
64 lines (56 loc) · 2.15 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
<?xml version="1.0"?>
<project name="Processing PDE" default="build">
<import file="build-core.xml" />
<import file="build-resources.xml" />
<target name="clean" description="Clean the build directories">
<delete dir="${picode-classes.dir}" />
<delete file="${picode-jar.name}" />
</target>
<target name="compile" description="Compile sources">
<mkdir dir="${picode-classes.dir}" />
<!-- ant seems to nuke ${java.home} for some reason, pointing at the JRE
subfolder instead of the actual JDK found at JAVA_HOME.
To avoid this, we grab the actual JAVA_HOME environment variable
and use that to specify the location of tools.jar. -->
<!-- if someone is better with ant please help clean this up -->
<property environment="env" />
<property name="java_home" value="${env.JAVA_HOME}" />
<available file="${env.JAVA_HOME}/lib/tools.jar"
property="java_tools_found" />
<condition property="linux">
<and>
<os family="unix" />
<not>
<os family="mac" />
</not>
</and>
</condition>
<fail if="linux" unless="java_tools_found"
message="The JAVA_HOME variable must be set to the location of a full JDK. For instance, on Ubuntu Linux, this might be /usr/lib/jvm/java-6-sun." />
<condition property="windows">
<os family="windows" />
</condition>
<fail if="windows" unless="java_tools_found"
message="The JAVA_HOME variable must be set to the location of a full JDK. For instance, on Windows, this might be c:\jdk1.6.0_19." />
<javac source="1.6"
target="1.6"
destdir="${picode-classes.dir}"
encoding="UTF-8"
includeAntRuntime="false"
classpath="${picode-classpath}"
debug="on">
<src path="${picode-src-core.dir}" />
<src path="${picode-src.dir}" />
<src path="processing/src" />
<src path="processing/generated" />
</javac>
</target>
<target name="build" depends="compile" description="Build PDE">
<jar destfile="picode.jar">
<fileset dir="${picode-classes.dir}" />
<fileset dir="${picode-src.dir}" />
<fileset dir="${picode-src-core.dir}" />
<fileset dir="${picode-resources.dir}" />
</jar>
</target>
</project>