1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-16 11:21:18 +03:00

Moving to ant-based build system from Processing. Mac OS X seems to work (for the moment).

This commit is contained in:
David A. Mellis
2010-05-08 21:47:19 +00:00
parent 5d54fbf70b
commit c4760d8ae7
17 changed files with 2038 additions and 3958 deletions

52
app/build.xml Normal file
View File

@ -0,0 +1,52 @@
<?xml version="1.0"?>
<project name="Arduino PDE" default="build">
<target name="clean" description="Clean the build directories">
<delete dir="bin" />
<delete file="pde.jar" />
</target>
<target name="compile" description="Compile sources">
<condition property="core-built">
<available file="../core/core.jar" />
</condition>
<fail unless="core-built" message="Please build the core library first and make sure it sits in ../core/core.jar" />
<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}" />
<condition property="linux"><os family="unix" /></condition>
<fail if="linux" unless="java_home"
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_home"
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_18." />
<!--
<dirname property="blah" file="${java.home}" />
<echo message="here! ${java.home}/lib/tools.jar or there: ${blah}" />
<echo message="override ${env.JAVA_HOME}/lib/tools.jar" />
<fail />
-->
<javac target="1.5"
srcdir="src"
destdir="bin"
excludes="**/tools/format/**"
encoding="UTF-8"
includeAntRuntime="false"
classpath="../core/core.jar; ${env.JAVA_HOME}/lib/tools.jar; lib/ant.jar; lib/ant-launcher.jar; lib/apple.jar; lib/ecj.jar; lib/jna.jar; lib/oro.jar; lib/RXTXcomm.jar" />
</target>
<target name="build" depends="compile" description="Build PDE">
<jar basedir="bin" destfile="pde.jar" />
</target>
</project>

View File

@ -1,132 +0,0 @@
package antlr;
/* ANTLR Translator Generator
* Project led by Terence Parr at http://www.jGuru.com
* Software rights: http://www.antlr.org/RIGHTS.html
*
* $Id: ExtendedCommonASTWithHiddenTokens.java 3419 2007-07-16 14:02:05Z fry $
*/
import java.io.*;
//import antlr.*;
import antlr.collections.*;
//import antlr.collections.impl.*;
/** A CommonAST whose initialization copies hidden token
* information from the Token used to create a node.
*/
public class ExtendedCommonASTWithHiddenTokens
extends CommonASTWithHiddenTokens {
public ExtendedCommonASTWithHiddenTokens() {
super();
}
public ExtendedCommonASTWithHiddenTokens(Token tok) {
super(tok);
}
public void initialize(AST ast) {
ExtendedCommonASTWithHiddenTokens a =
(ExtendedCommonASTWithHiddenTokens)ast;
super.initialize(a);
hiddenBefore = a.getHiddenBefore();
hiddenAfter = a.getHiddenAfter();
}
public String getHiddenAfterString() {
CommonHiddenStreamToken t;
StringBuffer hiddenAfterString = new StringBuffer(100);
for ( t = hiddenAfter ; t != null ; t = t.getHiddenAfter() ) {
hiddenAfterString.append(t.getText());
}
return hiddenAfterString.toString();
}
public String getHiddenBeforeString() {
antlr.CommonHiddenStreamToken
child = null,
parent = hiddenBefore;
// if there aren't any hidden tokens here, quietly return
//
if (parent == null) {
return "";
}
// traverse back to the head of the list of tokens before this node
do {
child = parent;
parent = child.getHiddenBefore();
} while (parent != null);
// dump that list
StringBuffer hiddenBeforeString = new StringBuffer(100);
for ( CommonHiddenStreamToken t = child; t != null ;
t = t.getHiddenAfter() ) {
hiddenBeforeString.append(t.getText());
}
return hiddenBeforeString.toString();
}
public void xmlSerializeNode(Writer out)
throws IOException {
StringBuffer buf = new StringBuffer(100);
buf.append("<");
buf.append(getClass().getName() + " ");
buf.append("hiddenBeforeString=\"" +
encode(getHiddenBeforeString()) +
"\" text=\"" + encode(getText()) + "\" type=\"" +
getType() + "\" hiddenAfterString=\"" +
encode(getHiddenAfterString()) + "\"/>");
out.write(buf.toString());
}
public void xmlSerializeRootOpen(Writer out)
throws IOException {
StringBuffer buf = new StringBuffer(100);
buf.append("<");
buf.append(getClass().getName() + " ");
buf.append("hiddenBeforeString=\"" +
encode(getHiddenBeforeString()) +
"\" text=\"" + encode(getText()) + "\" type=\"" +
getType() + "\" hiddenAfterString=\"" +
encode(getHiddenAfterString()) + "\">\n");
out.write(buf.toString());
}
public void xmlSerializeRootClose(Writer out)
throws IOException {
out.write("</" + getClass().getName() + ">\n");
}
public void xmlSerialize(Writer out) throws IOException {
// print out this node and all siblings
for (AST node = this;
node != null;
node = node.getNextSibling()) {
if (node.getFirstChild() == null) {
// print guts (class name, attributes)
((BaseAST)node).xmlSerializeNode(out);
}
else {
((BaseAST)node).xmlSerializeRootOpen(out);
// print children
((BaseAST)node.getFirstChild()).xmlSerialize(out);
// print end tag
((BaseAST)node).xmlSerializeRootClose(out);
}
}
}
}

