1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-11-28 09:24:14 +01:00

arduino-core project is now correctly compiled through ant build script

This commit is contained in:
Cristian Maglie 2014-09-24 11:35:30 +02:00
parent ba8eadeeb5
commit d1f4e0370d
6 changed files with 67 additions and 10 deletions

View File

@ -3,7 +3,6 @@
<classpathentry excluding="processing/app/tools/format/|processing/app/tools/format/src/|processing/app/Trace.java|processing/app/RunnerClassLoader.java" kind="src" path="app/src"/>
<classpathentry kind="src" path="app/test"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry combineaccessrules="false" kind="src" path="/processing-core"/>
<classpathentry kind="lib" path="app/lib/antlr.jar"/>
<classpathentry kind="lib" path="app/lib/apple.jar"/>
<classpathentry kind="lib" path="app/lib/ecj.jar"/>
@ -21,5 +20,6 @@
<classpathentry kind="lib" path="app/lib/jmdns-3.4.1.jar"/>
<classpathentry kind="lib" path="app/lib/jsch-0.1.50.jar"/>
<classpathentry kind="lib" path="app/lib/jssc-2.8.0.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/arduino-core"/>
<classpathentry kind="output" path="app/bin"/>
</classpath>

4
.gitignore vendored
View File

@ -1,8 +1,8 @@
app/bin/
app/pde.jar
build/macosx/work/
core/bin/
core/core.jar
arduino-core/bin/
arduino-core/arduino-core.jar
hardware/arduino/bootloaders/caterina_LUFA/Descriptors.o
hardware/arduino/bootloaders/caterina_LUFA/Descriptors.lst
hardware/arduino/bootloaders/caterina_LUFA/Caterina.sym

View File

@ -6,7 +6,7 @@
<include name="*.jar"/>
</fileset>
<pathelement path="${env.JAVA_HOME}/lib/tools.jar"/>
<pathelement path="../core/core.jar"/>
<pathelement path="../arduino-core/arduino-core.jar"/>
</path>
<path id="class.path.test">
@ -24,6 +24,11 @@
</target>
<target name="compile" description="Compile sources">
<condition property="core-built">
<available file="../arduino-core/arduino-core.jar" />
</condition>
<fail unless="core-built" message="Please build the Arduino-core library first and make sure it sits in ../arduino-core/arduino-core.jar" />
<mkdir dir="bin" />
<!-- ant seems to nuke ${java.home} for some reason, pointing at the JRE
@ -75,9 +80,6 @@
includeAntRuntime="false"
debug="true"
classpathref="class.path" />
<copy todir="bin" overwrite="true" verbose="true">
<fileset dir="src" includes="**/*.properties" />
</copy>
</target>
<target name="test" depends="compile" description="Runs the test">

52
arduino-core/build.xml Normal file
View File

@ -0,0 +1,52 @@
<?xml version="1.0"?>
<project name="Arduino IDE Core" default="build">
<path id="class.path">
<fileset dir="lib">
<include name="*.jar"/>
</fileset>
<pathelement path="${env.JAVA_HOME}/lib/tools.jar"/>
</path>
<target name="clean" description="Clean out the build directories">
<delete dir="bin" />
<delete file="arduino-core.jar" />
</target>
<target name="compile" description="Compile">
<!--
<taskdef name="methods"
classname="PAppletMethods"
classpath="methods/methods.jar" />
<methods dir="${basedir}/src/processing/core" />
-->
<mkdir dir="bin" />
<!-- 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}" />
<javac source="1.6"
target="1.6"
encoding="UTF-8"
includeAntRuntime="false"
srcdir="src"
classpathref="class.path"
destdir="bin">
</javac>
<copy todir="bin" overwrite="true" verbose="true">
<fileset dir="src" includes="**/*.properties" />
</copy>
</target>
<target name="build" depends="compile" description="Build core library">
<jar basedir="bin" destfile="arduino-core.jar" />
</target>
</project>

View File

@ -39,6 +39,7 @@
<!-- Libraries required for running arduino -->
<fileset dir=".." id="runtime.jars">
<include name="arduino-core/arduino-core.jar" />
<include name="app/pde.jar" />
<include name="app/lib/commons-codec-1.7.jar" />
<include name="app/lib/commons-exec-1.1.jar" />
@ -83,10 +84,12 @@
<!-- - - - - - - - - - - - - - - - - - -->
<target name="subprojects-clean">
<subant buildpath="../arduino-core" target="clean"/>
<subant buildpath="../app" target="clean"/>
</target>
<target name="subprojects-build">
<subant buildpath="../arduino-core" target="build"/>
<subant buildpath="../app" target="build"/>
</target>
@ -160,7 +163,7 @@
<echo message="Latest revision detected in shared/revision.txt is: ${revision}" />
<!-- figure out the revision number in base.java -->
<loadfile srcfile="../app/src/processing/app/Base.java"
<loadfile srcfile="../arduino-core/src/processing/app/BaseNoGui.java"
property="revision.base">
<filterchain>
<tokenfilter>
@ -170,7 +173,7 @@
</tokenfilter>
</filterchain>
</loadfile>
<echo message="Revision in Base.java is: ${revision.base}" />
<echo message="Revision in BaseNoGui.java is: ${revision.base}" />
</target>
<!-- - - - - - - - -->

View File

@ -94,7 +94,7 @@
<!-- In 0149, removed /System/Library/Java from the CLASSPATH because
it can cause problems if users have installed weird files there.
http://dev.processing.org/bugs/show_bug.cgi?id=1045 -->
<string>$JAVAROOT/pde.jar:$JAVAROOT/antlr.jar:$JAVAROOT/apple.jar:$JAVAROOT/ecj.jar:$JAVAROOT/registry.jar:$JAVAROOT/quaqua.jar:$JAVAROOT/jssc-2.8.0.jar:$JAVAROOT/commons-codec-1.7.jar:$JAVAROOT/commons-exec-1.1.jar:$JAVAROOT/commons-httpclient-3.1.jar:$JAVAROOT/commons-logging-1.0.4.jar:$JAVAROOT/jmdns-3.4.1.jar:$JAVAROOT/jsch-0.1.50.jar:$JAVAROOT/jna.jar</string>
<string>$JAVAROOT/pde.jar:$JAVAROOT/arduino-core.jar:$JAVAROOT/antlr.jar:$JAVAROOT/apple.jar:$JAVAROOT/ecj.jar:$JAVAROOT/registry.jar:$JAVAROOT/quaqua.jar:$JAVAROOT/jssc-2.8.0.jar:$JAVAROOT/commons-codec-1.7.jar:$JAVAROOT/commons-exec-1.1.jar:$JAVAROOT/commons-httpclient-3.1.jar:$JAVAROOT/commons-logging-1.0.4.jar:$JAVAROOT/jmdns-3.4.1.jar:$JAVAROOT/jsch-0.1.50.jar:$JAVAROOT/jna.jar</string>
<key>JVMArchs</key>
<array>