Skip to content

Commit b2b5763

Browse files
committed
arduino-core project is now correctly compiled through ant build script
1 parent c9cf641 commit b2b5763

File tree

4 files changed

+60
-11
lines changed

4 files changed

+60
-11
lines changed

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
app/bin/
22
app/pde.jar
33
build/macosx/work/
4-
core/bin/
5-
core/core.jar
4+
arduino-core/bin/
5+
arduino-core/arduino-core.jar
66
hardware/arduino/bootloaders/caterina_LUFA/Descriptors.o
77
hardware/arduino/bootloaders/caterina_LUFA/Descriptors.lst
88
hardware/arduino/bootloaders/caterina_LUFA/Caterina.sym

app/build.xml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<include name="*.jar"/>
77
</fileset>
88
<pathelement path="${env.JAVA_HOME}/lib/tools.jar"/>
9-
<pathelement path="../core/core.jar"/>
9+
<pathelement path="../arduino-core/arduino-core.jar"/>
1010
</path>
1111

1212
<path id="class.path.test">
@@ -25,9 +25,9 @@
2525

2626
<target name="compile" description="Compile sources">
2727
<condition property="core-built">
28-
<available file="../core/core.jar" />
28+
<available file="../arduino-core/arduino-core.jar" />
2929
</condition>
30-
<fail unless="core-built" message="Please build the core library first and make sure it sits in ../core/core.jar" />
30+
<fail unless="core-built" message="Please build the Arduino-core library first and make sure it sits in ../arduino-core/arduino-core.jar" />
3131

3232
<mkdir dir="bin" />
3333

@@ -89,9 +89,6 @@
8989
includeAntRuntime="false"
9090
debug="true"
9191
classpathref="class.path" />
92-
<copy todir="bin" overwrite="true" verbose="true">
93-
<fileset dir="src" includes="**/*.properties" />
94-
</copy>
9592
</target>
9693

9794
<target name="test" depends="compile" description="Runs the test">

arduino-core/build.xml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<?xml version="1.0"?>
2+
<project name="Arduino IDE Core" default="build">
3+
4+
<path id="class.path">
5+
<fileset dir="lib">
6+
<include name="*.jar"/>
7+
</fileset>
8+
<pathelement path="${env.JAVA_HOME}/lib/tools.jar"/>
9+
</path>
10+
11+
<target name="clean" description="Clean out the build directories">
12+
<delete dir="bin" />
13+
<delete file="arudino-core.jar" />
14+
</target>
15+
16+
<target name="compile" description="Compile">
17+
<!--
18+
<taskdef name="methods"
19+
classname="PAppletMethods"
20+
classpath="methods/methods.jar" />
21+
<methods dir="${basedir}/src/processing/core" />
22+
-->
23+
<mkdir dir="bin" />
24+
25+
<!-- ant seems to nuke ${java.home} for some reason, pointing at the JRE
26+
subfolder instead of the actual JDK found at JAVA_HOME.
27+
To avoid this, we grab the actual JAVA_HOME environment variable
28+
and use that to specify the location of tools.jar. -->
29+
30+
<!-- if someone is better with ant please help clean this up -->
31+
<property environment="env" />
32+
<property name="java_home" value="${env.JAVA_HOME}" />
33+
34+
<javac source="1.6"
35+
target="1.6"
36+
encoding="UTF-8"
37+
includeAntRuntime="false"
38+
srcdir="src"
39+
classpathref="class.path"
40+
destdir="bin">
41+
</javac>
42+
43+
<copy todir="bin" overwrite="true" verbose="true">
44+
<fileset dir="src" includes="**/*.properties" />
45+
</copy>
46+
</target>
47+
48+
<target name="build" depends="compile" description="Build core library">
49+
<jar basedir="bin" destfile="arduino-core.jar" />
50+
</target>
51+
52+
</project>

build/build.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242

4343
<!-- Libraries required for running arduino -->
4444
<fileset dir=".." id="runtime.jars">
45-
<include name="core/core.jar" />
45+
<include name="arduino-core/arduino-core.jar" />
4646
<include name="app/pde.jar" />
4747
<include name="app/lib/commons-codec-1.7.jar" />
4848
<include name="app/lib/commons-exec-1.1.jar" />
@@ -87,12 +87,12 @@
8787
<!-- - - - - - - - - - - - - - - - - - -->
8888

8989
<target name="subprojects-clean">
90-
<subant buildpath="../core" target="clean"/>
90+
<subant buildpath="../arduino-core" target="clean"/>
9191
<subant buildpath="../app" target="clean"/>
9292
</target>
9393

9494
<target name="subprojects-build">
95-
<subant buildpath="../core" target="build"/>
95+
<subant buildpath="../arduino-core" target="build"/>
9696
<subant buildpath="../app" target="build"/>
9797
</target>
9898

0 commit comments

Comments
 (0)