View File

@ -1,221 +0,0 @@
/* -*- mode: java; c-basic-offset: 2; indent-tabs-mode: nil -*- */
package antlr;
//package processing.app.preproc;
//import antlr.*;
import antlr.collections.impl.BitSet;
/**
* This class provides TokenStreamHiddenTokenFilters with the concept of
* tokens which can be copied so that they are seen by both the hidden token
* stream as well as the parser itself. This is useful when one wants to use
* an existing parser (like the Java parser included with ANTLR) that throws
* away some tokens to create a parse tree which can be used to spit out
* a copy of the code with only minor modifications.
*
* This code is partially derived from the public domain ANLTR TokenStream
*/
public class TokenStreamCopyingHiddenTokenFilter
extends TokenStreamHiddenTokenFilter
implements TokenStream {
protected BitSet copyMask;
CommonHiddenStreamToken hiddenCopy = null;
public TokenStreamCopyingHiddenTokenFilter(TokenStream input) {
super(input);
copyMask = new BitSet();
}
/**
* Indicate that all tokens of type tokenType should be copied. The copy
* is put in the stream of hidden tokens, and the original is returned in the
* stream of normal tokens.
*
* @param tokenType integer representing the token type to copied
*/
public void copy(int tokenType) {
copyMask.add(tokenType);
}
/**
* Create a clone of the important parts of the given token. Note that this
* does NOT copy the hiddenBefore and hiddenAfter fields.
*
* @param t token to partially clone
* @return newly created partial clone
*/
public CommonHiddenStreamToken partialCloneToken(CommonHiddenStreamToken t) {
CommonHiddenStreamToken u = new CommonHiddenStreamToken(t.getType(),
t.getText());
u.setColumn(t.getColumn());
u.setLine(t.getLine());
u.setFilename(t.getFilename());
return u;
}
public void linkAndCopyToken(CommonHiddenStreamToken prev,
CommonHiddenStreamToken monitored) {
// create a copy of the token in the lookahead for use as hidden token
hiddenCopy = partialCloneToken(LA(1));
// attach copy to the previous token, whether hidden or monitored
prev.setHiddenAfter(hiddenCopy);
// if previous token was hidden, set the hiddenBefore pointer of the
// copy to point back to it
if (prev != monitored) {
hiddenCopy.setHiddenBefore(prev);
}
// we don't want the non-hidden copy to link back to the hidden
// copy on the next pass through this function, so we leave
// lastHiddenToken alone
//System.err.println("hidden copy: " + hiddenCopy.toString());
return;
}
private void consumeFirst() throws TokenStreamException {
consume(); // get first token of input stream
// Handle situation where hidden or discarded tokens
// appear first in input stream
CommonHiddenStreamToken p=null;
// while hidden, copied, or discarded scarf tokens
while ( hideMask.member(LA(1).getType()) ||
discardMask.member(LA(1).getType()) ||
copyMask.member(LA(1).getType()) ) {
// if we've hit one of the tokens that needs to be copied, we copy it
// and then break out of the loop, because the parser needs to see it
// too
//
if (copyMask.member(LA(1).getType())) {
// copy the token in the lookahead
hiddenCopy = partialCloneToken(LA(1));
// if there's an existing token before this, link that and the
// copy together
if (p != null) {
p.setHiddenAfter(hiddenCopy);
hiddenCopy.setHiddenBefore(p); // double-link
}
lastHiddenToken = hiddenCopy;
if (firstHidden == null) {
firstHidden = hiddenCopy;
}
// we don't want to consume this token, because it also needs to
// be passed through to the parser, so break out of the while look
// entirely
//
break;
} else if (hideMask.member(LA(1).getType())) {
if (p != null) {
p.setHiddenAfter(LA(1));
LA(1).setHiddenBefore(p); // double-link
}
p = LA(1);
lastHiddenToken = p;
if (firstHidden == null) {
firstHidden = p; // record hidden token if first
}
}
consume();
}
}
/** Return the next monitored token.
* Test the token following the monitored token.
* If following is another monitored token, save it
* for the next invocation of nextToken (like a single
* lookahead token) and return it then.
* If following is unmonitored, nondiscarded (hidden)
* channel token, add it to the monitored token.
*
* Note: EOF must be a monitored Token.
*/
public Token nextToken() throws TokenStreamException {
// handle an initial condition; don't want to get lookahead
// token of this splitter until first call to nextToken
if (LA(1) == null) {
consumeFirst();
}
//System.err.println();
// we always consume hidden tokens after monitored, thus,
// upon entry LA(1) is a monitored token.
CommonHiddenStreamToken monitored = LA(1);
// point to hidden tokens found during last invocation
monitored.setHiddenBefore(lastHiddenToken);
lastHiddenToken = null;
// Look for hidden tokens, hook them into list emanating
// from the monitored tokens.
consume();
CommonHiddenStreamToken prev = monitored;
// deal with as many not-purely-monitored tokens as possible
while ( hideMask.member(LA(1).getType()) ||
discardMask.member(LA(1).getType()) ||
copyMask.member(LA(1).getType()) ) {
if (copyMask.member(LA(1).getType())) {
// copy the token and link it backwards
if (hiddenCopy != null) {
linkAndCopyToken(hiddenCopy, monitored);
} else {
linkAndCopyToken(prev, monitored);
}
// we now need to parse it as a monitored token, so we return, which
// avoids the consume() call at the end of this loop. the next call
// will parse it as a monitored token.
//System.err.println("returned: " + monitored.toString());
return monitored;
} else if (hideMask.member(LA(1).getType())) {
// attach the hidden token to the monitored in a chain
// link forwards
prev.setHiddenAfter(LA(1));
// link backwards
if (prev != monitored) { //hidden cannot point to monitored tokens
LA(1).setHiddenBefore(prev);
} else if (hiddenCopy != null) {
hiddenCopy.setHiddenAfter(LA(1));
LA(1).setHiddenBefore(hiddenCopy);
hiddenCopy = null;
}
//System.err.println("hidden: " + prev.getHiddenAfter().toString() + "\" after: " + prev.toString());
prev = lastHiddenToken = LA(1);
}
consume();
}
// remember the last hidden token for next time around
if (hiddenCopy != null) {
lastHiddenToken = hiddenCopy;
hiddenCopy = null;
}
//System.err.println("returned: " + monitored.toString());
return monitored;
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,326 +0,0 @@
package antlr;
/** Java 1.3 AST Recognizer Grammar
*
* Author: (see java.g preamble)
*
* This grammar is in the PUBLIC DOMAIN
*/
class JavaTreeParser extends TreeParser;
options {
importVocab = Java;
}
compilationUnit
: (packageDefinition)?
(importDefinition)*
(typeDefinition)*
;
packageDefinition
: #( PACKAGE_DEF identifier )
;
importDefinition
: #( IMPORT identifierStar )
;
typeDefinition
: #(CLASS_DEF modifiers IDENT extendsClause implementsClause objBlock )
| #(INTERFACE_DEF modifiers IDENT extendsClause interfaceBlock )
;
typeSpec
: #(TYPE typeSpecArray)
;
typeSpecArray
: #( ARRAY_DECLARATOR typeSpecArray )
| type
;
type: identifier
| builtInType
;
builtInType
: "void"
| "boolean"
| "byte"
| "char"
| "short"
| "int"
| "float"
| "long"
| "double"
;
modifiers
: #( MODIFIERS (modifier)* )
;
modifier
: "private"
| "public"
| "protected"
| "static"
| "transient"
| "final"
| "abstract"
| "native"
| "threadsafe"
| "synchronized"
| "const"
| "volatile"
| "strictfp"
;
extendsClause
: #(EXTENDS_CLAUSE (identifier)* )
;
implementsClause
: #(IMPLEMENTS_CLAUSE (identifier)* )
;
interfaceBlock
: #( OBJBLOCK
( methodDecl
| variableDef
)*
)
;
objBlock
: #( OBJBLOCK
( ctorDef
| methodDef
| variableDef
| typeDefinition
| #(STATIC_INIT slist)
| #(INSTANCE_INIT slist)
)*
)
;
ctorDef
: #(CTOR_DEF modifiers methodHead (slist)?)
;
methodDecl
: #(METHOD_DEF modifiers typeSpec methodHead)
;
methodDef
: #(METHOD_DEF modifiers typeSpec methodHead (slist)?)
;
variableDef
: #(VARIABLE_DEF modifiers typeSpec variableDeclarator varInitializer)
;
parameterDef
: #(PARAMETER_DEF modifiers typeSpec IDENT )
;
objectinitializer
: #(INSTANCE_INIT slist)
;
variableDeclarator
: IDENT
| LBRACK variableDeclarator
;
varInitializer
: #(ASSIGN initializer)
|
;
initializer
: expression
| arrayInitializer
;
arrayInitializer
: #(ARRAY_INIT (initializer)*)
;
methodHead
: IDENT #( PARAMETERS (parameterDef)* ) (throwsClause)?
;
throwsClause
: #( "throws" (identifier)* )
;
identifier
: IDENT
| #( DOT identifier IDENT )
;
identifierStar
: IDENT
| #( DOT identifier (STAR|IDENT) )
;
slist
: #( SLIST (stat)* )
;
stat: typeDefinition
| variableDef
| expression
| #(LABELED_STAT IDENT stat)
| #("if" expression stat (stat)? )
| #( "for"
#(FOR_INIT (variableDef | elist)?)
#(FOR_CONDITION (expression)?)
#(FOR_ITERATOR (elist)?)
stat
)
| #("while" expression stat)
| #("do" stat expression)
| #("break" (IDENT)? )
| #("continue" (IDENT)? )
| #("return" (expression)? )
| #("switch" expression (caseGroup)*)
| #("throw" expression)
| #("synchronized" expression stat)
| tryBlock
| slist // nested SLIST
// uncomment to make assert JDK 1.4 stuff work
| #("assert" expression (expression)?)
| EMPTY_STAT
;
caseGroup
: #(CASE_GROUP (#("case" expression) | "default")+ slist)
;
tryBlock
: #( "try" slist (handler)* (#("finally" slist))? )
;
handler
: #( "catch" parameterDef slist )
;
elist
: #( ELIST (expression)* )
;
expression
: #(EXPR expr)
;
expr: #(QUESTION expr expr expr) // trinary operator
| #(ASSIGN expr expr) // binary operators...
| #(PLUS_ASSIGN expr expr)
| #(MINUS_ASSIGN expr expr)
| #(STAR_ASSIGN expr expr)
| #(DIV_ASSIGN expr expr)
| #(MOD_ASSIGN expr expr)
| #(SR_ASSIGN expr expr)
| #(BSR_ASSIGN expr expr)
| #(SL_ASSIGN expr expr)
| #(BAND_ASSIGN expr expr)
| #(BXOR_ASSIGN expr expr)
| #(BOR_ASSIGN expr expr)
| #(LOR expr expr)
| #(LAND expr expr)
| #(BOR expr expr)
| #(BXOR expr expr)
| #(BAND expr expr)
| #(NOT_EQUAL expr expr)
| #(EQUAL expr expr)
| #(LT expr expr)
| #(GT expr expr)
| #(LE expr expr)
| #(GE expr expr)
| #(SL expr expr)
| #(SR expr expr)
| #(BSR expr expr)
| #(PLUS expr expr)
| #(MINUS expr expr)
| #(DIV expr expr)
| #(MOD expr expr)
| #(STAR expr expr)
| #(INC expr)
| #(DEC expr)
| #(POST_INC expr)
| #(POST_DEC expr)
| #(BNOT expr)
| #(LNOT expr)
| #("instanceof" expr expr)
| #(UNARY_MINUS expr)
| #(UNARY_PLUS expr)
| primaryExpression
;
primaryExpression
: IDENT
| #( DOT
( expr
( IDENT
| arrayIndex
| "this"
| "class"
| #( "new" IDENT elist )
| "super"
)
| #(ARRAY_DECLARATOR typeSpecArray)
| builtInType ("class")?
)
)
| arrayIndex
| #(METHOD_CALL primaryExpression elist)
| ctorCall
| #(TYPECAST typeSpec expr)
| newExpression
| constant
| "super"
| "true"
| "false"
| "this"
| "null"
| typeSpec // type name used with instanceof
;
ctorCall
: #( CTOR_CALL elist )
| #( SUPER_CTOR_CALL
( elist
| primaryExpression elist
)
)
;
arrayIndex
: #(INDEX_OP expr expression)
;
constant
: NUM_INT
| CHAR_LITERAL
| STRING_LITERAL
| NUM_FLOAT
| NUM_DOUBLE
| NUM_LONG
;
newExpression
: #( "new" type
( newArrayDeclarator (arrayInitializer)?
| elist (objBlock)?
)
)
;
newArrayDeclarator
: #( ARRAY_DECLARATOR (newArrayDeclarator)? (expression)? )
;

