2010-05-08 23:47:19 +02:00
|
|
|
<?xml version="1.0"?>
|
|
|
|
<project name="Arduino" default="build">
|
2011-02-17 02:21:43 +01:00
|
|
|
<!--echo message="os.name = ${os.name}" /-->
|
|
|
|
<!--echo message="os.arch = ${os.arch}" /-->
|
|
|
|
<!--echo message="os.version = ${os.version}" /-->
|
2013-01-23 11:44:37 +01:00
|
|
|
|
2015-05-11 10:48:52 +02:00
|
|
|
<tstamp>
|
|
|
|
<format property="BUILD_DATE" pattern="yyyy/MM/dd hh:mm"/>
|
|
|
|
</tstamp>
|
|
|
|
|
2010-05-08 23:47:19 +02:00
|
|
|
<!-- Sets properties for macosx/windows/linux depending on current system -->
|
2015-03-25 11:08:05 +01:00
|
|
|
<condition property="platform" value="macosx-old">
|
2015-01-30 16:42:04 +01:00
|
|
|
<and>
|
|
|
|
<os family="mac" />
|
|
|
|
<matches string="${os.version}" pattern="^10.[56]." />
|
|
|
|
</and>
|
|
|
|
</condition>
|
2015-03-25 11:08:05 +01:00
|
|
|
<condition property="platform" value="macosx"><os family="mac" /></condition>
|
2013-07-28 14:14:04 +02:00
|
|
|
<condition property="platform" value="windows"><os family="windows" /></condition>
|
|
|
|
<condition property="platform" value="linux32"><os family="unix" arch="i386" /></condition>
|
|
|
|
<condition property="platform" value="linux64"><os family="unix" arch="amd64" /></condition>
|
2010-05-08 23:47:19 +02:00
|
|
|
|
2015-03-25 11:08:05 +01:00
|
|
|
<condition property="macosx"><equals arg1="${platform}" arg2="macosx-old" /></condition>
|
2013-08-08 14:52:49 +02:00
|
|
|
<condition property="macosx"><equals arg1="${platform}" arg2="macosx" /></condition>
|
|
|
|
<condition property="windows"><equals arg1="${platform}" arg2="windows" /></condition>
|
|
|
|
<condition property="linux32"><equals arg1="${platform}" arg2="linux32" /></condition>
|
|
|
|
<condition property="linux64"><equals arg1="${platform}" arg2="linux64" /></condition>
|
|
|
|
<condition property="linux"><equals arg1="${platform}" arg2="linux32" /></condition>
|
|
|
|
<condition property="linux"><equals arg1="${platform}" arg2="linux64" /></condition>
|
|
|
|
|
|
|
|
<condition property="staging_folder" value="macosx"><equals arg1="${platform}" arg2="macosx" /></condition>
|
2015-03-25 11:08:05 +01:00
|
|
|
<condition property="staging_folder" value="macosx"><equals arg1="${platform}" arg2="macosx-old" /></condition>
|
2013-08-08 14:52:49 +02:00
|
|
|
<condition property="staging_folder" value="windows"><equals arg1="${platform}" arg2="windows" /></condition>
|
|
|
|
<condition property="staging_folder" value="linux"><equals arg1="${platform}" arg2="linux32" /></condition>
|
|
|
|
<condition property="staging_folder" value="linux"><equals arg1="${platform}" arg2="linux64" /></condition>
|
|
|
|
|
2015-03-25 11:08:05 +01:00
|
|
|
<condition property="staging_hardware_folder" value="Arduino.app/Contents/Java/hardware"><equals arg1="${platform}" arg2="macosx" /></condition>
|
|
|
|
<condition property="staging_hardware_folder" value="Arduino.app/Contents/Resources/Java/hardware"><equals arg1="${platform}" arg2="macosx-old" /></condition>
|
2013-08-08 14:52:49 +02:00
|
|
|
<condition property="staging_hardware_folder" value="hardware"><equals arg1="${platform}" arg2="windows" /></condition>
|
|
|
|
<condition property="staging_hardware_folder" value="hardware"><equals arg1="${platform}" arg2="linux32" /></condition>
|
|
|
|
<condition property="staging_hardware_folder" value="hardware"><equals arg1="${platform}" arg2="linux64" /></condition>
|
2010-05-08 23:47:19 +02:00
|
|
|
|
2013-07-29 10:57:28 +02:00
|
|
|
<condition property="arch-bits" value="32">
|
|
|
|
<equals arg1="${platform}" arg2="linux32"/>
|
|
|
|
</condition>
|
|
|
|
<condition property="arch-bits" value="64">
|
|
|
|
<equals arg1="${platform}" arg2="linux64"/>
|
|
|
|
</condition>
|
2010-05-08 23:47:19 +02:00
|
|
|
|
2014-03-04 13:12:50 +01:00
|
|
|
<condition property="launch4j-download-unpack-target-name" value="launch4j-windows"><os family="windows" /></condition>
|
|
|
|
<property name="launch4j-download-unpack-target-name" value="launch4j-linux"/>
|
|
|
|
|
2015-03-30 13:22:43 +02:00
|
|
|
<property name="MACOSX_BUNDLED_JVM" value="${java.home}/../"/>
|
2015-04-13 16:28:17 +02:00
|
|
|
<property name="WINDOWS_BUNDLED_JVM" value="${java.home}"/>
|
2015-03-30 13:22:43 +02:00
|
|
|
|
2010-05-08 23:47:19 +02:00
|
|
|
<!-- Libraries required for running arduino -->
|
|
|
|
<fileset dir=".." id="runtime.jars">
|
2014-09-24 11:35:30 +02:00
|
|
|
<include name="arduino-core/arduino-core.jar" />
|
2010-05-08 23:47:19 +02:00
|
|
|
<include name="app/pde.jar" />
|
2014-10-16 23:00:52 +02:00
|
|
|
<include name="app/lib/*.jar" />
|
2015-03-13 12:31:01 +01:00
|
|
|
<include name="arduino-core/lib/*.jar" />
|
2010-05-08 23:47:19 +02:00
|
|
|
</fileset>
|
|
|
|
|
|
|
|
<target name="build" description="Build Arduino.">
|
|
|
|
<antcall target="${platform}-build" />
|
2015-05-11 10:48:52 +02:00
|
|
|
|
|
|
|
<antcall target="generate-hourly-build-txt"/>
|
2010-05-08 23:47:19 +02:00
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="run" description="Run Arduino.">
|
|
|
|
<antcall target="${platform}-run" />
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="dist" depends="revision-check"
|
|
|
|
description="Build Arduino for distribution.">
|
2013-01-23 11:44:37 +01:00
|
|
|
<input message="Enter version number:"
|
2010-05-08 23:47:19 +02:00
|
|
|
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>
|
2013-01-23 11:44:37 +01:00
|
|
|
|
2013-02-19 15:07:16 +01:00
|
|
|
<target name="test" depends="subprojects-test"/>
|
|
|
|
|
2010-05-08 23:47:19 +02:00
|
|
|
<!-- - - - - - - - - - - - - - - - - - -->
|
|
|
|
<!-- Subprojects: Core, App, Libraries -->
|
|
|
|
<!-- - - - - - - - - - - - - - - - - - -->
|
2013-01-23 11:44:37 +01:00
|
|
|
|
2010-05-08 23:47:19 +02:00
|
|
|
<target name="subprojects-clean">
|
2014-09-24 11:35:30 +02:00
|
|
|
<subant buildpath="../arduino-core" target="clean"/>
|
2010-05-08 23:47:19 +02:00
|
|
|
<subant buildpath="../app" target="clean"/>
|
|
|
|
</target>
|
2013-01-23 11:44:37 +01:00
|
|
|
|
2010-05-08 23:47:19 +02:00
|
|
|
<target name="subprojects-build">
|
2014-09-24 11:35:30 +02:00
|
|
|
<subant buildpath="../arduino-core" target="build"/>
|
2010-05-08 23:47:19 +02:00
|
|
|
<subant buildpath="../app" target="build"/>
|
|
|
|
</target>
|
2013-01-23 11:44:37 +01:00
|
|
|
|
2013-02-19 15:07:16 +01:00
|
|
|
<target name="subprojects-test">
|
|
|
|
<subant buildpath="../app" target="test"/>
|
|
|
|
</target>
|
2010-05-08 23:47:19 +02:00
|
|
|
|
|
|
|
<!-- - - - - - - - - -->
|
|
|
|
<!-- Basic Assembly -->
|
|
|
|
<!-- - - - - - - - - -->
|
2013-01-23 11:44:37 +01:00
|
|
|
|
2010-05-08 23:47:19 +02:00
|
|
|
<target name="assemble">
|
2015-03-05 17:42:26 +01:00
|
|
|
<fail unless="target.path" message="Do not call assemble from the command line." />
|
2013-01-23 11:44:37 +01:00
|
|
|
|
2010-05-08 23:47:19 +02:00
|
|
|
<!-- copy shared tools folder -->
|
|
|
|
<copy todir="${target.path}/tools">
|
|
|
|
<fileset dir="shared/tools" />
|
|
|
|
</copy>
|
2013-01-23 11:44:37 +01:00
|
|
|
|
2015-03-05 17:42:26 +01:00
|
|
|
<antcall target="assemble-hardware" />
|
|
|
|
|
2015-03-30 16:18:08 +02:00
|
|
|
<copy file="../hardware/platform.keys.rewrite.txt" todir="${staging_folder}/work/${staging_hardware_folder}"/>
|
|
|
|
|
2010-05-08 23:47:19 +02:00
|
|
|
<!-- copy shared examples folder -->
|
|
|
|
<copy todir="${target.path}/examples">
|
|
|
|
<fileset dir="shared/examples" />
|
|
|
|
</copy>
|
2013-01-23 11:44:37 +01:00
|
|
|
|
2010-05-08 23:47:19 +02:00
|
|
|
<!-- Unzip documentation -->
|
2015-02-08 18:00:47 +01:00
|
|
|
<antcall target="unzip">
|
|
|
|
<param name="archive_file" value="shared/reference-1.6.0.zip" />
|
2015-04-09 12:12:10 +02:00
|
|
|
<param name="archive_url" value="http://downloads.arduino.cc/reference-1.6.0.zip" />
|
2015-02-08 18:00:47 +01:00
|
|
|
<param name="final_folder" value="${target.path}/reference" />
|
|
|
|
<param name="dest_folder" value="${target.path}" />
|
|
|
|
</antcall>
|
2015-03-24 23:25:42 +01:00
|
|
|
<antcall target="unzip">
|
|
|
|
<param name="archive_file" value="shared/Galileo_help_files-1.6.2.zip" />
|
2015-04-09 12:12:10 +02:00
|
|
|
<param name="archive_url" value="http://downloads.arduino.cc/Galileo_help_files-1.6.2.zip" />
|
2015-03-24 23:25:42 +01:00
|
|
|
<param name="final_folder" value="${target.path}/reference/Galileo_help_files" />
|
|
|
|
<param name="dest_folder" value="${target.path}/reference/" />
|
|
|
|
</antcall>
|
|
|
|
<antcall target="unzip">
|
|
|
|
<param name="archive_file" value="shared/Edison_help_files-1.6.2.zip" />
|
2015-04-09 12:12:10 +02:00
|
|
|
<param name="archive_url" value="http://downloads.arduino.cc/Edison_help_files-1.6.2.zip" />
|
2015-03-24 23:25:42 +01:00
|
|
|
<param name="final_folder" value="${target.path}/reference/Edison_help_files" />
|
|
|
|
<param name="dest_folder" value="${target.path}/reference/" />
|
|
|
|
</antcall>
|
2013-01-23 11:44:37 +01:00
|
|
|
|
2010-05-08 23:47:19 +02:00
|
|
|
<!-- Write the revision file! -->
|
|
|
|
<echo file="${target.path}/lib/version.txt" message="${version}" />
|
2014-05-16 01:07:45 +02:00
|
|
|
|
|
|
|
<antcall target="assemble-libraries" />
|
2010-05-08 23:47:19 +02:00
|
|
|
</target>
|
|
|
|
|
2015-03-05 17:42:26 +01:00
|
|
|
<!-- copy library folder -->
|
|
|
|
<target name="assemble-libraries" unless="light_bundle">
|
2014-05-16 01:07:45 +02:00
|
|
|
<copy todir="${target.path}/libraries">
|
2015-03-27 16:17:54 +01:00
|
|
|
<fileset dir="../libraries">
|
|
|
|
<!-- exluding non AVR libraries -->
|
|
|
|
<exclude name="**/Audio/**"/>
|
|
|
|
<exclude name="**/Scheduler/**"/>
|
|
|
|
<exclude name="**/USBHost/**"/>
|
|
|
|
</fileset>
|
2014-05-16 01:07:45 +02:00
|
|
|
</copy>
|
|
|
|
</target>
|
2013-01-23 11:44:37 +01:00
|
|
|
|
2015-03-05 17:42:26 +01:00
|
|
|
<!-- copy hardware folder -->
|
|
|
|
<target name="assemble-hardware" unless="light_bundle">
|
2015-03-31 17:00:01 +02:00
|
|
|
<copy todir="${target.path}/hardware">
|
|
|
|
<fileset dir="../hardware">
|
|
|
|
<exclude name="arduino/sam/**"/>
|
|
|
|
</fileset>
|
2015-03-05 17:42:26 +01:00
|
|
|
</copy>
|
|
|
|
</target>
|
|
|
|
|
2010-05-08 23:47:19 +02:00
|
|
|
<!-- - - - - - - - - -->
|
|
|
|
<!-- Revision check -->
|
|
|
|
<!-- - - - - - - - - -->
|
|
|
|
<target name="revision-check">
|
|
|
|
<!-- figure out the revision number -->
|
2013-01-24 14:42:51 +01:00
|
|
|
<loadfile srcfile="shared/revisions.txt" property="revision">
|
2010-05-08 23:47:19 +02:00
|
|
|
<filterchain>
|
2013-01-24 14:42:51 +01:00
|
|
|
<ignoreblank />
|
|
|
|
<headfilter lines="1"/>
|
|
|
|
<tokenfilter>
|
|
|
|
<linetokenizer includeDelims="false" />
|
|
|
|
<!-- grab the thing from the first line that's 4 digits -->
|
2014-05-29 11:58:20 +02:00
|
|
|
<containsregex pattern="ARDUINO ([^ ]*)" />
|
2013-01-24 14:42:51 +01:00
|
|
|
<replaceregex pattern="ARDUINO ([^ ]*).*" replace="\1" />
|
|
|
|
</tokenfilter>
|
|
|
|
<tokenfilter>
|
|
|
|
<stringtokenizer suppressdelims="true" />
|
|
|
|
</tokenfilter>
|
2010-05-08 23:47:19 +02:00
|
|
|
</filterchain>
|
|
|
|
</loadfile>
|
2013-01-24 14:42:51 +01:00
|
|
|
<echo message="Latest revision detected in shared/revision.txt is: ${revision}" />
|
2013-01-23 11:44:37 +01:00
|
|
|
|
2010-05-08 23:47:19 +02:00
|
|
|
<!-- figure out the revision number in base.java -->
|
2014-09-24 11:35:30 +02:00
|
|
|
<loadfile srcfile="../arduino-core/src/processing/app/BaseNoGui.java"
|
2010-05-08 23:47:19 +02:00
|
|
|
property="revision.base">
|
|
|
|
<filterchain>
|
2013-01-24 14:42:51 +01:00
|
|
|
<tokenfilter>
|
|
|
|
<linetokenizer />
|
|
|
|
<containsregex pattern="String VERSION_NAME = "/>
|
2014-11-18 14:04:14 +01:00
|
|
|
<replaceregex pattern=".*"(.*)".*" flags="g" replace="\1"/>
|
2013-01-24 14:42:51 +01:00
|
|
|
</tokenfilter>
|
2010-05-08 23:47:19 +02:00
|
|
|
</filterchain>
|
|
|
|
</loadfile>
|
2014-11-18 14:04:14 +01:00
|
|
|
<echo message=" Revision in BaseNoGui.java is: ${revision.base}" />
|
2010-05-08 23:47:19 +02:00
|
|
|
</target>
|
2013-01-23 11:44:37 +01:00
|
|
|
|
2010-05-08 23:47:19 +02:00
|
|
|
<!-- - - - - - - - -->
|
|
|
|
<!-- Mac OS X -->
|
|
|
|
<!-- - - - - - - - -->
|
|
|
|
|
2015-03-25 11:08:05 +01:00
|
|
|
<target name="macosx-clean" depends="macosx-old-clean" description="Clean Mac OS X build"/>
|
2015-01-30 16:42:04 +01:00
|
|
|
|
2015-03-25 11:08:05 +01:00
|
|
|
<target name="macosx-old-clean" depends="subprojects-clean" description="Clean Mac OS X build">
|
2010-05-08 23:47:19 +02:00
|
|
|
<delete dir="macosx/work" />
|
|
|
|
<delete dir="macosx/working_dir" />
|
|
|
|
<delete dir="macosx/working.dmg" />
|
|
|
|
<delete file="macosx/arduino-*.dmg" />
|
2013-01-31 12:32:29 +01:00
|
|
|
<delete>
|
|
|
|
<fileset dir="macosx" includes="arduino-*macosx*.zip"/>
|
|
|
|
</delete>
|
2010-05-08 23:47:19 +02:00
|
|
|
</target>
|
2013-01-23 11:44:37 +01:00
|
|
|
|
2010-05-08 23:47:19 +02:00
|
|
|
<target name="macosx-checkos" unless="macosx">
|
|
|
|
<echo>
|
|
|
|
=======================================================
|
|
|
|
Arduino for Mac OS X can only be built on Mac OS X.
|
2013-01-23 11:44:37 +01:00
|
|
|
|
|
|
|
Bye.
|
2010-05-08 23:47:19 +02:00
|
|
|
=======================================================
|
|
|
|
</echo>
|
|
|
|
<fail message="wrong platform (${os.name})" />
|
|
|
|
</target>
|
2013-01-23 11:44:37 +01:00
|
|
|
|
2015-03-25 11:08:05 +01:00
|
|
|
<target name="macosx-old-build" if="macosx" depends="revision-check, macosx-checkos, subprojects-build" description="Build Mac OS X version">
|
2010-05-08 23:47:19 +02:00
|
|
|
<mkdir dir="macosx/work" />
|
2014-05-16 01:07:45 +02:00
|
|
|
<mkdir dir="macosx/work/${staging_hardware_folder}" />
|
2013-01-23 11:44:37 +01:00
|
|
|
|
2014-07-04 14:06:57 +02:00
|
|
|
<!-- assemble the pde -->
|
|
|
|
<copy todir="macosx/work/Arduino.app">
|
|
|
|
<fileset dir="macosx/template.app" includes="**"/>
|
|
|
|
</copy>
|
|
|
|
|
|
|
|
<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">
|
2010-05-08 23:47:19 +02:00
|
|
|
<fileset dir="shared" includes="lib/**" />
|
|
|
|
<fileset file="shared/revisions.txt" />
|
|
|
|
</copy>
|
|
|
|
|
2015-01-30 16:42:04 +01:00
|
|
|
<antcall target="macosx-build-common"/>
|
|
|
|
|
|
|
|
<replace file="macosx/work/Arduino.app/Contents/Info.plist"
|
|
|
|
token="VERSION" value="${version}" />
|
|
|
|
<replace file="macosx/work/Arduino.app/Contents/Info.plist"
|
|
|
|
token="REVISION" value="${revision}" />
|
|
|
|
|
|
|
|
</target>
|
|
|
|
|
2015-03-25 11:08:05 +01:00
|
|
|
<target name="macosx-build" if="macosx" depends="revision-check, macosx-checkos, subprojects-build" description="Build Mac OS X version">
|
|
|
|
<fail unless="MACOSX_BUNDLED_JVM" message="MacOSX requires MACOSX_BUNDLED_JVM property set"/>
|
2015-03-05 17:42:26 +01:00
|
|
|
<mkdir dir="${staging_folder}/work" />
|
2015-03-25 11:08:05 +01:00
|
|
|
|
2015-01-30 16:42:04 +01:00
|
|
|
<antcall target="unzip">
|
2015-03-24 16:44:39 +01:00
|
|
|
<param name="archive_file" value="${staging_folder}/appbundler-1.0ea-upstream1.jar.zip" />
|
2015-04-09 12:12:10 +02:00
|
|
|
<param name="archive_url" value="http://downloads.arduino.cc/appbundler-1.0ea-upstream1.jar.zip" />
|
2015-03-24 16:44:39 +01:00
|
|
|
<param name="final_folder" value="${staging_folder}/appbundler-1.0ea-upstream1" />
|
|
|
|
<param name="dest_folder" value="${staging_folder}/appbundler-1.0ea-upstream1" />
|
2015-01-30 16:42:04 +01:00
|
|
|
</antcall>
|
|
|
|
|
2015-03-24 16:44:39 +01:00
|
|
|
<taskdef name="bundleapp" classname="com.oracle.appbundler.AppBundlerTask" classpath="${staging_folder}/appbundler-1.0ea-upstream1/appbundler-1.0ea-upstream1.jar"/>
|
2015-03-04 11:23:36 +01:00
|
|
|
|
|
|
|
<bundleapp
|
2015-03-25 11:08:05 +01:00
|
|
|
jvmRequired="1.8"
|
2015-03-04 11:23:36 +01:00
|
|
|
outputdirectory="${staging_folder}/work"
|
|
|
|
name="Arduino"
|
|
|
|
displayname="Arduino"
|
|
|
|
executablename="Arduino"
|
|
|
|
identifier="cc.arduino.Arduino"
|
|
|
|
shortversion="${version}"
|
|
|
|
version="${revision}"
|
|
|
|
signature="Pde1"
|
|
|
|
icon="macosx/template.app/Contents/Resources/processing.icns"
|
|
|
|
mainclassname="processing.app.Base"
|
|
|
|
copyright="Arduino LLC"
|
|
|
|
minimumsystemversion="10.7"
|
2015-05-25 10:09:41 +02:00
|
|
|
highresolutioncapable="true">
|
2015-01-30 16:42:04 +01:00
|
|
|
|
2015-03-25 11:08:05 +01:00
|
|
|
<runtime dir="${MACOSX_BUNDLED_JVM}"/>
|
|
|
|
|
2015-01-30 16:42:04 +01:00
|
|
|
<arch name="x86_64"/>
|
|
|
|
<arch name="i386"/>
|
|
|
|
|
|
|
|
<classpath refid="runtime.jars"/>
|
|
|
|
|
|
|
|
<option value="-Dapple.awt.application.name=Arduino" />
|
|
|
|
<option value="-Dapple.laf.useScreenMenuBar=true"/>
|
|
|
|
<option value="-Dcom.apple.macos.use-file-dialog-packages=true"/>
|
|
|
|
<option value="-Dcom.apple.smallTabs=true"/>
|
2015-02-03 13:17:35 +01:00
|
|
|
<option value="-Dcom.apple.macos.useScreenMenuBar=true" />
|
2015-01-30 16:42:04 +01:00
|
|
|
|
|
|
|
<!--
|
|
|
|
<option value="-Dapple.awt.showGrowBox=false"/>
|
|
|
|
<option value="-Dapple.awt.Antialiasing=false"/>
|
|
|
|
<option value="-Dapple.awt.TextAntialiasing=true"/>
|
|
|
|
<option value="-Dcom.apple.hwaccel=true"/>
|
|
|
|
<option value="-Dapple.awt.graphics.UseQuartz=true"/>
|
|
|
|
-->
|
|
|
|
|
|
|
|
<!--<option value="-Dcom.apple.macos.useScreenMenuBar=true"/>-->
|
|
|
|
|
|
|
|
<!-- Workaround since the icon parameter for bundleapp doesn't work -->
|
2015-03-04 11:23:36 +01:00
|
|
|
<option value="-Xdock:name=Arduino"/>
|
2015-01-30 16:42:04 +01:00
|
|
|
<option value="-Dcom.apple.mrj.application.apple.menu.about.name=Arduino"/>
|
|
|
|
<option value="-Dfile.encoding=UTF-8"/>
|
|
|
|
|
|
|
|
<option value="-Xms128M"/>
|
2015-03-12 09:25:57 +01:00
|
|
|
<option value="-Xmx512M"/>
|
2015-03-11 16:26:59 +01:00
|
|
|
<option value="-splash:$APP_ROOT/Contents/Java/lib/splash.png"/>
|
2015-01-30 16:42:04 +01:00
|
|
|
|
|
|
|
<bundledocument extensions="ino,c,cpp,h"
|
|
|
|
icon="macosx/template.app/Contents/Resources/pde.icns"
|
|
|
|
name="Arduino Source File"
|
2015-04-29 09:10:26 +02:00
|
|
|
role="Editor" ispackage="false">
|
2015-01-30 16:42:04 +01:00
|
|
|
</bundledocument>
|
|
|
|
|
|
|
|
</bundleapp>
|
|
|
|
|
2015-03-05 17:42:26 +01:00
|
|
|
<mkdir dir="${staging_folder}/work/${staging_hardware_folder}" />
|
|
|
|
|
2015-01-30 16:42:04 +01:00
|
|
|
<copy todir="${staging_folder}/work/${staging_hardware_folder}/../">
|
|
|
|
<fileset dir="shared" includes="lib/**" />
|
|
|
|
<fileset file="shared/revisions.txt" />
|
|
|
|
</copy>
|
|
|
|
|
|
|
|
<antcall target="macosx-build-common"/>
|
|
|
|
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="macosx-build-common">
|
2015-03-05 17:42:26 +01:00
|
|
|
<mkdir dir="${staging_folder}/work" />
|
|
|
|
<mkdir dir="${staging_folder}/work/${staging_hardware_folder}" />
|
|
|
|
|
|
|
|
<antcall target="macosx-build-common-avr-toolchain" />
|
2015-01-30 16:42:04 +01:00
|
|
|
|
2015-05-04 12:45:06 +02:00
|
|
|
<antcall target="package-library-index-json-bundle"/>
|
|
|
|
|
2010-05-08 23:47:19 +02:00
|
|
|
<antcall target="assemble">
|
2015-03-05 17:42:26 +01:00
|
|
|
<param name="target.path" value="${staging_folder}/work/${staging_hardware_folder}/.." />
|
2010-05-08 23:47:19 +02:00
|
|
|
</antcall>
|
2012-05-16 13:44:51 +02:00
|
|
|
|
2014-10-08 17:10:47 +02:00
|
|
|
<antcall target="unzip">
|
2014-11-21 11:07:30 +01:00
|
|
|
<param name="archive_file" value="./libastylej-2.05.zip" />
|
2015-04-09 12:12:10 +02:00
|
|
|
<param name="archive_url" value="http://downloads.arduino.cc/libastylej-2.05.zip" />
|
2014-10-08 17:10:47 +02:00
|
|
|
<param name="final_folder" value="${staging_folder}/libastylej" />
|
|
|
|
<param name="dest_folder" value="${staging_folder}" />
|
|
|
|
</antcall>
|
2015-01-30 16:42:04 +01:00
|
|
|
<copy file="macosx/libastylej/libastylej.jnilib" todir="macosx/work/${staging_hardware_folder}/../lib/" />
|
|
|
|
<chmod perm="755" file="macosx/work/${staging_hardware_folder}/../lib/libastylej.jnilib" />
|
|
|
|
<copy file="macosx/libastylej/libastylej.jnilib" tofile="macosx/work/${staging_hardware_folder}/../lib/libastylej.dylib" />
|
|
|
|
<chmod perm="755" file="macosx/work/${staging_hardware_folder}/../lib/libastylej.dylib" />
|
|
|
|
|
|
|
|
</target>
|
|
|
|
|
2015-03-05 17:42:26 +01:00
|
|
|
<!-- Unzip AVR tools -->
|
|
|
|
<target name="macosx-build-common-avr-toolchain" unless="light_bundle">
|
|
|
|
<antcall target="avr-toolchain-bundle">
|
|
|
|
<param name="unpack_target" value="untar"/>
|
2015-04-23 10:56:56 +02:00
|
|
|
<param name="gcc_archive_file" value="avr-gcc-4.8.1-arduino5-i386-apple-darwin11.tar.bz2"/>
|
|
|
|
<param name="gcc_version" value="4.8.1-arduino5"/>
|
|
|
|
<param name="avrdude_archive_file" value="avrdude-6.0.1-arduino5-i386-apple-darwin11.tar.bz2"/>
|
|
|
|
<param name="avrdude_version" value="6.0.1-arduino5"/>
|
2015-03-05 17:42:26 +01:00
|
|
|
</antcall>
|
|
|
|
|
|
|
|
<chmod perm="+x">
|
2015-03-31 17:00:01 +02:00
|
|
|
<fileset dir="${staging_folder}/work/${staging_hardware_folder}/tools" includes="**/bin/*"/>
|
|
|
|
<fileset dir="${staging_folder}/work/${staging_hardware_folder}/tools" includes="**/libexec/gcc/avr/4.8.1/*"/>
|
2015-03-05 17:42:26 +01:00
|
|
|
</chmod>
|
|
|
|
</target>
|
|
|
|
|
2015-03-25 11:08:05 +01:00
|
|
|
<target name="macosx-old-run" depends="macosx-old-build" description="Run Mac OS X version">
|
2015-01-30 16:42:04 +01:00
|
|
|
<antcall target="macosx-run-common"/>
|
2010-05-08 23:47:19 +02:00
|
|
|
</target>
|
2010-05-09 00:07:30 +02:00
|
|
|
|
2015-05-11 10:48:52 +02:00
|
|
|
<target name="macosx-run" depends="build" description="Run Mac OS X version">
|
2015-01-30 16:42:04 +01:00
|
|
|
<antcall target="macosx-run-common"/>
|
|
|
|
</target>
|
|
|
|
|
2015-03-25 11:08:05 +01:00
|
|
|
<target name="macosx-old-debug" depends="macosx-old-build" description="Run Mac OS X version">
|
2015-01-30 16:42:04 +01:00
|
|
|
<antcall target="macosx-debug-common"/>
|
|
|
|
</target>
|
|
|
|
|
2015-05-11 10:48:52 +02:00
|
|
|
<target name="macosx-debug" depends="build" description="Run Mac OS X version">
|
2015-01-30 16:42:04 +01:00
|
|
|
<antcall target="macosx-debug-common"/>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="macosx-run-common">
|
2015-04-10 12:32:55 +02:00
|
|
|
<exec executable="open" dir="macosx/work" failonerror="true">
|
2014-05-29 12:10:09 +02:00
|
|
|
<arg value="Arduino.app"/>
|
|
|
|
</exec>
|
2010-05-08 23:47:19 +02:00
|
|
|
</target>
|
|
|
|
|
2015-01-30 16:42:04 +01:00
|
|
|
<target name="macosx-debug-common">
|
2015-04-10 12:32:55 +02:00
|
|
|
<exec executable="open" dir="macosx/work" spawn="false" failonerror="true">
|
2014-05-30 13:07:33 +02:00
|
|
|
<arg value="Arduino.app"/>
|
|
|
|
</exec>
|
2011-06-07 03:48:12 +02:00
|
|
|
</target>
|
|
|
|
|
2013-02-01 23:51:50 +01:00
|
|
|
<!-- - - - - - - - - - - - - - - - -->
|
|
|
|
<!-- Sign application for MacOSX. -->
|
|
|
|
<!-- - - - - - - - - - - - - - - - -->
|
|
|
|
<target name="macosx-signed-dist" if="macosx" depends="macosx-singed-dist-check, dist"
|
|
|
|
description="Create a downloadable and signed .zip for the Mac OS X version">
|
|
|
|
<fail unless="version" message="Please set the property 'version' to correctly sign distribution file" />
|
|
|
|
|
|
|
|
<!-- Remove everything from working folder -->
|
|
|
|
<delete dir="macosx/work/Arduino.app" />
|
|
|
|
|
|
|
|
<!-- Unzip unsigned app into working dir -->
|
2015-04-10 12:32:55 +02:00
|
|
|
<exec executable="unzip" dir="macosx/work" failonerror="true">
|
2013-02-05 16:30:00 +01:00
|
|
|
<arg line="../arduino-${version}-${platform}.zip" />
|
|
|
|
</exec>
|
2013-02-01 23:51:50 +01:00
|
|
|
|
2013-02-04 14:46:27 +01:00
|
|
|
<!-- Unlock keychain file -->
|
2015-04-10 12:32:55 +02:00
|
|
|
<exec executable="security" dir="macosx/work" failonerror="true">
|
2013-02-04 14:46:27 +01:00
|
|
|
<arg line="unlock-keychain -p "${macosx-sign-keychain-pass}" "${macosx-sign-keychain}"" />
|
|
|
|
</exec>
|
|
|
|
|
2013-02-01 23:51:50 +01:00
|
|
|
<!-- Sign app -->
|
2015-04-10 12:32:55 +02:00
|
|
|
<exec executable="codesign" dir="macosx/work" failonerror="true">
|
2015-03-27 17:29:34 +01:00
|
|
|
<arg line="--keychain "${macosx-sign-keychain}" --force -s "${macosx-sign-id}" --deep -v Arduino.app/" />
|
2013-02-01 23:51:50 +01:00
|
|
|
</exec>
|
|
|
|
|
2013-08-29 16:07:09 +02:00
|
|
|
<!-- Check for successful signing -->
|
|
|
|
<exec executable="codesign" dir="macosx/work" failonerror="true">
|
|
|
|
<arg line="-vvvv Arduino.app/" />
|
|
|
|
</exec>
|
|
|
|
|
2013-02-05 16:30:00 +01:00
|
|
|
<delete file="macosx/arduino-${version}-${platform}.zip" />
|
|
|
|
|
2013-02-01 23:51:50 +01:00
|
|
|
<!-- Create signed zip file -->
|
2015-04-10 12:32:55 +02:00
|
|
|
<exec executable="zip" dir="macosx/work" failonerror="true">
|
2013-08-29 16:17:14 +02:00
|
|
|
<arg line="-q -r ../arduino-${version}-${platform}-signed.zip ." />
|
2013-02-01 23:51:50 +01:00
|
|
|
</exec>
|
|
|
|
|
|
|
|
<echo>
|
|
|
|
=======================================================
|
|
|
|
Arduino for Mac OS X built and signed.
|
|
|
|
|
|
|
|
macosx/arduino-${version}-${platform}-signed.zip
|
|
|
|
=======================================================
|
|
|
|
</echo>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="macosx-singed-dist-check">
|
2013-02-04 14:46:27 +01:00
|
|
|
<fail unless="macosx-sign-keychain" message="Please set the property 'macosx-sign-keychain' to the correct keychain file" />
|
|
|
|
<fail unless="macosx-sign-keychain-pass" message="Please set the property 'macosx-sign-keychain-pass' with the password to unlock the keychain" />
|
|
|
|
<fail unless="macosx-sign-id" message="Please set the property 'macosx-sign-id' to the correct cert identifier" />
|
2013-02-01 23:51:50 +01:00
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- - - - - - - - - - - - - - - - - - - -->
|
|
|
|
<!-- Build distribution file for MacOSX. -->
|
|
|
|
<!-- - - - - - - - - - - - - - - - - - - -->
|
2015-03-25 11:08:05 +01:00
|
|
|
<target name="macosx-old-dist" if="macosx" depends="macosx-old-build" description="Create a downloadable .zip for the Mac OS X version">
|
2015-02-03 11:53:48 +01:00
|
|
|
<antcall target="macosx-dist-common"/>
|
2015-01-30 16:42:04 +01:00
|
|
|
</target>
|
2011-11-28 23:36:03 +01:00
|
|
|
|
2015-05-11 10:48:52 +02:00
|
|
|
<target name="macosx-dist" if="macosx" depends="build" description="Create a downloadable .zip for the Mac OS X version">
|
2015-02-03 11:53:48 +01:00
|
|
|
<antcall target="macosx-dist-common"/>
|
2015-01-30 16:42:04 +01:00
|
|
|
</target>
|
2014-07-04 14:06:57 +02:00
|
|
|
|
2015-01-30 16:42:04 +01:00
|
|
|
<target name="macosx-dist-common">
|
2015-04-10 12:32:55 +02:00
|
|
|
<exec executable="zip" dir="macosx/work" failonerror="true">
|
2015-02-03 11:53:48 +01:00
|
|
|
<arg line="-q -r ../arduino-${version}-${platform}.zip ." />
|
2011-11-28 23:36:03 +01:00
|
|
|
</exec>
|
|
|
|
|
|
|
|
<echo>
|
|
|
|
=======================================================
|
2013-01-23 11:44:37 +01:00
|
|
|
Arduino for Mac OS X was built. Grab the image from
|
2013-02-19 15:07:16 +01:00
|
|
|
|
2015-02-03 11:53:48 +01:00
|
|
|
macosx/arduino-${version}-${platform}.zip
|
2011-11-28 23:36:03 +01:00
|
|
|
=======================================================
|
|
|
|
</echo>
|
|
|
|
</target>
|
|
|
|
|
2015-03-25 11:08:05 +01:00
|
|
|
<!--<target name="macosx-dist-old" 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" />-->
|
|
|
|
<!--<chmod perm="+x">-->
|
|
|
|
<!--<fileset dir="macosx/working_dir/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin" includes="**/*" />-->
|
|
|
|
<!--<fileset dir="macosx/working_dir/Arduino.app/Contents/Resources/Java/hardware/tools/avr/avr/bin" includes="**/*" />-->
|
|
|
|
<!--<fileset dir="macosx/working_dir/Arduino.app/Contents/Resources/Java/hardware/tools/avr/avr-3/bin" includes="**/*" />-->
|
|
|
|
<!--<fileset dir="macosx/working_dir/Arduino.app/Contents/Resources/Java/hardware/tools/avr/avr-4/bin" includes="**/*" />-->
|
|
|
|
<!--<fileset dir="macosx/working_dir/Arduino.app/Contents/Resources/Java/hardware/tools/avr/libexec/gcc/avr/3.4.6/" includes="**/cc1*" />-->
|
|
|
|
<!--<fileset dir="macosx/working_dir/Arduino.app/Contents/Resources/Java/hardware/tools/avr/libexec/gcc/avr/4.3.2/" includes="**/cc1*" />-->
|
|
|
|
<!--</chmod>-->
|
|
|
|
|
|
|
|
<!--<!– 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>-->
|
2013-01-23 11:44:37 +01:00
|
|
|
|
2015-03-25 11:43:37 +01:00
|
|
|
<!--<target name="macosx-dist-old-fix-perms" unless="light_bundle">-->
|
|
|
|
<!--<chmod perm="+x">-->
|
|
|
|
<!--<fileset dir="macosx/working_dir/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin" includes="**/*" />-->
|
|
|
|
<!--<fileset dir="macosx/working_dir/Arduino.app/Contents/Resources/Java/hardware/tools/avr/avr/bin" includes="**/*" />-->
|
|
|
|
<!--<fileset dir="macosx/working_dir/Arduino.app/Contents/Resources/Java/hardware/tools/avr/avr-3/bin" includes="**/*" />-->
|
|
|
|
<!--<fileset dir="macosx/working_dir/Arduino.app/Contents/Resources/Java/hardware/tools/avr/avr-4/bin" includes="**/*" />-->
|
|
|
|
<!--<fileset dir="macosx/working_dir/Arduino.app/Contents/Resources/Java/hardware/tools/avr/libexec/gcc/avr/3.4.6/" includes="**/cc1*" />-->
|
|
|
|
<!--<fileset dir="macosx/working_dir/Arduino.app/Contents/Resources/Java/hardware/tools/avr/libexec/gcc/avr/4.3.2/" includes="**/cc1*" />-->
|
|
|
|
<!--</chmod>-->
|
|
|
|
<!--</target>-->
|
2015-03-05 17:42:26 +01:00
|
|
|
|
2010-05-08 23:47:19 +02:00
|
|
|
<!-- - - - - - - - -->
|
|
|
|
<!-- Linux -->
|
|
|
|
<!-- - - - - - - - -->
|
2013-01-23 11:44:37 +01:00
|
|
|
|
2010-05-08 23:47:19 +02:00
|
|
|
<target name="linux-clean" depends="subprojects-clean" description="Clean linux version">
|
|
|
|
<delete dir="linux/work" />
|
2013-01-31 12:32:29 +01:00
|
|
|
<delete>
|
2015-01-31 19:32:24 +01:00
|
|
|
<fileset dir="linux" includes="arduino-*linux*.tar.xz"/>
|
2013-01-31 12:32:29 +01:00
|
|
|
</delete>
|
2010-05-08 23:47:19 +02:00
|
|
|
</target>
|
2013-01-23 11:44:37 +01:00
|
|
|
|
2010-05-08 23:47:19 +02:00
|
|
|
<target name="linux-checkos" unless="linux">
|
|
|
|
<echo>
|
|
|
|
=======================================================
|
|
|
|
Arduino for Linux can only be built on on unix systems.
|
2013-01-23 11:44:37 +01:00
|
|
|
|
|
|
|
Bye.
|
2010-05-08 23:47:19 +02:00
|
|
|
=======================================================
|
|
|
|
</echo>
|
2013-01-23 11:44:37 +01:00
|
|
|
|
2010-05-08 23:47:19 +02:00
|
|
|
<fail message="wrong platform (${os.name})" />
|
|
|
|
</target>
|
2013-01-23 11:44:37 +01:00
|
|
|
|
2013-07-28 14:14:04 +02:00
|
|
|
<target name="linux-build" depends="revision-check, linux-checkos, subprojects-build" description="Build linux version">
|
2010-05-08 23:47:19 +02:00
|
|
|
<mkdir dir="linux/work" />
|
2014-05-16 01:07:45 +02:00
|
|
|
<mkdir dir="linux/work/${staging_hardware_folder}" />
|
2013-01-23 11:44:37 +01:00
|
|
|
|
2010-05-08 23:47:19 +02:00
|
|
|
<copy todir="linux/work">
|
|
|
|
<fileset dir="shared" includes="lib/**" />
|
|
|
|
<fileset file="shared/revisions.txt" />
|
|
|
|
</copy>
|
2013-01-23 11:44:37 +01:00
|
|
|
|
2013-02-27 17:54:48 +01:00
|
|
|
<copy todir="linux/work">
|
|
|
|
<fileset dir="linux/dist" includes="lib/**" />
|
|
|
|
</copy>
|
|
|
|
|
2010-05-08 23:47:19 +02:00
|
|
|
<copy todir="linux/work/lib" flatten="true">
|
|
|
|
<fileset refid="runtime.jars" />
|
|
|
|
</copy>
|
2013-01-23 11:44:37 +01:00
|
|
|
|
2010-05-08 23:47:19 +02:00
|
|
|
<antcall target="assemble">
|
|
|
|
<param name="target.path" value="linux/work" />
|
|
|
|
</antcall>
|
|
|
|
|
2012-02-29 22:16:37 +01:00
|
|
|
<copy todir="linux/work" file="linux/dist/arduino" />
|
2015-04-22 18:47:39 +02:00
|
|
|
<copy todir="linux/work" file="linux/dist/arduino.desktop" />
|
|
|
|
<copy todir="linux/work" file="linux/dist/install.sh" />
|
2012-02-29 22:16:37 +01:00
|
|
|
<chmod perm="755" file="linux/work/arduino" />
|
|
|
|
|
2012-05-16 13:44:51 +02:00
|
|
|
<copy todir="linux/work" file="linux/dist/arduino" />
|
|
|
|
<chmod perm="755" file="linux/work/arduino" />
|
2013-10-14 17:31:35 +02:00
|
|
|
|
2014-10-08 17:10:47 +02:00
|
|
|
<antcall target="unzip">
|
2014-11-21 11:07:30 +01:00
|
|
|
<param name="archive_file" value="./libastylej-2.05.zip" />
|
2015-04-09 12:12:10 +02:00
|
|
|
<param name="archive_url" value="http://downloads.arduino.cc/libastylej-2.05.zip" />
|
2014-10-08 17:10:47 +02:00
|
|
|
<param name="final_folder" value="${staging_folder}/libastylej" />
|
|
|
|
<param name="dest_folder" value="${staging_folder}" />
|
|
|
|
</antcall>
|
2013-10-14 17:31:35 +02:00
|
|
|
<copy file="linux/libastylej/libastylej${arch-bits}.so" tofile="linux/work/lib/libastylej.so" />
|
|
|
|
<chmod perm="755" file="linux/work/lib/libastylej.so" />
|
2010-05-08 23:47:19 +02:00
|
|
|
</target>
|
2011-02-17 02:21:43 +01:00
|
|
|
|
2015-05-04 12:45:06 +02:00
|
|
|
<target name="linux32-build" depends="linux-build" description="Build linux (32-bit) version">
|
2015-03-05 17:42:26 +01:00
|
|
|
<antcall target="avr-toolchain-bundle">
|
|
|
|
<param name="unpack_target" value="untar"/>
|
2015-04-23 10:56:56 +02:00
|
|
|
<param name="gcc_archive_file" value="avr-gcc-4.8.1-arduino5-i686-pc-linux-gnu.tar.bz2"/>
|
|
|
|
<param name="gcc_version" value="4.8.1-arduino5"/>
|
|
|
|
<param name="avrdude_archive_file" value="avrdude-6.0.1-arduino5-i686-pc-linux-gnu.tar.bz2"/>
|
|
|
|
<param name="avrdude_version" value="6.0.1-arduino5"/>
|
2015-03-05 17:42:26 +01:00
|
|
|
</antcall>
|
2015-05-04 12:45:06 +02:00
|
|
|
|
|
|
|
<antcall target="package-library-index-json-bundle"/>
|
2010-05-08 23:47:19 +02:00
|
|
|
</target>
|
2011-02-17 02:21:43 +01:00
|
|
|
|
2015-05-04 12:45:06 +02:00
|
|
|
<target name="linux64-build" depends="linux-build" description="Build linux (64-bit) version">
|
2015-03-05 17:42:26 +01:00
|
|
|
<antcall target="avr-toolchain-bundle">
|
|
|
|
<param name="unpack_target" value="untar"/>
|
2015-04-23 10:56:56 +02:00
|
|
|
<param name="gcc_archive_file" value="avr-gcc-4.8.1-arduino5-x86_64-pc-linux-gnu.tar.bz2"/>
|
|
|
|
<param name="gcc_version" value="4.8.1-arduino5"/>
|
|
|
|
<param name="avrdude_archive_file" value="avrdude-6.0.1-arduino5-x86_64-pc-linux-gnu.tar.bz2"/>
|
|
|
|
<param name="avrdude_version" value="6.0.1-arduino5"/>
|
2015-03-05 17:42:26 +01:00
|
|
|
</antcall>
|
2015-05-04 12:45:06 +02:00
|
|
|
|
|
|
|
<antcall target="package-library-index-json-bundle"/>
|
2011-02-17 02:21:43 +01:00
|
|
|
</target>
|
2013-01-23 11:44:37 +01:00
|
|
|
|
2015-05-11 10:48:52 +02:00
|
|
|
<target name="linux32-run" depends="build" description="Run Linux (32-bit) version">
|
2015-04-10 12:32:55 +02:00
|
|
|
<exec executable="./linux/work/arduino" spawn="false" failonerror="true"/>
|
2010-05-08 23:47:19 +02:00
|
|
|
</target>
|
2013-01-23 11:44:37 +01:00
|
|
|
|
2015-05-11 10:48:52 +02:00
|
|
|
<target name="linux64-run" depends="build" description="Run Linux (64-bit) version">
|
2015-04-10 12:32:55 +02:00
|
|
|
<exec executable="./linux/work/arduino" spawn="false" failonerror="true"/>
|
2011-02-17 02:21:43 +01:00
|
|
|
</target>
|
|
|
|
|
2014-02-08 19:57:25 +01:00
|
|
|
<!-- Set '${dist_file}_available' property if toolchain dist_file is downloaded -->
|
|
|
|
<!-- Set '${dist_file}_installed' property if toolchain is installed in working directory -->
|
|
|
|
<!-- hardware/tools/${dist_check_file} is checked for existence -->
|
2014-10-08 15:50:32 +02:00
|
|
|
<target name="untar-unzip-check">
|
|
|
|
<available file="${archive_file}" property="${archive_file}_available" />
|
|
|
|
<available file="${final_folder}" property="${archive_file}_installed" />
|
2014-02-08 19:57:25 +01:00
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- Retrieve tool -->
|
2014-10-08 15:50:32 +02:00
|
|
|
<target name="untar-unzip-download" depends="untar-unzip-check" unless="${archive_file}_available">
|
|
|
|
<get src="${archive_url}" dest="${archive_file}" verbose="true" ignoreerrors="true" />
|
2014-02-08 19:57:25 +01:00
|
|
|
</target>
|
|
|
|
|
2014-10-08 17:16:50 +02:00
|
|
|
<target name="untar-unzip-checksum" depends="untar-unzip-download">
|
2014-10-08 15:50:32 +02:00
|
|
|
<echo>Testing checksum of "${archive_file}"</echo>
|
|
|
|
<checksum file="${archive_file}" algorithm="sha" fileext=".sha" verifyproperty="checksum.matches"/>
|
2014-02-08 19:57:25 +01:00
|
|
|
<condition property="checksum.matches.fail">
|
|
|
|
<equals arg1="${checksum.matches}" arg2="false"/>
|
|
|
|
</condition>
|
|
|
|
<fail if="checksum.matches.fail">Checksum failed.
|
|
|
|
|
2014-10-08 15:50:32 +02:00
|
|
|
File ${archive_file} failed checksum.
|
|
|
|
Please remove "${archive_file}" to download it again.
|
2014-02-08 19:57:25 +01:00
|
|
|
</fail>
|
2014-10-08 17:16:50 +02:00
|
|
|
</target>
|
2014-02-08 19:57:25 +01:00
|
|
|
|
2014-10-08 17:16:50 +02:00
|
|
|
<!-- Ensure that the tool is downloaded and test checksums, if everything's ok unzip it on the tools folder -->
|
|
|
|
<target name="untar" depends="untar-unzip-checksum" unless="${archive_file}_installed">
|
2015-03-05 17:42:26 +01:00
|
|
|
<echo>Untarring ${archive_file} into folder ${dest_folder}</echo>
|
2015-04-10 12:32:55 +02:00
|
|
|
<exec executable="tar" failonerror="true">
|
2014-10-08 17:25:53 +02:00
|
|
|
<arg value="xf"/>
|
2014-10-08 15:50:32 +02:00
|
|
|
<arg value="${archive_file}"/>
|
|
|
|
<arg value="--directory=${dest_folder}"/>
|
2014-02-08 19:57:25 +01:00
|
|
|
</exec>
|
|
|
|
</target>
|
|
|
|
|
2014-10-08 17:16:50 +02:00
|
|
|
<target name="unzip" depends="untar-unzip-checksum" unless="${archive_file}_installed">
|
2015-03-05 17:42:26 +01:00
|
|
|
<echo>Unzipping ${archive_file} into folder ${dest_folder}</echo>
|
2014-10-08 17:10:47 +02:00
|
|
|
<mkdir dir="${dest_folder}" />
|
2015-04-10 12:32:55 +02:00
|
|
|
<exec executable="unzip" failonerror="true">
|
2014-10-08 17:10:47 +02:00
|
|
|
<arg value="-q" />
|
|
|
|
<arg value="-n" />
|
|
|
|
<arg value="-d" />
|
|
|
|
<arg value="${dest_folder}" />
|
|
|
|
<arg value="${archive_file}" />
|
|
|
|
</exec>
|
2012-05-16 17:35:54 +02:00
|
|
|
</target>
|
|
|
|
|
2015-03-23 09:45:04 +01:00
|
|
|
<target name="unzip-with-ant-task" depends="untar-unzip-checksum" unless="${archive_file}_installed">
|
|
|
|
<echo>Unzipping ${archive_file} into folder ${dest_folder}</echo>
|
|
|
|
<mkdir dir="${dest_folder}" />
|
|
|
|
<unzip src="${archive_file}" dest="${dest_folder}"/>
|
|
|
|
</target>
|
|
|
|
|
2013-01-23 11:44:37 +01:00
|
|
|
<target name="linux-dist" depends="build"
|
2015-01-05 10:11:18 +01:00
|
|
|
description="Build .tar.xz of linux version">
|
2010-05-08 23:47:19 +02:00
|
|
|
|
2012-02-29 21:30:03 +01:00
|
|
|
<move file="linux/work" tofile="linux/arduino-${version}" />
|
|
|
|
|
2015-04-10 12:32:55 +02:00
|
|
|
<exec executable="tar" dir="linux" failonerror="true">
|
2015-01-05 10:11:18 +01:00
|
|
|
<arg value="--lzma"/>
|
2012-02-29 21:30:03 +01:00
|
|
|
<arg value="-c"/>
|
|
|
|
<arg value="-f"/>
|
2015-01-05 10:11:18 +01:00
|
|
|
<arg value="arduino-${version}-${platform}.tar.xz"/>
|
2012-02-29 21:30:03 +01:00
|
|
|
<arg value="arduino-${version}"/>
|
|
|
|
</exec>
|
|
|
|
|
|
|
|
<move file="linux/arduino-${version}" tofile="linux/work" />
|
2010-05-08 23:47:19 +02:00
|
|
|
|
|
|
|
<echo>
|
|
|
|
=======================================================
|
2013-01-23 11:44:37 +01:00
|
|
|
Arduino for Linux was built. Grab the archive from
|
2013-02-19 15:07:16 +01:00
|
|
|
|
2015-03-10 14:09:06 +01:00
|
|
|
linux/arduino-${version}-${platform}.tar.xz
|
2010-05-08 23:47:19 +02:00
|
|
|
=======================================================
|
|
|
|
</echo>
|
|
|
|
</target>
|
2011-02-17 02:21:43 +01:00
|
|
|
|
2013-01-23 11:44:37 +01:00
|
|
|
<target name="linux32-dist" depends="linux-dist"
|
2015-01-05 10:11:18 +01:00
|
|
|
description="Build .tar.xz of linux version" />
|
2013-01-23 11:44:37 +01:00
|
|
|
|
|
|
|
<target name="linux64-dist" depends="linux-dist"
|
2015-01-05 10:11:18 +01:00
|
|
|
description="Build .tar.xz of linux version" />
|
2013-01-23 11:44:37 +01:00
|
|
|
|
2010-05-08 23:47:19 +02:00
|
|
|
<!-- - - - - - - - -->
|
|
|
|
<!-- Windows -->
|
|
|
|
<!-- - - - - - - - -->
|
2013-01-23 11:44:37 +01:00
|
|
|
|
2010-05-08 23:47:19 +02:00
|
|
|
<target name="windows-clean" depends="subprojects-clean"
|
|
|
|
description="Clean windows version">
|
|
|
|
<delete dir="windows/work" />
|
2013-01-31 12:32:29 +01:00
|
|
|
<delete>
|
|
|
|
<fileset dir="windows" includes="arduino-*windows*.zip"/>
|
|
|
|
</delete>
|
2010-05-08 23:47:19 +02:00
|
|
|
</target>
|
2013-01-23 11:44:37 +01:00
|
|
|
|
2010-05-08 23:47:19 +02:00
|
|
|
<target name="windows-checkos" unless="windows">
|
|
|
|
<echo>
|
|
|
|
=======================================================
|
2010-05-09 01:20:52 +02:00
|
|
|
Arduino for Windows can only be built on windows.
|
2013-01-23 11:44:37 +01:00
|
|
|
|
|
|
|
Bye.
|
2010-05-08 23:47:19 +02:00
|
|
|
=======================================================
|
|
|
|
</echo>
|
2013-01-23 11:44:37 +01:00
|
|
|
|
2010-05-08 23:47:19 +02:00
|
|
|
<fail message="wrong platform (${os.name})" />
|
|
|
|
</target>
|
2013-01-23 11:44:37 +01:00
|
|
|
|
2014-02-20 12:25:53 +01:00
|
|
|
<target name="download-launch4j-windows">
|
2015-03-23 09:45:04 +01:00
|
|
|
<antcall target="unzip-with-ant-task">
|
2015-03-23 09:29:12 +01:00
|
|
|
<param name="archive_file" value="windows/launch4j-3.7-win32.zip"/>
|
2015-05-08 10:34:40 +02:00
|
|
|
<param name="archive_url" value="http://downloads.sourceforge.net/project/launch4j/launch4j-3/3.7/launch4j-3.7-win32.zip"/>
|
2015-03-23 09:29:12 +01:00
|
|
|
<param name="final_folder" value="windows/launcher/launch4j"/>
|
|
|
|
<param name="dest_folder" value="windows/launcher/"/>
|
|
|
|
</antcall>
|
2014-02-20 12:25:53 +01:00
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="download-launch4j-linux">
|
2015-03-23 09:29:12 +01:00
|
|
|
<antcall target="untar">
|
|
|
|
<param name="archive_file" value="windows/launch4j-3.7-linux.tgz"/>
|
2015-05-08 10:34:40 +02:00
|
|
|
<param name="archive_url" value="http://downloads.sourceforge.net/project/launch4j/launch4j-3/3.7/launch4j-3.7-linux.tgz"/>
|
2015-03-23 09:29:12 +01:00
|
|
|
<param name="final_folder" value="windows/launcher/launch4j"/>
|
|
|
|
<param name="dest_folder" value="windows/launcher/"/>
|
|
|
|
</antcall>
|
2014-02-20 12:25:53 +01:00
|
|
|
</target>
|
|
|
|
|
2013-01-23 11:44:37 +01:00
|
|
|
<target name="windows-build"
|
|
|
|
depends="revision-check, windows-checkos, subprojects-build"
|
2010-05-08 23:47:19 +02:00
|
|
|
description="Build windows version">
|
|
|
|
<mkdir dir="windows/work" />
|
2014-05-16 01:07:45 +02:00
|
|
|
<mkdir dir="windows/work/${staging_hardware_folder}" />
|
2013-01-23 11:44:37 +01:00
|
|
|
|
2010-05-08 23:47:19 +02:00
|
|
|
<!-- assemble the pde -->
|
|
|
|
<mkdir dir="windows/work/lib" />
|
|
|
|
<copy todir="windows/work/lib" flatten="true">
|
|
|
|
<fileset refid="runtime.jars" />
|
|
|
|
</copy>
|
2013-01-23 11:44:37 +01:00
|
|
|
|
2010-05-08 23:47:19 +02:00
|
|
|
<copy todir="windows/work">
|
|
|
|
<fileset dir="shared" includes="lib/**" />
|
|
|
|
<fileset file="shared/revisions.txt" />
|
|
|
|
</copy>
|
2013-01-23 11:44:37 +01:00
|
|
|
|
2013-02-04 16:56:26 +01:00
|
|
|
<fixcrlf file="windows/work/revisions.txt" eol="dos"/>
|
2013-10-14 18:26:59 +02:00
|
|
|
<fixcrlf file="windows/work/lib/formatter.conf" eol="dos"/>
|
2013-02-04 16:56:26 +01:00
|
|
|
|
2010-05-09 01:20:52 +02:00
|
|
|
<copy todir="windows/work">
|
|
|
|
<fileset dir="windows/dist" includes="*.dll" />
|
|
|
|
</copy>
|
2013-01-23 11:44:37 +01:00
|
|
|
|
2010-05-09 01:20:52 +02:00
|
|
|
<copy todir="windows/work">
|
|
|
|
<fileset dir="windows/dist" includes="drivers/**" />
|
|
|
|
</copy>
|
2013-01-23 11:44:37 +01:00
|
|
|
|
2015-03-05 17:42:26 +01:00
|
|
|
<antcall target="windows-build-avr-toolchain" />
|
|
|
|
|
2014-10-08 17:10:47 +02:00
|
|
|
<antcall target="unzip">
|
2014-11-21 11:07:30 +01:00
|
|
|
<param name="archive_file" value="./libastylej-2.05.zip" />
|
2015-04-09 12:12:10 +02:00
|
|
|
<param name="archive_url" value="http://downloads.arduino.cc/libastylej-2.05.zip" />
|
2014-10-08 17:10:47 +02:00
|
|
|
<param name="final_folder" value="${staging_folder}/libastylej" />
|
|
|
|
<param name="dest_folder" value="${staging_folder}" />
|
|
|
|
</antcall>
|
2013-10-14 17:31:35 +02:00
|
|
|
<copy file="windows/libastylej/AStylej.dll" todir="windows/work/lib" />
|
2015-01-19 19:38:08 +01:00
|
|
|
<copy file="windows/msvcp100.dll" todir="windows/work" />
|
|
|
|
<copy file="windows/msvcr100.dll" todir="windows/work" />
|
2013-10-14 17:31:35 +02:00
|
|
|
|
2014-05-16 01:07:45 +02:00
|
|
|
<!-- Copy listComPort.exe tool -->
|
2012-04-02 18:30:53 +02:00
|
|
|
<copy todir="windows/work/hardware/tools">
|
2013-02-04 15:09:01 +01:00
|
|
|
<fileset file="windows/listComPorts.exe" />
|
2012-04-02 18:30:53 +02:00
|
|
|
</copy>
|
|
|
|
<chmod perm="755">
|
2013-02-04 15:09:01 +01:00
|
|
|
<fileset file="windows/work/hardware/tools/listComPorts.exe" />
|
2012-04-02 18:30:53 +02:00
|
|
|
</chmod>
|
|
|
|
|
2010-05-08 23:47:19 +02:00
|
|
|
<antcall target="assemble">
|
|
|
|
<param name="target.path" value="windows/work" />
|
|
|
|
</antcall>
|
2013-01-23 11:44:37 +01:00
|
|
|
|
2015-03-23 09:29:12 +01:00
|
|
|
<delete dir="windows/launcher/launch4j"/>
|
2014-02-20 12:25:53 +01:00
|
|
|
<antcall target="download-${launch4j-download-unpack-target-name}" />
|
|
|
|
|
2010-05-08 23:47:19 +02:00
|
|
|
<property name="launch4j.dir" value="windows/launcher/launch4j/" />
|
2013-01-23 11:44:37 +01:00
|
|
|
<taskdef name="launch4j"
|
|
|
|
classname="net.sf.launch4j.ant.Launch4jTask"
|
2010-05-08 23:47:19 +02:00
|
|
|
classpath="${launch4j.dir}/launch4j.jar; ${launch4j.dir}/lib/xstream.jar" />
|
|
|
|
|
|
|
|
<copy todir="windows/work">
|
2013-01-23 11:44:37 +01:00
|
|
|
<fileset dir="windows/launcher"
|
2015-03-17 10:49:16 +01:00
|
|
|
includes="application.ico, config.xml, config_debug.xml, arduino.l4j.ini"/>
|
2010-05-08 23:47:19 +02:00
|
|
|
</copy>
|
2015-05-25 17:49:46 +02:00
|
|
|
<launch4j configFile="windows/work/config.xml" fileVersion="${revision}.0" txtFileVersion="${revision}" productVersion="${revision}.0" txtProductVersion="${revision}"/>
|
|
|
|
<launch4j configFile="windows/work/config_debug.xml" fileVersion="${revision}.0" txtFileVersion="${revision}" productVersion="${revision}.0" txtProductVersion="${revision}"/>
|
2015-03-17 10:49:16 +01:00
|
|
|
<delete dir="windows/work" includes="application.ico, config.xml, config_debug.xml" />
|
2015-02-27 11:54:16 +01:00
|
|
|
<copy file="windows/work/arduino.l4j.ini" tofile="windows/work/arduino_debug.l4j.ini" />
|
2010-05-08 23:47:19 +02:00
|
|
|
|
|
|
|
<!-- cygwin requires html, dll, and exe to have the +x flag -->
|
|
|
|
<chmod perm="755">
|
|
|
|
<fileset dir="windows/work" includes="**/*.html, **/*.dll, **/*.exe" />
|
|
|
|
</chmod>
|
2015-05-12 12:09:36 +02:00
|
|
|
|
|
|
|
<loadproperties srcfile="${WINDOWS_BUNDLED_JVM}/release" prefix="windows"/>
|
|
|
|
|
|
|
|
<fail message="It looks like ${WINDOWS_BUNDLED_JVM} does not contain a Windows JVM">
|
|
|
|
<condition>
|
|
|
|
<not>
|
|
|
|
<equals arg1="${windows.OS_NAME}" arg2=""Windows""/>
|
|
|
|
</not>
|
|
|
|
</condition>
|
|
|
|
</fail>
|
|
|
|
|
|
|
|
<copy todir="${staging_folder}/work/java" includeemptydirs="true" preservelastmodified="true" overwrite="true" failonerror="true">
|
|
|
|
<fileset dir="${WINDOWS_BUNDLED_JVM}" includes="*/**"/>
|
|
|
|
</copy>
|
2010-05-08 23:47:19 +02:00
|
|
|
</target>
|
2013-01-23 11:44:37 +01:00
|
|
|
|
2015-03-05 17:42:26 +01:00
|
|
|
<target name="windows-build-avr-toolchain">
|
|
|
|
<antcall target="avr-toolchain-bundle">
|
|
|
|
<param name="unpack_target" value="unzip"/>
|
2015-04-23 10:56:56 +02:00
|
|
|
<param name="gcc_archive_file" value="avr-gcc-4.8.1-arduino5-i686-mingw32.zip"/>
|
|
|
|
<param name="gcc_version" value="4.8.1-arduino5"/>
|
|
|
|
<param name="avrdude_archive_file" value="avrdude-6.0.1-arduino5-i686-mingw32.zip"/>
|
|
|
|
<param name="avrdude_version" value="6.0.1-arduino5"/>
|
2015-03-05 17:42:26 +01:00
|
|
|
</antcall>
|
2015-05-04 12:45:06 +02:00
|
|
|
|
|
|
|
<antcall target="package-library-index-json-bundle"/>
|
2015-03-05 17:42:26 +01:00
|
|
|
</target>
|
|
|
|
|
2015-05-11 10:48:52 +02:00
|
|
|
<target name="windows-run" depends="build"
|
2010-05-08 23:47:19 +02:00
|
|
|
description="Run windows version">
|
2015-05-15 08:59:42 +02:00
|
|
|
<exec executable="windows/work/arduino.exe" dir="windows/work" failonerror="true"/>
|
2010-05-08 23:47:19 +02:00
|
|
|
</target>
|
|
|
|
|
2015-05-11 10:48:52 +02:00
|
|
|
<target name="windows-dist" depends="build" description="Create .zip files of windows version">
|
2013-01-23 12:29:18 +01:00
|
|
|
<zip destfile="windows/arduino-${version}-${platform}.zip" level="9">
|
2015-03-13 13:21:49 +01:00
|
|
|
<zipfileset dir="windows/work" prefix="arduino-${version}"/>
|
2010-05-08 23:47:19 +02:00
|
|
|
</zip>
|
|
|
|
|
|
|
|
<echo>
|
|
|
|
=======================================================
|
2013-01-23 11:44:37 +01:00
|
|
|
Arduino for Windows was built. Grab the archive from
|
2013-02-19 15:07:16 +01:00
|
|
|
|
2013-01-31 12:32:29 +01:00
|
|
|
windows/arduino-${version}-${platform}.zip
|
2010-05-08 23:47:19 +02:00
|
|
|
=======================================================
|
|
|
|
</echo>
|
|
|
|
</target>
|
2013-01-23 11:44:37 +01:00
|
|
|
|
2010-10-04 03:21:27 +02:00
|
|
|
|
|
|
|
<!-- - - - - - - - -->
|
|
|
|
<!-- Source -->
|
|
|
|
<!-- - - - - - - - -->
|
2013-01-23 11:44:37 +01:00
|
|
|
|
2010-10-04 03:21:27 +02:00
|
|
|
<target name="source-dist" depends="revision-check"
|
|
|
|
description="Build .tar.gz of source code">
|
2013-01-23 11:44:37 +01:00
|
|
|
<input message="Enter version number:"
|
2010-10-04 03:21:27 +02:00
|
|
|
addproperty="version"
|
|
|
|
defaultvalue="${revision}" />
|
|
|
|
|
|
|
|
<tar compression="gzip" destfile="arduino-${version}-src.tar.gz">
|
2013-01-23 11:44:37 +01:00
|
|
|
<tarfileset dir="../"
|
|
|
|
prefix="arduino-${version}"
|
2010-10-04 03:21:27 +02:00
|
|
|
excludes="**/*.tgz,
|
2012-04-09 01:17:03 +02:00
|
|
|
**/*.bz2,
|
2012-08-23 17:16:26 +02:00
|
|
|
**/build/macosx/,
|
|
|
|
**/build/windows/,
|
2010-10-04 03:21:27 +02:00
|
|
|
**/work/,
|
|
|
|
**/.git/,
|
|
|
|
**/*.class"
|
2013-01-23 11:44:37 +01:00
|
|
|
/>
|
2010-10-04 03:21:27 +02:00
|
|
|
</tar>
|
|
|
|
|
|
|
|
<echo>
|
|
|
|
=======================================================
|
2013-01-23 11:44:37 +01:00
|
|
|
Arduino source distribution was built. Grab the archive from
|
|
|
|
|
2010-10-04 03:21:27 +02:00
|
|
|
arduino-${version}-src.tar.gz
|
|
|
|
=======================================================
|
|
|
|
</echo>
|
|
|
|
</target>
|
2013-01-23 11:44:37 +01:00
|
|
|
|
2010-10-04 03:21:27 +02:00
|
|
|
|
2010-05-08 23:47:19 +02:00
|
|
|
<!-- - - - - - - - -->
|
|
|
|
<!-- Run It! -->
|
|
|
|
<!-- - - - - - - - -->
|
2013-01-23 11:44:37 +01:00
|
|
|
|
|
|
|
<target name="clean" description="Perform a spring cleaning"
|
2010-05-08 23:47:19 +02:00
|
|
|
depends="linux-clean, windows-clean, macosx-clean, subprojects-clean">
|
|
|
|
</target>
|
|
|
|
|
2015-03-05 17:42:26 +01:00
|
|
|
<target name="avr-toolchain-bundle" unless="light_bundle">
|
|
|
|
<!-- Unzip AVR tools -->
|
2015-03-31 17:00:01 +02:00
|
|
|
<mkdir dir="${staging_folder}/work/${staging_hardware_folder}/tmp/gcc"/>
|
2015-03-05 17:42:26 +01:00
|
|
|
|
|
|
|
<antcall target="${unpack_target}">
|
|
|
|
<param name="archive_file" value="${staging_folder}/${gcc_archive_file}"/>
|
2015-04-09 12:12:10 +02:00
|
|
|
<param name="archive_url" value="http://downloads.arduino.cc/tools/${gcc_archive_file}"/>
|
2015-03-31 17:00:01 +02:00
|
|
|
<param name="final_folder" value="${staging_folder}/work/${staging_hardware_folder}/tmp/gcc/${gcc_version}/"/>
|
|
|
|
<param name="dest_folder" value="${staging_folder}/work/${staging_hardware_folder}/tmp/gcc/"/>
|
2015-03-05 17:42:26 +01:00
|
|
|
</antcall>
|
2015-03-31 17:00:01 +02:00
|
|
|
|
|
|
|
<mkdir dir="${staging_folder}/work/${staging_hardware_folder}/tmp/avrdude"/>
|
2015-03-05 17:42:26 +01:00
|
|
|
|
|
|
|
<antcall target="${unpack_target}">
|
|
|
|
<param name="archive_file" value="${staging_folder}/${avrdude_archive_file}"/>
|
2015-04-09 12:12:10 +02:00
|
|
|
<param name="archive_url" value="http://downloads.arduino.cc/tools/${avrdude_archive_file}"/>
|
2015-03-31 17:00:01 +02:00
|
|
|
<param name="final_folder" value="${staging_folder}/work/${staging_hardware_folder}/tmp/avrdude/${avrdude_version}"/>
|
|
|
|
<param name="dest_folder" value="${staging_folder}/work/${staging_hardware_folder}/tmp/avrdude/"/>
|
2015-03-05 17:42:26 +01:00
|
|
|
</antcall>
|
|
|
|
|
2015-03-31 17:00:01 +02:00
|
|
|
<move file="${staging_folder}/work/${staging_hardware_folder}/tmp/gcc/avr" tofile="${staging_folder}/work/${staging_hardware_folder}/tools/avr"/>
|
|
|
|
<move file="${staging_folder}/work/${staging_hardware_folder}/tmp/avrdude/avrdude-6.0.1" tofile="${staging_folder}/work/${staging_hardware_folder}/tools/avr"/>
|
|
|
|
<antcall target="macosx-fix-bundled-toolchain-missing-symlinks"/>
|
|
|
|
|
|
|
|
<echo append="true" file="${staging_folder}/work/${staging_hardware_folder}/tools/avr/builtin_tools_versions.txt" message="arduino.avrdude=${avrdude_version}${line.separator}"/>
|
|
|
|
<echo append="true" file="${staging_folder}/work/${staging_hardware_folder}/tools/avr/builtin_tools_versions.txt" message="arduino.avr-gcc=${gcc_version}${line.separator}"/>
|
2015-05-04 12:45:06 +02:00
|
|
|
</target>
|
2015-03-31 17:00:01 +02:00
|
|
|
|
2015-05-04 12:45:06 +02:00
|
|
|
<target name="package-library-index-json-bundle">
|
2015-04-28 14:53:58 +02:00
|
|
|
<mkdir dir="${staging_folder}/work/${staging_hardware_folder}/../dist/"/>
|
2015-04-30 11:38:21 +02:00
|
|
|
|
|
|
|
<get src="http://downloads.arduino.cc/packages/package_index.json.gz" dest="${staging_folder}/work/${staging_hardware_folder}/../dist/" verbose="true" skipexisting="false" />
|
|
|
|
<gunzip src="${staging_folder}/work/${staging_hardware_folder}/../dist/package_index.json.gz" dest="${staging_folder}/work/${staging_hardware_folder}/../dist/"/>
|
|
|
|
<delete file="${staging_folder}/work/${staging_hardware_folder}/../dist/package_index.json.gz"/>
|
|
|
|
|
|
|
|
<get src="http://downloads.arduino.cc/packages/package_index.json.sig" dest="${staging_folder}/work/${staging_hardware_folder}/../dist/" verbose="true" skipexisting="false" />
|
|
|
|
|
|
|
|
<get src="http://downloads.arduino.cc/libraries/library_index.json.gz" dest="${staging_folder}/work/${staging_hardware_folder}/../dist/" verbose="true" skipexisting="false" />
|
|
|
|
<gunzip src="${staging_folder}/work/${staging_hardware_folder}/../dist/library_index.json.gz" dest="${staging_folder}/work/${staging_hardware_folder}/../dist/"/>
|
|
|
|
<delete file="${staging_folder}/work/${staging_hardware_folder}/../dist/library_index.json.gz"/>
|
2015-03-31 17:00:01 +02:00
|
|
|
|
|
|
|
<delete dir="${staging_folder}/work/${staging_hardware_folder}/tmp"/>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="macosx-fix-bundled-toolchain-missing-symlinks" if="macosx">
|
2015-04-10 12:32:55 +02:00
|
|
|
<exec executable="mv" failonerror="true">
|
2015-03-31 17:00:01 +02:00
|
|
|
<arg value="${staging_folder}/work/${staging_hardware_folder}/tmp/avrdude/avrdude-6.0.1/lib/libusb.dylib"/>
|
|
|
|
<arg value="${staging_folder}/work/${staging_hardware_folder}/tools/avr/lib/"/>
|
|
|
|
</exec>
|
2015-04-10 12:32:55 +02:00
|
|
|
<exec executable="mv" failonerror="true">
|
2015-03-31 17:00:01 +02:00
|
|
|
<arg value="${staging_folder}/work/${staging_hardware_folder}/tmp/avrdude/avrdude-6.0.1/lib/libusb-1.0.dylib"/>
|
|
|
|
<arg value="${staging_folder}/work/${staging_hardware_folder}/tools/avr/lib/"/>
|
|
|
|
</exec>
|
2015-03-05 17:42:26 +01:00
|
|
|
</target>
|
|
|
|
|
2015-05-11 10:48:52 +02:00
|
|
|
<target name="generate-hourly-build-txt" if="hourly">
|
|
|
|
<echo file="${staging_folder}/work/${staging_hardware_folder}/../lib/hourlyBuild.txt">${BUILD_DATE}</echo>
|
|
|
|
</target>
|
|
|
|
|
2010-05-08 23:47:19 +02:00
|
|
|
</project>
|