forked from processing/processing
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
77 lines (66 loc) · 2.72 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
<?xml version="1.0"?>
<project name="Processing Core" default="build">
<target name="clean" description="Clean out the build directories">
<delete dir="bin" />
<delete file="library/core.jar" />
</target>
<target name="methods-check">
<available file="methods/methods.jar" property="methods.present" />
</target>
<target name="methods-build" depends="methods-check" unless="methods.present">
<subant buildpath="methods" target="dist" />
</target>
<target name="compile" description="Compile" depends="methods-build">
<taskdef name="methods"
classname="PAppletMethods"
classpath="methods/methods.jar" />
<methods dir="${basedir}/src/processing/core" recorder="true" />
<!-- Check for JDT compiler, since this is likely a PDE build. Using
it allows us to build the PDE with only a JRE on Windows and Linux.
So that the core can be built independently of the PDE,
use javac (the "modern" compiler) if ecj is not present. -->
<property name="jdt.jar" value="../java/mode/org.eclipse.jdt.core.jar" />
<condition property="build.compiler"
value="org.eclipse.jdt.core.JDTCompilerAdapter"
else="modern">
<available file="${jdt.jar}" />
</condition>
<!--<echo message="compiler is ${build.compiler}" />-->
<!-- JavaFX got removed from the Oracle's JDK for arm -->
<condition property="fx.unavailable" value="true">
<equals arg1="${os.arch}" arg2="arm" />
</condition>
<!-- link against apple.jar for the ThinkDifferent class -->
<mkdir dir="bin" />
<javac source="1.7"
target="1.7"
encoding="UTF-8"
includeAntRuntime="false"
debug="true"
destdir="bin"
classpath="apple.jar;
library/jogl-all.jar;
library/gluegen-rt.jar"
nowarn="true">
<!-- kinda gross, but if not using the JDT, this just ignored anyway -->
<compilerclasspath path="${jdt.jar}; ../java/mode/jdtCompilerAdapter.jar" />
<src path="src" />
<include name="processing/**" />
<exclude name="processing/javafx/**" if="fx.unavailable" />
</javac>
<!-- Copy the jnilib to the bin folder so it's included. -->
<copy todir="bin/japplemenubar"
file="src/japplemenubar/libjAppleMenuBar.jnilib" />
<!-- Copy shaders to bin. (Eclipse does this automatically.) -->
<copy todir="bin">
<fileset dir="src">
<include name="processing/opengl/shaders/*.glsl" />
<include name="processing/opengl/cursors/*.png" />
<include name="icon/*.png" />
</fileset>
</copy>
</target>
<target name="build" depends="compile" description="Build core library">
<jar basedir="bin" destfile="library/core.jar" />
</target>
</project>