445
build/build.xml Normal file
View File

@ -0,0 +1,445 @@
<?xml version="1.0"?>
<project name="Arduino" default="build">
<!-- Sets properties for macosx/windows/linux depending on current system -->
<condition property="macosx"><os family="mac" /></condition>
<condition property="windows"><os family="windows" /></condition>
<condition property="linux"><os family="unix" /></condition>
<condition property="platform"
value="macosx"><os family="mac" /></condition>
<condition property="platform"
value="windows"><os family="windows" /></condition>
<condition property="platform"
value="linux"><os family="unix" /></condition>
<!-- Libraries required for running arduino -->
<fileset dir=".." id="runtime.jars">
<include name="core/core.jar" />
<include name="app/pde.jar" />
<include name="app/lib/ecj.jar" />
<include name="app/lib/jna.jar" />
<include name="app/lib/oro.jar" />
<include name="app/lib/RXTXcomm.jar" />
<include name="app/lib/ant.jar" />
<include name="app/lib/ant-launcher.jar" />
</fileset>
<target name="build" description="Build Arduino.">
<antcall target="${platform}-build" />
</target>
<target name="run" description="Run Arduino.">
<antcall target="${platform}-run" />
</target>
<target name="dist" depends="revision-check"
description="Build Arduino for distribution.">
<input message="Enter version number:"
addproperty="version"
defaultvalue="${revision}" />
<antcall target="${platform}-dist" />
</target>
<!-- "§$§$&, ant doesn't have a built-in help target :( -->
<target name="help" description="Show project help">
<java classname="org.apache.tools.ant.Main">
<arg value="-p" />
</java>
</target>
<!-- - - - - - - - - - - - - - - - - - -->
<!-- Subprojects: Core, App, Libraries -->
<!-- - - - - - - - - - - - - - - - - - -->
<target name="subprojects-clean">
<subant buildpath="../core" target="clean"/>
<subant buildpath="../app" target="clean"/>
</target>
<target name="subprojects-build">
<subant buildpath="../core" target="build"/>
<subant buildpath="../app" target="build"/>
</target>
<!-- - - - - - - - - -->
<!-- Basic Assembly -->
<!-- - - - - - - - - -->
<target name="assemble">
<fail unless="target.path"
message="Do not call assemble from the command line." />
<!-- copy shared tools folder -->
<copy todir="${target.path}/tools">
<fileset dir="shared/tools" />
</copy>
<!-- copy library folder -->
<copy todir="${target.path}/libraries">
<fileset dir="../libraries" />
</copy>
<!-- copy hardware folder -->
<copy todir="${target.path}/hardware">
<fileset dir="../hardware" />
</copy>
<!-- copy shared examples folder -->
<copy todir="${target.path}/examples">
<fileset dir="shared/examples" />
</copy>
<!-- Unzip documentation -->
<unzip dest="${target.path}" src="shared/reference.zip" overwrite="false"/>
<!-- Write the revision file! -->
<echo file="${target.path}/lib/version.txt" message="${version}" />
</target>
<!-- - - - - - - - - -->
<!-- Revision check -->
<!-- - - - - - - - - -->
<target name="revision-check">
<!-- figure out the revision number -->
<loadfile srcfile="../todo.txt" property="revision">
<filterchain>
<headfilter lines="1"/>
<tokenfilter>
<stringtokenizer suppressdelims="true"/>
<!-- grab the thing from the first line that's 4 digits -->
<containsregex pattern="(\d\d\d\d)" />
</tokenfilter>
</filterchain>
</loadfile>
<!-- <echo message="revision is ${revision}." /> -->
<!-- figure out the revision number in base.java -->
<loadfile srcfile="../app/src/processing/app/Base.java"
property="revision.base">
<filterchain>
<tokenfilter>
<linetokenizer />
<containsregex pattern="String VERSION_NAME = "/>
<replaceregex pattern="[^0-9]*" flags="g" replace=""/>
</tokenfilter>
</filterchain>
</loadfile>
<!-- <echo message="base revision is ${revision.base}." /> -->
<condition property="revision.correct">
<!-- Using contains because I can't figure out how to get rid of the
LF in revision.base. Please file a bug if you have a fix. -->
<contains string="${revision.base}" substring="${revision}"/>
</condition>
<!-- the revision.base property won't be set
if $revision wasn't found... -->
<fail unless="revision.correct"
message="Fix revision number in Base.java" />
</target>
<!-- - - - - - - - -->
<!-- Mac OS X -->
<!-- - - - - - - - -->
<target name="macosx-clean" depends="subprojects-clean" description="Clean Mac OS X build">
<delete dir="macosx/work" />
<delete dir="macosx/working_dir" />
<delete dir="macosx/working.dmg" />
<delete file="macosx/arduino-*.dmg" />
</target>
<target name="macosx-checkos" unless="macosx">
<echo>
=======================================================
Arduino for Mac OS X can only be built on Mac OS X.
Bye.
=======================================================
</echo>
<fail message="wrong platform (${os.name})" />
</target>
<target name="macosx-build" if="macosx" depends="revision-check, macosx-checkos, subprojects-build" description="Build Mac OS X version">
<mkdir dir="macosx/work" />
<!-- assemble the pde -->
<copy todir="macosx/work">
<fileset dir="macosx/" includes="template.app/**"/>
</copy>
<!-- <rename src="macosx/work/template.app"
dest="macosx/work/Arduino.app" />-->
<move file="macosx/work/template.app"
tofile="macosx/work/Arduino.app" />
<chmod file="macosx/work/Arduino.app/Contents/MacOS/JavaApplicationStub" perm="755" />
<copy todir="macosx/work/Arduino.app/Contents/Resources/Java" flatten="true">
<fileset refid="runtime.jars"/>
</copy>
<copy todir="macosx/work/Arduino.app/Contents/Resources/Java">
<fileset dir="shared" includes="lib/**" />
<fileset file="shared/revisions.txt" />
</copy>
<!-- Unzip AVR tools -->
<!-- <unzip dest="macosx/work/Arduino.app/Contents/Resources/Java/hardware" src="macosx/dist/tools-universal.zip" overwrite="false"/> -->
<exec executable="unzip">
<arg value="-q" />
<arg value="-d" />
<arg value="macosx/work/Arduino.app/Contents/Resources/Java/hardware" />
<arg value="macosx/dist/tools-universal.zip" />
</exec>
<antcall target="assemble">
<param name="target.path" value="macosx/work/Arduino.app/Contents/Resources/Java" />
</antcall>
</target>
<target name="macosx-run" depends="macosx-build" description="Run Mac OS X version">
<exec executable="macosx/work/Arduino.app/Contents/MacOS/JavaApplicationStub" spawn="true"/>
</target>
<target name="macosx-dist" if="macosx" depends="macosx-build" description="Create a .dmg of the Mac OS X version">
<!-- now build the dmg -->
<gunzip src="macosx/template.dmg.gz" dest="macosx/working.dmg" />
<mkdir dir="macosx/working_dir" />
<exec executable="hdiutil">
<arg line="attach macosx/working.dmg -noautoopen -mountpoint macosx/working_dir" />
<!--<arg line="attach macosx/working.dmg -noautoopen -quiet -mountpoint macosx/working_dir" />-->
</exec>
<copy todir="macosx/working_dir">
<fileset dir="macosx/work" />
</copy>
<!-- The ant copy command does not preserve permissions. -->
<chmod file="macosx/working_dir/Arduino.app/Contents/MacOS/JavaApplicationStub" perm="+x" />
<!-- Pause briefly for the OS to catch up with the DMG changes.
This prevents "hdiutil: couldn't eject "disk3" - Resource busy"
errors when ejecting the disk in the next step.
You may need to set this value higher for your system. -->
<sleep seconds="3" />
<exec executable="hdiutil">
<!--<arg line="detach macosx/working_dir -quiet -force" />-->
<arg line="detach macosx/working_dir" />
</exec>
<delete file="macosx/arduino-*.dmg" />
<exec executable="hdiutil">
<arg line="convert macosx/working.dmg -quiet -format UDZO -imagekey zlib-level=9 -o macosx/arduino-${version}.dmg" />
</exec>
<!-- Clean up the interim files. -->
<delete file="macosx/working.dmg" />
<delete dir="macosx/working_dir" />
<echo>
=======================================================
Arduino for Mac OS X was built. Grab the image from
macosx/arduino-${version}.dmg
=======================================================
</echo>
</target>
<!-- - - - - - - - -->
<!-- Linux -->
<!-- - - - - - - - -->
<target name="linux-clean" depends="subprojects-clean" description="Clean linux version">
<delete dir="linux/work" />
</target>
<target name="linux-checkos" unless="linux">
<echo>
=======================================================
Arduino for Linux can only be built on on unix systems.
Bye.
=======================================================
</echo>
<fail message="wrong platform (${os.name})" />
</target>
<target name="linux-build" depends="revision-check, linux-checkos, subprojects-build" description="Build linux version">
<mkdir dir="linux/work" />
<copy todir="linux/work">
<fileset dir="shared" includes="lib/**" />
<fileset file="shared/revisions.txt" />
</copy>
<copy todir="linux/work/lib" flatten="true">
<fileset refid="runtime.jars" />
</copy>
<antcall target="assemble">
<param name="target.path" value="linux/work" />
</antcall>
<copy todir="linux/work" file="linux/arduino" />
<chmod perm="755" file="linux/work/arduino" />
</target>
<target name="linux-run" depends="linux-build"
description="Run Linux version">
<exec executable="./arduino" dir="linux/work" spawn="true"/>
</target>
<target name="linux-dist" depends="linux-build"
description="Build .tar.gz of linux version">
<get src="http://dev.processing.org/build/jre-tools-6u18-linux-i586.tgz"
dest="linux/jre.tgz"
usetimestamp="true" />
<untar compression="gzip"
dest="linux/work"
src="linux/jre.tgz"
overwrite="false"/>
<!--
<tar compression="gzip" basedir="linux/work"
destfile="linux/arduino-${version}.tgz" />
-->
<tar compression="gzip" destfile="linux/arduino-${version}.tgz">
<tarfileset dir="linux/work" prefix="arduino-${version}" />
</tar>
<echo>
=======================================================
Arduino for Linux was built. Grab the archive from
build/linux/arduino-${version}.tgz
=======================================================
</echo>
</target>
<!-- - - - - - - - -->
<!-- Windows -->
<!-- - - - - - - - -->
<target name="windows-clean" depends="subprojects-clean"
description="Clean windows version">
<delete dir="windows/work" />
</target>
<target name="windows-checkos" unless="windows">
<echo>
=======================================================
Processing for Windows can only be built on windows.
Bye.
=======================================================
</echo>
<fail message="wrong platform (${os.name})" />
</target>
<target name="windows-build"
depends="revision-check, windows-checkos, subprojects-build"
description="Build windows version">
<mkdir dir="windows/work" />
<!-- assemble the pde -->
<mkdir dir="windows/work/lib" />
<copy todir="windows/work/lib" flatten="true">
<fileset refid="runtime.jars" />
</copy>
<copy todir="windows/work">
<fileset dir="shared" includes="lib/**" />
<fileset file="shared/revisions.txt" />
</copy>
<antcall target="assemble">
<param name="target.path" value="windows/work" />
</antcall>
<property name="launch4j.dir" value="windows/launcher/launch4j/" />
<taskdef name="launch4j"
classname="net.sf.launch4j.ant.Launch4jTask"
classpath="${launch4j.dir}/launch4j.jar; ${launch4j.dir}/lib/xstream.jar" />
<copy todir="windows/work">
<fileset dir="windows/launcher"
includes="about.bmp, application.ico, config.xml"/>
</copy>
<launch4j configFile="windows/work/config.xml" />
<delete dir="windows/work"
includes="about.bmp, application.ico, config.xml" />
<!-- cygwin requires html, dll, and exe to have the +x flag -->
<chmod perm="755">
<fileset dir="windows/work" includes="**/*.html, **/*.dll, **/*.exe" />
</chmod>
</target>
<target name="windows-run" depends="windows-build"
description="Run windows version">
<exec executable="windows/work/processing.exe"
dir="windows/work" spawn="true"/>
</target>
<target name="windows-dist" depends="windows-build"
description="Create .zip files of windows version">
<get src="http://dev.processing.org/build/jre-tools-6u18-windows-i586.zip"
dest="windows/jre.zip"
usetimestamp="true" />
<unzip dest="windows/work" src="windows/jre.zip" overwrite="false"/>
<!--
<zip basedir="windows/work"
prefix="processing-${version}"
destfile="windows/processing-${version}.zip" />
<zip basedir="windows/work"
prefix="processing-${version}"
destfile="windows/processing-${version}-expert.zip"
excludes="java/**" />
-->
<zip destfile="windows/processing-${version}.zip">
<zipfileset dir="windows/work"
prefix="processing-${version}" />
</zip>
<zip destfile="windows/processing-${version}-expert.zip">
<zipfileset dir="windows/work"
prefix="processing-${version}"
excludes="java/**" />
</zip>
<echo>
=======================================================
Processing for Windows was built. Grab the archive from
windows/processing-${version}.zip
windows/processing-${version}-expert.zip
=======================================================
</echo>
</target>
<!-- - - - - - - - -->
<!-- Run It! -->
<!-- - - - - - - - -->
<target name="clean" description="Perform a spring cleaning"
depends="linux-clean, windows-clean, macosx-clean, subprojects-clean">
</target>
</project>

View File

@ -0,0 +1,103 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
<plist version="0.9">
<dict>
<key>CFBundleName</key>
<string>Arduino</string>
<key>CFBundleAllowMixedLocalizations</key>
<string>true</string>
<key>CFBundleExecutable</key>
<string>JavaApplicationStub</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
<string>Pde1</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleIconFile</key>
<string>processing.icns</string>
<key>CFBundleIdentifier</key>
<string>cc.arduino.Arduino</string>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>pde</string>
<string>java</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>pde.icns</string>
<key>CFBundleTypeName</key>
<string>Processing Source File</string>
<key>CFBundleTypeMIMETypes</key>
<array>
<string>text/plain</string>
</array>
<key>CFBundleTypeOSTypes</key>
<array>
<string>TEXT</string>
</array>
<key>CFBundleTypeRole</key>
<string>Editor</string>
</dict>
</array>
<key>Java</key>
<dict>
<key>VMOptions</key>
<array>
<string>-Xms128M</string>
<string>-Xmx256M</string>
</array>
<key>MainClass</key>
<string>processing.app.Base</string>
<key>JVMVersion</key>
<string>1.5*</string>
<key>ClassPath</key>
<!-- 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/core.jar:$JAVAROOT/antlr.jar:$JAVAROOT/ecj.jar:$JAVAROOT/registry.jar:$JAVAROOT/quaqua.jar:$JAVAROOT/oro.jar:$JAVAROOT/RXTXcomm.jar</string>
<key>JVMArchs</key>
<array>
<!--<string>x86_64</string>--> <!-- currently no 64 bit support -->
<string>i386</string>
<string>ppc</string>
</array>
<!-- More properties can be found in http://developer.apple.com/releasenotes/Java/java141/system_properties/chapter_4_section_1.html#//apple_ref/doc/uid/TP30000285 -->
<key>Properties</key>
<dict>
<!-- Pass the full path of Contents/Resources/Java to the PDE -->
<key>javaroot</key>
<string>$JAVAROOT</string>
<!-- as of 1.0.8, it's safe to use this option again -->
<key>apple.laf.useScreenMenuBar</key>
<string>true</string>
<key>apple.awt.showGrowBox</key>
<string>false</string>
<key>com.apple.smallTabs</key>
<string>true</string>
<key>apple.awt.Antialiasing</key>
<string>false</string>
<key>apple.awt.TextAntialiasing</key>
<string>true</string>
<key>com.apple.hwaccel</key>
<string>true</string>
<key>apple.awt.use-file-dialog-packages</key>
<string>false</string>
<key>apple.awt.graphics.UseQuartz</key>
<string>true</string>
</dict>
</dict>
</dict>
</plist>

Binary file not shown.

View File

@ -0,0 +1 @@
APPLPde1

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff