2010-05-08 21:47:19 +00:00
<?xml version="1.0"?>
<project name= "Arduino" default= "build" >
2011-02-16 20:21:43 -05: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 21:47:19 +00: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-07-06 09:25:37 +02:00
<condition property= "macosx-old" > <equals arg1= "${platform}" arg2= "macosx-old" /> </condition>
<fail if= "macosx-old" message= "MacOSX older than 10.7 are not supported" />
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>
2016-02-02 17:00:49 +01:00
<condition property= "platform" value= "linuxarm" > <os family= "unix" arch= "arm" /> </condition>
2018-03-13 16:30:38 -06:00
<condition property= "platform" value= "linuxaarch64" > <os family= "unix" arch= "aarch64" /> </condition>
2010-05-08 21:47:19 +00:00
2017-03-09 15:47:16 +02:00
<condition property= "windows_host" value= "true" > <os family= "windows" /> </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>
2016-02-02 17:00:49 +01:00
<condition property= "linux" > <equals arg1= "${platform}" arg2= "linuxarm" /> </condition>
2018-03-13 16:30:38 -06:00
<condition property= "linux" > <equals arg1= "${platform}" arg2= "linuxaarch64" /> </condition>
2013-08-08 14:52:49 +02:00
<condition property= "staging_folder" value= "macosx" > <equals arg1= "${platform}" arg2= "macosx" /> </condition>
<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>
2016-02-02 17:00:49 +01:00
<condition property= "staging_folder" value= "linux" > <equals arg1= "${platform}" arg2= "linuxarm" /> </condition>
2018-03-13 16:30:38 -06:00
<condition property= "staging_folder" value= "linux" > <equals arg1= "${platform}" arg2= "linuxaarch64" /> </condition>
2013-08-08 14:52:49 +02:00
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>
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>
2016-02-02 17:00:49 +01:00
<condition property= "staging_hardware_folder" value= "hardware" > <equals arg1= "${platform}" arg2= "linuxarm" /> </condition>
2018-03-13 16:30:38 -06:00
<condition property= "staging_hardware_folder" value= "hardware" > <equals arg1= "${platform}" arg2= "linuxaarch64" /> </condition>
2010-05-08 21:47:19 +00:00
2013-07-29 10:57:28 +02:00
<condition property= "arch-bits" value= "32" >
<equals arg1= "${platform}" arg2= "linux32" />
</condition>
2015-12-05 12:51:11 +01:00
<condition property= "arch-bits" value= "32" >
2016-02-02 17:00:49 +01:00
<equals arg1= "${platform}" arg2= "linuxarm" />
2015-12-05 12:51:11 +01:00
</condition>
2013-07-29 10:57:28 +02:00
<condition property= "arch-bits" value= "64" >
<equals arg1= "${platform}" arg2= "linux64" />
</condition>
2018-06-04 12:58:33 +00:00
<condition property= "arch-bits" value= "64" >
2018-03-13 16:30:38 -06:00
<equals arg1= "${platform}" arg2= "linuxaarch64" />
</condition>
2010-05-08 21:47:19 +00: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-06-09 17:38:09 +02:00
<property name= "LINUX32_BUNDLED_JVM" value= "none" />
<property name= "LINUX64_BUNDLED_JVM" value= "none" />
2016-02-02 17:00:49 +01:00
<property name= "LINUXARM_BUNDLED_JVM" value= "none" />
2018-12-06 15:05:10 +01:00
<property name= "LINUXAARCH64_BUNDLED_JVM" value= "none" />
2015-06-09 17:38:09 +02:00
<condition property= "linux-bundle-jvm-task" value= "noop" >
<and >
<equals arg1= "${LINUX32_BUNDLED_JVM}" arg2= "none" />
<equals arg1= "${LINUX64_BUNDLED_JVM}" arg2= "none" />
2016-02-02 17:00:49 +01:00
<equals arg1= "${LINUXARM_BUNDLED_JVM}" arg2= "none" />
2018-12-06 15:05:10 +01:00
<equals arg1= "${LINUXAARCH64_BUNDLED_JVM}" arg2= "none" />
2015-06-09 17:38:09 +02:00
</and>
</condition>
<condition property= "linux-bundle-jvm-task" value= "bundle" >
<or >
<not >
<equals arg1= "${LINUX32_BUNDLED_JVM}" arg2= "none" />
</not>
<not >
<equals arg1= "${LINUX64_BUNDLED_JVM}" arg2= "none" />
</not>
2016-02-02 17:00:49 +01:00
<not >
<equals arg1= "${LINUXARM_BUNDLED_JVM}" arg2= "none" />
</not>
2018-12-06 15:05:10 +01:00
<not >
<equals arg1= "${LINUXAARCH64_BUNDLED_JVM}" arg2= "none" />
</not>
2015-06-09 17:38:09 +02:00
</or>
</condition>
2015-03-30 13:22:43 +02:00
2015-12-03 16:34:25 +01:00
<property name= "portable" value= "false" />
2021-01-27 19:20:32 +01:00
<property name= "ARDUINO-BUILDER-VERSION" value= "1.5.6" />
2019-12-17 01:30:14 +01:00
<property name= "LIBLISTSERIAL-VERSION" value= "1.4.2-2" />
2020-06-12 11:47:55 +02:00
<property name= "AVRGCC-VERSION" value= "7.3.0-atmel3.6.1-arduino7" />
2019-06-14 16:38:54 +02:00
<property name= "AVRDUDE-VERSION" value= "6.3.0-arduino17" />
2020-06-12 11:47:55 +02:00
<property name= "AVRCORE-VERSION" value= "1.8.3" />
2019-06-14 16:38:54 +02:00
<property name= "arduinoOTA-VERSION" value= "1.3.0" />
2021-05-07 15:00:42 +02:00
<property name= "WIFI101-FW-UPDATER_VERSION" value= "0.11.0" />
2020-09-07 04:18:20 -07:00
<!-- https://github.com/arduino/built - in - examples -->
<property name= "BUILT-IN-EXAMPLES-VERSION" value= "1.9.0" />
2015-09-21 13:22:41 +02:00
2010-05-08 21:47:19 +00: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 21:47:19 +00: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 21:47:19 +00:00
</fileset>
2019-03-21 02:33:26 +01:00
<!-- Remove all default excludes for directory tasks (see https://ant.apache.org/manual/dirtasks.html#defaultexcludes) -->
<defaultexcludes remove= "**/.git" />
<defaultexcludes remove= "**/.git/**" />
<defaultexcludes remove= "**/.gitattributes" />
<defaultexcludes remove= "**/.gitignore" />
<defaultexcludes remove= "**/.gitmodules" />
<defaultexcludes remove= "**/.hg" />
<defaultexcludes remove= "**/.hg/**" />
<defaultexcludes remove= "**/.hgignore" />
<defaultexcludes remove= "**/.hgsub" />
<defaultexcludes remove= "**/.hgsubstate" />
<defaultexcludes remove= "**/.hgtags" />
<defaultexcludes remove= "**/.bzr" />
<defaultexcludes remove= "**/.bzr/**" />
<defaultexcludes remove= "**/.bzrignore" />
2010-05-08 21:47:19 +00:00
<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 21:47:19 +00:00
</target>
2015-09-30 09:55:18 +02:00
<target name= "run" description= "Packs and runs Arduino" >
2010-05-08 21:47:19 +00:00
<antcall target= "${platform}-run" />
</target>
2015-09-30 09:55:18 +02:00
<target name= "start" description= "Starts Arduino" >
<antcall target= "${platform}-start" />
</target>
2015-12-03 16:34:25 +01:00
<target name= "dist" depends= "revision-check" description= "Build Arduino for distribution." >
<input message= "Enter version number:" addproperty= "version" defaultvalue= "${revision}" />
<condition property= "full-version" value= "${version}-${platform}" >
<not >
<equals arg1= "${portable}" arg2= "true" />
</not>
</condition>
<condition property= "full-version" value= "${version}-${platform}-portable" >
<equals arg1= "${portable}" arg2= "true" />
</condition>
<antcall target= "${platform}-dist" >
<param name= "full-version" value= "${full-version}" />
</antcall>
2010-05-08 21:47:19 +00:00
</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
2020-05-06 17:46:09 +02:00
<target name= "test" depends= "subprojects-build, subprojects-test" />
2013-02-19 15:07:16 +01:00
2010-05-08 21:47:19 +00:00
<!-- - - - - - - - - - - - - - - - - - -->
<!-- Subprojects: Core, App, Libraries -->
<!-- - - - - - - - - - - - - - - - - - -->
2013-01-23 11:44:37 +01:00
2010-05-08 21:47:19 +00:00
<target name= "subprojects-clean" >
2014-09-24 11:35:30 +02:00
<subant buildpath= "../arduino-core" target= "clean" />
2010-05-08 21:47:19 +00:00
<subant buildpath= "../app" target= "clean" />
</target>
2013-01-23 11:44:37 +01:00
2010-05-08 21:47:19 +00:00
<target name= "subprojects-build" >
2014-09-24 11:35:30 +02:00
<subant buildpath= "../arduino-core" target= "build" />
2010-05-08 21:47:19 +00: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" >
2020-05-05 21:52:39 +02:00
<subant buildpath= "../app" target= "test" >
<propertyset >
<!-- Forward these to subant. Use propertyset/propertyref instead of a direct property so we do not need to specify a value -->
<propertyref name= "single-test-class" />
<propertyref name= "single-test-methods" />
2020-05-07 23:17:51 +02:00
<propertyref name= "running-from-github-actions" />
2020-05-05 21:52:39 +02:00
</propertyset>
</subant>
2013-02-19 15:07:16 +01:00
</target>
2010-05-08 21:47:19 +00:00
<!-- - - - - - - - - -->
<!-- Basic Assembly -->
<!-- - - - - - - - - -->
2013-01-23 11:44:37 +01:00
2010-05-08 21:47:19 +00: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 21:47:19 +00:00
<!-- copy shared tools folder -->
<copy todir= "${target.path}/tools" >
<fileset dir= "shared/tools" />
</copy>
2013-01-23 11:44:37 +01:00
2015-08-03 17:06:21 +02:00
<copy file= "shared/icons/48x48/apps/arduino.png" tofile= "${target.path}/lib/arduino_small.png" />
2015-03-05 17:42:26 +01:00
<antcall target= "assemble-hardware" />
2020-09-07 04:18:20 -07:00
<antcall target= "assemble-examples" />
2013-01-23 11:44:37 +01:00
2015-06-17 16:28:55 +02:00
<mkdir dir= "${target.path}/reference" />
2016-10-04 00:02:42 +02:00
<antcall target= "assemble-docs" />
2016-08-28 14:44:49 +02:00
2010-05-08 21:47:19 +00: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" />
2016-07-22 14:55:26 +02:00
<!-- Add WiFi101 updater tool -->
<antcall target= "unzip" >
2021-05-07 15:00:42 +02:00
<param name= "archive_file" value= "shared/WiFi101-Updater-ArduinoIDE-Plugin-${WIFI101-FW-UPDATER_VERSION}.zip" />
<param name= "archive_url" value= "https://github.com/arduino-libraries/WiFi101-FirmwareUpdater-Plugin/releases/download/v${WIFI101-FW-UPDATER_VERSION}/WiFi101-Updater-ArduinoIDE-Plugin-${WIFI101-FW-UPDATER_VERSION}.zip" />
2016-07-22 14:55:26 +02:00
<param name= "final_folder" value= "${target.path}/tools/WiFi101" />
<param name= "dest_folder" value= "${target.path}/tools/" />
</antcall>
2010-05-08 21:47:19 +00:00
</target>
2020-09-07 04:18:20 -07:00
<target name= "assemble-examples" >
<!-- Add the built - in example sketches -->
<property name= "BUILT-IN-EXAMPLES-REPOSITORY-OWNER" value= "arduino" />
<property name= "BUILT-IN-EXAMPLES-REPOSITORY-NAME" value= "arduino-examples" />
<property name= "BUILT-IN-EXAMPLES-STAGING-PATH" value= "shared" />
<property name= "BUILT-IN-EXAMPLES-FINAL-PATH" value= "${target.path}/examples" />
<!-- Download built - in examples from repository -->
<antcall target= "unzip" >
<param name= "archive_file" value= "${BUILT-IN-EXAMPLES-REPOSITORY-NAME}-${BUILT-IN-EXAMPLES-VERSION}.zip" />
<param name= "archive_url" value= "https://github.com/${BUILT-IN-EXAMPLES-REPOSITORY-OWNER}/${BUILT-IN-EXAMPLES-REPOSITORY-NAME}/archive/${BUILT-IN-EXAMPLES-VERSION}.zip" />
2020-10-08 21:52:51 -07:00
<!-- Because the presence of this folder determines whether the extraction happens, this must point to a version - dependent path, otherwise updates will fail -->
<param name= "final_folder" value= "${BUILT-IN-EXAMPLES-STAGING-PATH}/${BUILT-IN-EXAMPLES-REPOSITORY-NAME}-${BUILT-IN-EXAMPLES-VERSION}/examples" />
2020-09-07 04:18:20 -07:00
<param name= "dest_folder" value= "${BUILT-IN-EXAMPLES-STAGING-PATH}" />
</antcall>
<!-- Copy examples from subfolder of the downloaded repository -->
<copy todir= "${BUILT-IN-EXAMPLES-FINAL-PATH}" >
<fileset dir= "${BUILT-IN-EXAMPLES-STAGING-PATH}/${BUILT-IN-EXAMPLES-REPOSITORY-NAME}-${BUILT-IN-EXAMPLES-VERSION}/examples" />
</copy>
</target>
2016-10-04 00:02:42 +02:00
<target name= "assemble-docs" unless= "no_docs" >
<!-- Unzip documentation -->
<antcall target= "unzip" >
<param name= "archive_file" value= "shared/reference-1.6.6-3.zip" />
2016-10-04 00:06:25 +02:00
<param name= "archive_url" value= "https://downloads.arduino.cc/reference-1.6.6-3.zip" />
2016-10-04 00:02:42 +02:00
<param name= "final_folder" value= "${target.path}/reference/www.arduino.cc" />
<param name= "dest_folder" value= "${target.path}/reference/" />
</antcall>
</target>
2015-03-05 17:42:26 +01:00
<!-- copy library folder -->
<target name= "assemble-libraries" unless= "light_bundle" >
2018-08-22 16:51:51 +02:00
<download-library name= "Ethernet" version= "2.0.0" />
<download-library name= "GSM" version= "1.0.6" />
<download-library name= "Stepper" version= "1.1.3" />
<download-library name= "TFT" version= "1.0.6" />
<download-library name= "WiFi" version= "1.2.7" />
<download-library githubuser= "firmata" name= "arduino" version= "2.5.8" foldername= "Firmata" />
<download-library name= "Bridge" version= "1.7.0" />
2017-08-18 13:10:57 +02:00
<download-library name= "Robot_Control" version= "1.0.4" />
<download-library name= "Robot_Motor" version= "1.0.3" />
<download-library name= "RobotIRremote" version= "2.0.0" />
2020-01-23 10:27:59 +01:00
<download-library name= "SpacebrewYun" version= "1.0.2" />
2017-03-21 12:14:58 +01:00
<download-library name= "Temboo" version= "1.2.1" />
2015-09-24 11:33:16 +02:00
<download-library name= "Esplora" version= "1.0.4" />
2016-03-08 17:13:57 +01:00
<download-library name= "Mouse" version= "1.0.1" />
2018-08-22 16:51:51 +02:00
<download-library name= "Keyboard" version= "1.0.2" />
2020-01-23 10:27:59 +01:00
<download-library name= "SD" version= "1.2.4" />
<download-library name= "Servo" version= "1.1.6" />
2017-08-10 10:34:36 +02:00
<download-library name= "LiquidCrystal" version= "1.0.7" />
2020-01-23 10:27:59 +01:00
<download-library githubuser= "Adafruit" name= "Adafruit_CircuitPlayground" version= "1.10.4" foldername= "Adafruit_Circuit_Playground" />
2015-09-21 13:22:41 +02:00
</target>
2015-09-21 13:16:39 +02:00
2015-09-21 14:14:31 +02:00
<macrodef name= "download-library" >
<attribute name= "name" />
2017-07-19 10:29:46 +02:00
<attribute name= "foldername" default= "@{name}" />
2015-09-21 14:14:31 +02:00
<attribute name= "version" />
<attribute name= "tag" default= "@{version}" />
<attribute name= "githubuser" default= "arduino-libraries" />
<sequential >
<antcall target= "unzip" >
2018-08-22 16:51:51 +02:00
<param name= "archive_file" value= "@{foldername}-@{version}.zip" />
2015-09-21 14:14:31 +02:00
<param name= "archive_url" value= "https://github.com/@{githubuser}/@{name}/archive/@{tag}.zip" />
<param name= "final_folder" value= "${target.path}/libraries/@{name}-@{version}" />
<param name= "dest_folder" value= "${target.path}/libraries" />
</antcall>
2017-07-19 10:29:46 +02:00
<move file= "${target.path}/libraries/@{name}-@{version}" tofile= "${target.path}/libraries/@{foldername}" />
2015-09-21 14:14:31 +02:00
</sequential>
</macrodef>
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" >
2017-09-20 17:54:47 +02:00
<mkdir dir= "${target.path}/hardware/arduino" />
2019-03-20 04:49:20 +01:00
<antcall target= "untar-bz2" >
2017-09-20 17:54:47 +02:00
<param name= "archive_file" value= "avr-${AVRCORE-VERSION}.tar.bz2" />
<param name= "archive_url" value= "https://downloads.arduino.cc/cores/avr-${AVRCORE-VERSION}.tar.bz2" />
<param name= "final_folder" value= "${target.path}/hardware/arduino/avr" />
<param name= "dest_folder" value= "${target.path}/hardware/arduino" />
</antcall>
2018-05-15 10:39:11 +02:00
<copy file= "../hardware/package_index_bundled.json" todir= "${target.path}/hardware/" />
2015-03-05 17:42:26 +01:00
</target>
2010-05-08 21:47:19 +00:00
<!-- - - - - - - - - -->
<!-- Revision check -->
<!-- - - - - - - - - -->
2016-08-12 16:49:39 +02:00
<target name= "revision-check" >
2016-03-04 14:56:29 +01:00
<!-- figure out the latest AVR core version number in package_index.json -->
2016-08-12 16:49:39 +02:00
<loadfile srcfile= "../hardware/package_index_bundled.json" property= "revision.avr.index" >
2016-03-04 14:56:29 +01:00
<filterchain >
<tokenfilter >
<linetokenizer />
2016-05-13 14:11:20 +02:00
<containsregex pattern= "archiveFileName.*"avr-.......?tar.bz2" />
2016-03-04 14:56:29 +01:00
<replaceregex pattern= ".*avr-(.*).tar.bz2.*" flags= "g" replace= "\1" />
</tokenfilter>
2018-07-11 16:53:18 +02:00
<striplinebreaks />
2016-03-04 14:56:29 +01:00
<tailfilter lines= "1" />
</filterchain>
</loadfile>
2017-09-20 17:54:47 +02:00
<echo message= "AVR Arduino core version in build.xml is: ${AVRCORE-VERSION}" />
2016-08-11 10:46:28 +02:00
<echo message= " latest in package_index_bundled.json is: ${revision.avr.index}" />
2016-03-04 14:56:29 +01:00
<condition property= "revision.avr.ok" >
<or >
<!-- fail build if - Drevision.check=enforce is set -->
<not > <equals arg1= "${revision.check}" arg2= "enforce" /> </not>
2017-09-20 17:54:47 +02:00
<equals arg1= "${revision.avr.index}" arg2= "${AVRCORE-VERSION}" />
2016-03-04 14:56:29 +01:00
</or>
</condition>
<fail unless= "revision.avr.ok" >
2016-08-11 10:46:28 +02:00
Mismatching versions for bundled AVR core and package_index_bundled.json.
2017-09-20 17:54:47 +02:00
Please check your package_index_bundled.json.
2016-03-04 14:56:29 +01:00
</fail>
<!-- figure out the IDE version number -->
2013-01-24 14:42:51 +01:00
<loadfile srcfile= "shared/revisions.txt" property= "revision" >
2010-05-08 21:47:19 +00: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 21:47:19 +00:00
</filterchain>
</loadfile>
2013-01-23 11:44:37 +01:00
2016-03-04 14:56:29 +01:00
<!-- figure out the IDE version number in base.java -->
2014-09-24 11:35:30 +02:00
<loadfile srcfile= "../arduino-core/src/processing/app/BaseNoGui.java"
2010-05-08 21:47:19 +00: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 21:47:19 +00:00
</filterchain>
</loadfile>
2016-03-04 14:56:29 +01:00
<echo message= "Latest revision detected in shared/revision.txt is: ${revision}" />
2014-11-18 14:04:14 +01:00
<echo message= " Revision in BaseNoGui.java is: ${revision.base}" />
2010-05-08 21:47:19 +00:00
</target>
2013-01-23 11:44:37 +01:00
2010-05-08 21:47:19 +00:00
<!-- - - - - - - - -->
<!-- Mac OS X -->
<!-- - - - - - - - -->
2015-07-06 09:25:37 +02:00
<target name= "macosx-clean" depends= "subprojects-clean" description= "Clean Mac OS X build" >
2010-05-08 21:47:19 +00: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 21:47:19 +00:00
</target>
2013-01-23 11:44:37 +01:00
2010-05-08 21:47:19 +00: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 21:47:19 +00: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-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" >
2020-09-10 23:40:23 +02:00
<param name= "archive_file" value= "${staging_folder}/appbundler-1.0ea-arduino9.jar.zip" />
<param name= "archive_url" value= "https://downloads.arduino.cc/appbundler-1.0ea-arduino9.jar.zip" />
<param name= "final_folder" value= "${staging_folder}/appbundler-1.0ea-arduino9" />
<param name= "dest_folder" value= "${staging_folder}/appbundler-1.0ea-arduino9" />
2015-01-30 16:42:04 +01:00
</antcall>
2020-09-10 23:40:23 +02:00
<taskdef name= "bundleapp" classname= "com.oracle.appbundler.AppBundlerTask" classpath= "${staging_folder}/appbundler-1.0ea-arduino9/appbundler-1.0ea-arduino9.jar" />
2015-03-04 11:23:36 +01:00
<bundleapp
2015-03-25 11:08:05 +01:00
jvmRequired="1.8"
2015-06-26 08:57:51 +02:00
jrepreferred="true"
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"
2015-07-06 09:25:37 +02:00
icon="macosx/processing.icns"
2015-03-04 11:23:36 +01:00
mainclassname="processing.app.Base"
copyright="Arduino LLC"
2015-06-26 08:57:51 +02:00
applicationCategory="public.app-category.education"
2018-08-31 02:02:10 -07:00
minimumsystemversion="10.8"
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" />
2015-06-26 08:57:51 +02:00
<option value= "-Dapple.awt.application.name=Arduino" />
2015-01-30 16:42:04 +01:00
<option value= "-Dcom.apple.macos.use-file-dialog-packages=true" />
<option value= "-Dcom.apple.smallTabs=true" />
2015-06-26 08:57:51 +02:00
<option value= "-DAPP_DIR=$APP_ROOT/Contents/Java" />
2015-10-27 10:35:07 +01:00
<option value= "-Djava.ext.dirs=$JVM_RUNTIME/Contents/Home/lib/ext/:$JVM_RUNTIME/Contents/Home/jre/lib/ext/" />
2019-07-02 16:10:12 +02:00
<option value= "-Djava.net.preferIPv4Stack=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"
2015-07-06 09:25:37 +02:00
icon="macosx/pde.icns"
2015-01-30 16:42:04 +01:00
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>
2015-03-05 17:42:26 +01:00
<mkdir dir= "${staging_folder}/work" />
<mkdir dir= "${staging_folder}/work/${staging_hardware_folder}" />
2015-08-21 09:10:50 +02:00
<antcall target= "macosx-build-avr-toolchain" />
2015-01-30 16:42:04 +01:00
2010-05-08 21:47:19 +00: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 21:47:19 +00:00
</antcall>
2012-05-16 13:44:51 +02:00
2014-10-08 17:10:47 +02:00
<antcall target= "unzip" >
2019-12-16 21:00:38 +01:00
<param name= "archive_file" value= "./libastylej-2.05.1-5.zip" />
<param name= "archive_url" value= "https://downloads.arduino.cc/libastylej-2.05.1-5.zip" />
2015-07-06 13:31:15 +02:00
<param name= "final_folder" value= "${staging_folder}/libastylej-2.05.1" />
2014-10-08 17:10:47 +02:00
<param name= "dest_folder" value= "${staging_folder}" />
</antcall>
2015-07-06 13:31:15 +02:00
<copy file= "macosx/libastylej-2.05.1/libastylej.jnilib" todir= "macosx/work/${staging_hardware_folder}/../lib/" />
2015-01-30 16:42:04 +01:00
<chmod perm= "755" file= "macosx/work/${staging_hardware_folder}/../lib/libastylej.jnilib" />
2015-07-06 13:31:15 +02:00
<copy file= "macosx/libastylej-2.05.1/libastylej.jnilib" tofile= "macosx/work/${staging_hardware_folder}/../lib/libastylej.dylib" />
2015-01-30 16:42:04 +01:00
<chmod perm= "755" file= "macosx/work/${staging_hardware_folder}/../lib/libastylej.dylib" />
2015-12-18 18:16:38 +01:00
<antcall target= "unzip" >
2016-04-01 11:40:32 +02:00
<param name= "archive_file" value= "./liblistSerials-${LIBLISTSERIAL-VERSION}.zip" />
2016-10-04 00:06:25 +02:00
<param name= "archive_url" value= "https://downloads.arduino.cc/liblistSerials/liblistSerials-${LIBLISTSERIAL-VERSION}.zip" />
2016-04-01 11:40:32 +02:00
<param name= "final_folder" value= "${staging_folder}/liblistSerials-${LIBLISTSERIAL-VERSION}" />
2015-12-18 18:16:38 +01:00
<param name= "dest_folder" value= "${staging_folder}" />
</antcall>
2016-04-01 11:40:32 +02:00
<copy file= "macosx/liblistSerials-${LIBLISTSERIAL-VERSION}/osx/liblistSerialsj.dylib" todir= "macosx/work/${staging_hardware_folder}/../lib/" />
2015-12-18 18:16:38 +01:00
<chmod perm= "755" file= "macosx/work/${staging_hardware_folder}/../lib/liblistSerialsj.dylib" />
2020-02-12 12:21:12 +01:00
<property name= "ARDUINO-BUILDER-EXTRA-VERSION" value= "-signed" />
2016-12-29 15:38:41 +01:00
<antcall target= "build-arduino-builder" />
2015-08-31 16:05:23 +02:00
2015-12-03 16:34:25 +01:00
<antcall target= "portable-${portable}" >
<param name= "parentdir" value= "macosx/work/${staging_hardware_folder}/.." />
</antcall>
2015-01-30 16:42:04 +01:00
</target>
2015-03-05 17:42:26 +01:00
<!-- Unzip AVR tools -->
2015-08-21 09:10:50 +02:00
<target name= "macosx-build-avr-toolchain" unless= "light_bundle" >
2015-03-05 17:42:26 +01:00
<antcall target= "avr-toolchain-bundle" >
2019-03-22 09:19:43 +01:00
<param name= "unpack_target" value= "untar-native" />
2019-12-16 17:46:41 +01:00
<param name= "gcc_archive_file" value= "avr-gcc-${AVRGCC-VERSION}-x86_64-apple-darwin14-signed.tar.bz2" />
2016-06-03 16:45:11 +02:00
<param name= "gcc_version" value= "${AVRGCC-VERSION}" />
2019-12-16 17:46:41 +01:00
<param name= "avrdude_archive_file" value= "avrdude-${AVRDUDE-VERSION}-x86_64-apple-darwin12-signed.tar.bz2" />
2016-09-15 17:42:40 +02:00
<param name= "avrdude_version" value= "${AVRDUDE-VERSION}" />
2019-12-16 17:46:41 +01:00
<param name= "arduinoOTA_archive_file" value= "arduinoOTA-${arduinoOTA-VERSION}-darwin_amd64-signed.tar.bz2" />
2016-12-19 18:32:22 +01:00
<param name= "arduinoOTA_version" value= "${arduinoOTA-VERSION}" />
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-09-30 09:55:18 +02:00
<target name= "macosx-run" depends= "build,start" />
2015-01-30 16:42:04 +01:00
2015-09-30 09:55:18 +02:00
<target name= "macosx-start" >
<exec executable= "macosx/work/Arduino.app/Contents/MacOS/Arduino" spawn= "false" failonerror= "true" />
2011-06-06 21:48:12 -04: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 -->
2019-09-11 16:42:41 +02:00
<exec executable= "unzip" dir= "macosx/work" failonerror= "true" >
<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" >
2019-12-16 17:46:41 +01:00
<arg line= "--keychain "${macosx-sign-keychain}" --force -s "${macosx-sign-id}" --timestamp --options runtime --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" >
2015-12-03 16:34:25 +01:00
<arg line= "-q -r ../arduino-${full-version}-signed.zip ." />
2013-02-01 23:51:50 +01:00
</exec>
<echo >
=======================================================
Arduino for Mac OS X built and signed.
2015-12-03 16:34:25 +01:00
macosx/arduino-${full-version}-signed.zip
2013-02-01 23:51:50 +01:00
=======================================================
</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-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-04-10 12:32:55 +02:00
<exec executable= "zip" dir= "macosx/work" failonerror= "true" >
2015-12-03 16:34:25 +01:00
<arg line= "-q -r ../arduino-${full-version}.zip ." />
2011-11-28 17:36:03 -05: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-12-03 16:34:25 +01:00
macosx/arduino-${full-version}.zip
2011-11-28 17:36:03 -05:00
=======================================================
</echo>
</target>
2010-05-08 21:47:19 +00:00
<!-- - - - - - - - -->
<!-- Linux -->
<!-- - - - - - - - -->
2013-01-23 11:44:37 +01:00
2010-05-08 21:47:19 +00: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>
2015-08-31 16:05:23 +02:00
<delete >
<fileset dir= "linux" includes= "arduino-*linux*.tar.xz" />
</delete>
2010-05-08 21:47:19 +00:00
</target>
2013-01-23 11:44:37 +01:00
2010-05-08 21:47:19 +00:00
<target name= "linux-checkos" unless= "linux" >
<echo >
=======================================================
2015-05-20 21:58:36 +02:00
Arduino for Linux can only be built on unix systems.
2013-01-23 11:44:37 +01:00
Bye.
2010-05-08 21:47:19 +00:00
=======================================================
</echo>
2013-01-23 11:44:37 +01:00
2010-05-08 21:47:19 +00: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 21:47:19 +00: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 21:47:19 +00: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>
2015-05-20 21:58:36 +02:00
<copy todir= "linux/work/lib" >
<fileset dir= "shared" includes= "icons/**/*.png" />
</copy>
2010-05-08 21:47:19 +00:00
<copy todir= "linux/work/lib" flatten= "true" >
<fileset refid= "runtime.jars" />
</copy>
2013-01-23 11:44:37 +01:00
2010-05-08 21:47:19 +00:00
<antcall target= "assemble" >
<param name= "target.path" value= "linux/work" />
</antcall>
2015-05-20 21:58:36 +02:00
<copy tofile= "linux/work/lib/arduino-arduinoide.xml" file= "linux/dist/mime.xml" />
<copy todir= "linux/work/lib" file= "linux/dist/desktop.template" />
2016-01-12 12:28:43 +01:00
<copy todir= "linux/work/lib" file= "linux/dist/appdata.xml" />
2015-05-20 21:58:36 +02:00
2012-02-29 16:16:37 -05:00
<copy todir= "linux/work" file= "linux/dist/arduino" />
2015-04-22 13:47:39 -03:00
<copy todir= "linux/work" file= "linux/dist/install.sh" />
2017-03-10 12:30:59 +01:00
<copy todir= "linux/work" file= "linux/dist/arduino-linux-setup.sh" />
2015-05-20 21:58:36 +02:00
<copy todir= "linux/work" file= "linux/dist/uninstall.sh" />
2012-02-29 16:16:37 -05:00
2015-05-20 21:58:36 +02:00
<chmod perm= "ugo+x" >
<fileset dir= "linux/work" includes= "arduino" />
<fileset dir= "linux/work" includes= "**/*.sh" />
2017-07-27 11:03:27 -04:00
<fileset dir= "linux/work/lib" includes= "**/*desktop*" />
2015-05-20 21:58:36 +02:00
</chmod>
2015-12-05 12:51:11 +01:00
</target>
2013-10-14 17:31:35 +02:00
2015-12-05 12:51:11 +01:00
<target name= "linux-libastyle-x86" depends= "linux-build" description= "Download libastyle.so for x86/x64 arch" >
2014-10-08 17:10:47 +02:00
<antcall target= "unzip" >
2019-12-16 21:00:38 +01:00
<param name= "archive_file" value= "./libastylej-2.05.1-5.zip" />
<param name= "archive_url" value= "https://downloads.arduino.cc/libastylej-2.05.1-5.zip" />
2015-07-06 13:31:15 +02:00
<param name= "final_folder" value= "${staging_folder}/libastylej-2.05.1" />
2014-10-08 17:10:47 +02:00
<param name= "dest_folder" value= "${staging_folder}" />
</antcall>
2015-07-06 13:31:15 +02:00
<copy file= "linux/libastylej-2.05.1/libastylej${arch-bits}.so" tofile= "linux/work/lib/libastylej.so" />
2013-10-14 17:31:35 +02:00
<chmod perm= "755" file= "linux/work/lib/libastylej.so" />
2015-12-03 16:34:25 +01:00
<antcall target= "portable-${portable}" >
<param name= "parentdir" value= "linux/work" />
</antcall>
2015-12-18 18:16:38 +01:00
<antcall target= "unzip" >
2016-04-01 11:40:32 +02:00
<param name= "archive_file" value= "./liblistSerials-${LIBLISTSERIAL-VERSION}.zip" />
2016-10-04 00:06:25 +02:00
<param name= "archive_url" value= "https://downloads.arduino.cc/liblistSerials/liblistSerials-${LIBLISTSERIAL-VERSION}.zip" />
2016-04-01 11:40:32 +02:00
<param name= "final_folder" value= "${staging_folder}/liblistSerials-${LIBLISTSERIAL-VERSION}" />
2015-12-18 18:16:38 +01:00
<param name= "dest_folder" value= "${staging_folder}" />
</antcall>
2016-04-01 11:40:32 +02:00
<copy file= "linux/liblistSerials-${LIBLISTSERIAL-VERSION}/linux${arch-bits}/liblistSerialsj.so" todir= "linux/work/lib/" />
2015-12-18 18:16:38 +01:00
<chmod perm= "755" file= "linux/work/lib/liblistSerialsj.so" />
2010-05-08 21:47:19 +00:00
</target>
2011-02-16 20:21:43 -05:00
2015-12-05 12:51:11 +01:00
<target name= "linux-libastyle-arm" depends= "linux-build" description= "Download libastyle.so for ARM" >
<antcall target= "unzip" >
2019-12-16 21:00:38 +01:00
<param name= "archive_file" value= "./libastylej-2.05.1-5.zip" />
<param name= "archive_url" value= "https://downloads.arduino.cc/libastylej-2.05.1-5.zip" />
2015-12-05 12:51:11 +01:00
<param name= "final_folder" value= "${staging_folder}/libastylej-2.05.1" />
<param name= "dest_folder" value= "${staging_folder}" />
</antcall>
<copy file= "linux/libastylej-2.05.1/libastylej_arm.so" tofile= "linux/work/lib/libastylej.so" />
<chmod perm= "755" file= "linux/work/lib/libastylej.so" />
<antcall target= "portable-${portable}" >
<param name= "parentdir" value= "linux/work" />
</antcall>
<antcall target= "unzip" >
2016-04-08 18:54:57 +02:00
<param name= "archive_file" value= "./liblistSerials-${LIBLISTSERIAL-VERSION}.zip" />
2016-10-04 00:06:25 +02:00
<param name= "archive_url" value= "https://downloads.arduino.cc/liblistSerials/liblistSerials-${LIBLISTSERIAL-VERSION}.zip" />
2016-04-08 18:54:57 +02:00
<param name= "final_folder" value= "${staging_folder}/liblistSerials-${LIBLISTSERIAL-VERSION}" />
2015-12-05 12:51:11 +01:00
<param name= "dest_folder" value= "${staging_folder}" />
</antcall>
2016-04-08 18:54:57 +02:00
<copy file= "linux/liblistSerials-${LIBLISTSERIAL-VERSION}/arm/liblistSerialsj.so" todir= "linux/work/lib/" />
2015-12-05 12:51:11 +01:00
<chmod perm= "755" file= "linux/work/lib/liblistSerialsj.so" />
</target>
2016-02-02 17:00:49 +01:00
<target name= "linuxarm-build" depends= "linux-libastyle-arm" description= "Build linux (32-bit) version" >
2015-12-05 12:51:11 +01:00
<antcall target= "linux-jvm-${linux-bundle-jvm-task}" >
2016-02-02 17:00:49 +01:00
<param name= "JVM" value= "${LINUXARM_BUNDLED_JVM}" />
2015-12-05 12:51:11 +01:00
</antcall>
2016-12-29 15:38:41 +01:00
<antcall target= "build-arduino-builder" />
2015-12-05 12:51:11 +01:00
<antcall target= "avr-toolchain-bundle" >
2019-03-22 09:19:43 +01:00
<param name= "unpack_target" value= "untar-native" />
2019-06-14 16:38:54 +02:00
<param name= "gcc_archive_file" value= "avr-gcc-${AVRGCC-VERSION}-arm-linux-gnueabihf.tar.bz2" />
2016-06-03 16:45:11 +02:00
<param name= "gcc_version" value= "${AVRGCC-VERSION}" />
2016-09-15 17:42:40 +02:00
<param name= "avrdude_archive_file" value= "avrdude-${AVRDUDE-VERSION}-armhf-pc-linux-gnu.tar.bz2" />
<param name= "avrdude_version" value= "${AVRDUDE-VERSION}" />
2017-01-17 12:41:33 +01:00
<param name= "arduinoOTA_archive_file" value= "arduinoOTA-${arduinoOTA-VERSION}-linux_arm.tar.bz2" />
2016-12-19 18:32:22 +01:00
<param name= "arduinoOTA_version" value= "${arduinoOTA-VERSION}" />
2015-12-05 12:51:11 +01:00
</antcall>
</target>
2018-03-13 16:30:38 -06:00
<target name= "linux-libastyle-aarch64" depends= "linux-build" description= "Download libastyle.so for AArch64" >
<antcall target= "unzip" >
2019-12-16 21:00:38 +01:00
<param name= "archive_file" value= "./libastylej-2.05.1-5.zip" />
<param name= "archive_url" value= "https://downloads.arduino.cc/libastylej-2.05.1-5.zip" />
2018-03-13 16:30:38 -06:00
<param name= "final_folder" value= "${staging_folder}/libastylej-2.05.1" />
<param name= "dest_folder" value= "${staging_folder}" />
</antcall>
<copy file= "linux/libastylej-2.05.1/libastylej_aarch64.so" tofile= "linux/work/lib/libastylej.so" />
<chmod perm= "755" file= "linux/work/lib/libastylej.so" />
<antcall target= "portable-${portable}" >
<param name= "parentdir" value= "linux/work" />
</antcall>
<antcall target= "unzip" >
2018-06-04 12:42:54 +00:00
<param name= "archive_file" value= "./liblistSerials-${LIBLISTSERIAL-VERSION}.zip" />
2018-03-13 16:30:38 -06:00
<param name= "archive_url" value= "https://downloads.arduino.cc/liblistSerials/liblistSerials-${LIBLISTSERIAL-VERSION}.zip" />
<param name= "final_folder" value= "${staging_folder}/liblistSerials-${LIBLISTSERIAL-VERSION}" />
<param name= "dest_folder" value= "${staging_folder}" />
</antcall>
<copy file= "linux/liblistSerials-${LIBLISTSERIAL-VERSION}/aarch64/liblistSerialsj.so" todir= "linux/work/lib/" />
<chmod perm= "755" file= "linux/work/lib/liblistSerialsj.so" />
</target>
<target name= "linuxaarch64-build" depends= "linux-libastyle-aarch64" description= "Build Linux (AArch64) version" >
<antcall target= "linux-jvm-${linux-bundle-jvm-task}" >
2018-06-04 15:10:19 +02:00
<param name= "JVM" value= "${LINUXAARCH64_BUNDLED_JVM}" />
2018-03-13 16:30:38 -06:00
</antcall>
<antcall target= "build-arduino-builder" />
<antcall target= "avr-toolchain-bundle" >
2019-03-22 09:19:43 +01:00
<param name= "unpack_target" value= "untar-native" />
2018-03-13 16:30:38 -06:00
<param name= "gcc_archive_file" value= "avr-gcc-${AVRGCC-VERSION}-aarch64-pc-linux-gnu.tar.bz2" />
<param name= "gcc_version" value= "${AVRGCC-VERSION}" />
<param name= "avrdude_archive_file" value= "avrdude-${AVRDUDE-VERSION}-aarch64-pc-linux-gnu.tar.bz2" />
<param name= "avrdude_version" value= "${AVRDUDE-VERSION}" />
<param name= "arduinoOTA_archive_file" value= "arduinoOTA-${arduinoOTA-VERSION}-linux_aarch64.tar.bz2" />
<param name= "arduinoOTA_version" value= "${arduinoOTA-VERSION}" />
</antcall>
</target>
2015-12-05 12:51:11 +01:00
<target name= "linux32-build" depends= "linux-libastyle-x86" description= "Build linux (32-bit) version" >
2015-06-09 17:38:09 +02:00
<antcall target= "linux-jvm-${linux-bundle-jvm-task}" >
<param name= "JVM" value= "${LINUX32_BUNDLED_JVM}" />
</antcall>
2016-12-29 15:38:41 +01:00
<antcall target= "build-arduino-builder" />
2015-08-31 16:05:23 +02:00
2015-03-05 17:42:26 +01:00
<antcall target= "avr-toolchain-bundle" >
2019-03-22 09:19:43 +01:00
<param name= "unpack_target" value= "untar-native" />
2016-06-03 16:45:11 +02:00
<param name= "gcc_archive_file" value= "avr-gcc-${AVRGCC-VERSION}-i686-pc-linux-gnu.tar.bz2" />
<param name= "gcc_version" value= "${AVRGCC-VERSION}" />
2016-09-15 17:42:40 +02:00
<param name= "avrdude_archive_file" value= "avrdude-${AVRDUDE-VERSION}-i686-pc-linux-gnu.tar.bz2" />
<param name= "avrdude_version" value= "${AVRDUDE-VERSION}" />
2017-01-17 12:41:33 +01:00
<param name= "arduinoOTA_archive_file" value= "arduinoOTA-${arduinoOTA-VERSION}-linux_386.tar.bz2" />
2016-12-19 18:32:22 +01:00
<param name= "arduinoOTA_version" value= "${arduinoOTA-VERSION}" />
2015-03-05 17:42:26 +01:00
</antcall>
2010-05-08 21:47:19 +00:00
</target>
2011-02-16 20:21:43 -05:00
2015-12-05 12:51:11 +01:00
<target name= "linux64-build" depends= "linux-libastyle-x86" description= "Build linux (64-bit) version" >
2015-06-09 17:38:09 +02:00
<antcall target= "linux-jvm-${linux-bundle-jvm-task}" >
<param name= "JVM" value= "${LINUX64_BUNDLED_JVM}" />
</antcall>
2016-12-29 15:38:41 +01:00
<antcall target= "build-arduino-builder" />
2015-08-31 16:05:23 +02:00
2015-03-05 17:42:26 +01:00
<antcall target= "avr-toolchain-bundle" >
2019-03-22 09:19:43 +01:00
<param name= "unpack_target" value= "untar-native" />
2016-06-03 16:45:11 +02:00
<param name= "gcc_archive_file" value= "avr-gcc-${AVRGCC-VERSION}-x86_64-pc-linux-gnu.tar.bz2" />
<param name= "gcc_version" value= "${AVRGCC-VERSION}" />
2016-09-15 17:42:40 +02:00
<param name= "avrdude_archive_file" value= "avrdude-${AVRDUDE-VERSION}-x86_64-pc-linux-gnu.tar.bz2" />
<param name= "avrdude_version" value= "${AVRDUDE-VERSION}" />
2017-01-17 12:41:33 +01:00
<param name= "arduinoOTA_archive_file" value= "arduinoOTA-${arduinoOTA-VERSION}-linux_amd64.tar.bz2" />
2016-12-19 18:32:22 +01:00
<param name= "arduinoOTA_version" value= "${arduinoOTA-VERSION}" />
2015-03-05 17:42:26 +01:00
</antcall>
2011-02-16 20:21:43 -05:00
</target>
2013-01-23 11:44:37 +01:00
2015-06-09 17:38:09 +02:00
<target name= "linux-jvm-noop" />
<target name= "linux-jvm-bundle" >
<mkdir dir= "${staging_folder}/work/java" />
<exec executable= "rsync" >
<arg value= "-a" />
<arg value= "${JVM}" />
<arg value= "${staging_folder}/work/java/" />
</exec>
</target>
2015-09-30 09:55:18 +02:00
<target name= "linux32-run" depends= "build,start" />
<target name= "linux64-run" depends= "build,start" />
2016-02-02 17:00:49 +01:00
<target name= "linuxarm-run" depends= "build,start" />
2015-12-05 12:51:11 +01:00
2018-03-13 16:30:38 -06:00
<target name= "linuxaarch64-run" depends= "build,start" />
2015-09-30 09:55:18 +02:00
<target name= "linux32-start" >
2015-04-10 12:32:55 +02:00
<exec executable= "./linux/work/arduino" spawn= "false" failonerror= "true" />
2010-05-08 21:47:19 +00:00
</target>
2013-01-23 11:44:37 +01:00
2015-09-30 09:55:18 +02:00
<target name= "linux64-start" >
2015-04-10 12:32:55 +02:00
<exec executable= "./linux/work/arduino" spawn= "false" failonerror= "true" />
2011-02-16 20:21:43 -05:00
</target>
2016-02-02 17:00:49 +01:00
<target name= "linuxarm-start" >
2015-12-05 12:51:11 +01:00
<exec executable= "./linux/work/arduino" spawn= "false" failonerror= "true" />
</target>
2018-03-13 16:30:38 -06:00
<target name= "linuxaarch64-start" >
<exec executable= "./linux/work/arduino" spawn= "false" failonerror= "true" />
</target>
2016-12-29 15:38:41 +01:00
<target name= "build-arduino-builder" unless= "no_arduino_builder" >
2019-12-18 17:33:51 +01:00
<property name= "ARDUINO-BUILDER-EXTRA-VERSION" value= "" /> <!-- default if not set already -->
2016-12-29 15:38:41 +01:00
<delete dir= "${staging_folder}/arduino-builder-${platform}" includeemptydirs= "true" />
<mkdir dir= "${staging_folder}/arduino-builder-${platform}" />
2019-03-22 09:19:43 +01:00
<antcall target= "untar-native" >
2019-12-17 14:12:56 +01:00
<param name= "archive_file" value= "./arduino-builder-${platform}-${ARDUINO-BUILDER-VERSION}${ARDUINO-BUILDER-EXTRA-VERSION}.tar.bz2" />
<param name= "archive_url" value= "https://downloads.arduino.cc/tools/arduino-builder-${platform}-${ARDUINO-BUILDER-VERSION}${ARDUINO-BUILDER-EXTRA-VERSION}.tar.bz2" />
2016-12-29 15:38:41 +01:00
<param name= "final_folder" value= "${staging_folder}/arduino-builder-${platform}/arduino-builder" />
<param name= "dest_folder" value= "${staging_folder}/arduino-builder-${platform}" />
</antcall>
<copy file= "${staging_folder}/arduino-builder-${platform}/arduino-builder" tofile= "${staging_folder}/work/${staging_hardware_folder}/../arduino-builder" />
<chmod perm= "755" file= "${staging_folder}/work/${staging_hardware_folder}/../arduino-builder" />
<move file= "${staging_folder}/arduino-builder-${platform}/tools" tofile= "${staging_folder}/work/${staging_hardware_folder}/../tools-builder" />
<copy todir= "${staging_folder}/work/${staging_hardware_folder}" overwrite= "true" >
<fileset dir= "${staging_folder}/arduino-builder-${platform}/hardware" includes= "*.txt" />
</copy>
<delete dir= "${staging_folder}/arduino-builder-${platform}" includeemptydirs= "true" />
</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" >
2016-10-04 00:04:15 +02:00
<antcall target= "untar-unzip-download-web" />
<antcall target= "untar-unzip-download-local" />
</target>
<target name= "untar-unzip-download-web" unless= "local_sources" >
2014-10-08 15:50:32 +02:00
<get src= "${archive_url}" dest= "${archive_file}" verbose= "true" ignoreerrors= "true" />
2014-02-08 19:57:25 +01:00
</target>
2016-10-04 00:04:15 +02:00
<target name= "untar-unzip-download-local" if= "local_sources" >
<basename file= "${archive_file}" property= "basename" />
<echo > Skipping download of ${archive_url}, using makepkg downloaded ${basename}</echo>
<exec executable= "ln" failonerror= "true" >
<arg value= "-s" />
<arg value= "${basedir}/../../${basename}" />
<arg value= "${archive_file}" />
</exec>
</target>
2014-02-08 19:57:25 +01:00
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>
2019-03-20 04:49:20 +01:00
<untar src= "${archive_file}" dest= "${dest_folder}" />
2014-02-08 19:57:25 +01:00
</target>
2019-03-20 04:49:20 +01:00
<target name= "untar-bz2" depends= "untar-unzip-checksum" unless= "${archive_file}_installed" >
<echo > Untarring ${archive_file} into folder ${dest_folder}</echo>
<untar src= "${archive_file}" dest= "${dest_folder}" compression= "bzip2" />
2012-05-16 17:35:54 +02:00
</target>
2019-03-22 09:19:43 +01:00
<target name= "untar-native" 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-23 09:45:04 +01:00
<echo > Unzipping ${archive_file} into folder ${dest_folder}</echo>
<mkdir dir= "${dest_folder}" />
<unzip src= "${archive_file}" dest= "${dest_folder}" />
</target>
2017-03-09 15:47:16 +02:00
<!-- Ensure that the executable flag is set in all enviroments/OS -->
<target name= "make-file-executable" depends= "make-file-executable-windows" >
<chmod perm= "755" file= "${file}" />
</target>
<target name= "make-file-executable-windows" if= "windows_host" >
<exec executable= "icacls" failonerror= "false" >
<arg value= "${file}" />
<arg value= "/grant" />
<arg value= "Everyone:(RX)" />
</exec>
</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 21:47:19 +00:00
2012-02-29 15:30:03 -05: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 15:30:03 -05:00
<arg value= "-c" />
<arg value= "-f" />
2015-12-03 16:34:25 +01:00
<arg value= "arduino-${full-version}.tar.xz" />
2012-02-29 15:30:03 -05:00
<arg value= "arduino-${version}" />
</exec>
<move file= "linux/arduino-${version}" tofile= "linux/work" />
2010-05-08 21:47:19 +00: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-12-03 16:34:25 +01:00
linux/arduino-${full-version}.tar.xz
2010-05-08 21:47:19 +00:00
=======================================================
</echo>
</target>
2011-02-16 20:21:43 -05:00
2013-01-23 11:44:37 +01:00
<target name= "linux32-dist" depends= "linux-dist"
2016-02-02 17:00:49 +01:00
description="Build .tar.xz of linux x86_32 version" />
2013-01-23 11:44:37 +01:00
<target name= "linux64-dist" depends= "linux-dist"
2016-02-02 17:00:49 +01:00
description="Build .tar.xz of linux x86_64 version" />
2013-01-23 11:44:37 +01:00
2016-02-02 17:00:49 +01:00
<target name= "linuxarm-dist" depends= "linux-dist"
description="Build .tar.xz of linux armhf version" />
2015-12-05 12:51:11 +01:00
2018-03-13 16:30:38 -06:00
<target name= "linuxaarch64-dist" depends= "linux-dist"
description="Build .tar.xz of linux aarch64 version" />
2010-05-08 21:47:19 +00:00
<!-- - - - - - - - -->
<!-- Windows -->
<!-- - - - - - - - -->
2013-01-23 11:44:37 +01:00
2010-05-08 21:47:19 +00: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 21:47:19 +00:00
</target>
2013-01-23 11:44:37 +01:00
2010-05-08 21:47:19 +00:00
<target name= "windows-checkos" unless= "windows" >
<echo >
=======================================================
2010-05-08 23:20:52 +00:00
Arduino for Windows can only be built on windows.
2013-01-23 11:44:37 +01:00
Bye.
2010-05-08 21:47:19 +00:00
=======================================================
</echo>
2013-01-23 11:44:37 +01:00
2010-05-08 21:47:19 +00: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" >
2019-03-20 04:49:20 +01:00
<antcall target= "unzip" >
2016-11-04 11:43:38 +02:00
<param name= "archive_file" value= "windows/launch4j-3.9-win32.zip" />
2016-12-29 12:44:43 +01:00
<param name= "archive_url" value= "https://downloads.arduino.cc/tools/launch4j-3.9-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" >
2019-03-22 09:19:43 +01:00
<antcall target= "untar-native" >
2016-11-04 11:43:38 +02:00
<param name= "archive_file" value= "windows/launch4j-3.9-linux.tgz" />
2016-12-29 12:44:43 +01:00
<param name= "archive_url" value= "https://downloads.arduino.cc/tools/launch4j-3.9-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 21:47:19 +00: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
2015-11-24 09:52:31 +01:00
<copy todir= "windows/work/lib" >
<fileset dir= "shared" includes= "icons/**/*.png" />
</copy>
2010-05-08 21:47:19 +00: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 21:47:19 +00: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-08 23:20:52 +00:00
<copy todir= "windows/work" >
<fileset dir= "windows/dist" includes= "*.dll" />
</copy>
2013-01-23 11:44:37 +01:00
2010-05-08 23:20:52 +00: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" >
2019-12-16 21:00:38 +01:00
<param name= "archive_file" value= "./libastylej-2.05.1-5.zip" />
<param name= "archive_url" value= "https://downloads.arduino.cc/libastylej-2.05.1-5.zip" />
2015-07-06 13:31:15 +02:00
<param name= "final_folder" value= "${staging_folder}/libastylej-2.05.1" />
2014-10-08 17:10:47 +02:00
<param name= "dest_folder" value= "${staging_folder}" />
</antcall>
2015-07-06 13:31:15 +02:00
<copy file= "windows/libastylej-2.05.1/AStylej.dll" todir= "windows/work/lib" />
2015-01-19 23:08:08 +04:30
<copy file= "windows/msvcp100.dll" todir= "windows/work" />
<copy file= "windows/msvcr100.dll" todir= "windows/work" />
2013-10-14 17:31:35 +02:00
2015-12-18 18:16:38 +01:00
<antcall target= "unzip" >
2016-04-01 11:40:32 +02:00
<param name= "archive_file" value= "./liblistSerials-${LIBLISTSERIAL-VERSION}.zip" />
2016-10-04 00:06:25 +02:00
<param name= "archive_url" value= "https://downloads.arduino.cc/liblistSerials/liblistSerials-${LIBLISTSERIAL-VERSION}.zip" />
2016-04-01 11:40:32 +02:00
<param name= "final_folder" value= "${staging_folder}/liblistSerials-${LIBLISTSERIAL-VERSION}" />
2015-12-18 18:16:38 +01:00
<param name= "dest_folder" value= "${staging_folder}" />
</antcall>
2016-04-01 11:40:32 +02:00
<copy file= "windows/liblistSerials-${LIBLISTSERIAL-VERSION}/windows/listSerialsj.dll" todir= "windows/work/lib/" />
2017-03-09 15:47:16 +02:00
<antcall target= "make-file-executable" >
<param name= "file" value= "windows/work/lib/listSerialsj.dll" />
</antcall>
2012-04-02 18:30:53 +02:00
2015-10-30 09:21:31 +01:00
<delete dir= "${staging_folder}/arduino-builder-windows" includeemptydirs= "true" />
2015-08-31 16:05:23 +02:00
<mkdir dir= "${staging_folder}/arduino-builder-windows" />
2019-03-20 04:49:20 +01:00
<antcall target= "unzip" >
2015-08-31 16:05:23 +02:00
<param name= "archive_file" value= "./arduino-builder-windows-${ARDUINO-BUILDER-VERSION}.zip" />
2016-10-04 00:06:25 +02:00
<param name= "archive_url" value= "https://downloads.arduino.cc/tools/arduino-builder-windows-${ARDUINO-BUILDER-VERSION}.zip" />
2015-08-31 16:05:23 +02:00
<param name= "final_folder" value= "${staging_folder}/arduino-builder-windows/arduino-builder.exe" />
<param name= "dest_folder" value= "${staging_folder}/arduino-builder-windows" />
</antcall>
<copy file= "${staging_folder}/arduino-builder-windows/arduino-builder.exe" tofile= "windows/work/arduino-builder.exe" />
2017-03-09 15:47:16 +02:00
<antcall target= "make-file-executable" >
<param name= "file" value= "windows/work/arduino-builder.exe" />
</antcall>
2015-08-31 16:05:23 +02:00
<move file= "${staging_folder}/arduino-builder-windows/tools" tofile= "windows/work/tools-builder" />
2017-03-09 15:47:16 +02:00
<antcall target= "make-file-executable" >
<param name= "file" value= "windows/work/tools-builder/ctags/5.8-arduino11/ctags.exe" />
</antcall>
2015-08-31 16:05:23 +02:00
<copy todir= "windows/work/hardware" overwrite= "true" >
<fileset dir= "${staging_folder}/arduino-builder-windows/hardware" includes= "*.txt" />
</copy>
<delete dir= "${staging_folder}/arduino-builder-windows" includeemptydirs= "true" />
2019-03-20 04:49:20 +01:00
<unzip src= "../arduino-core/lib/jna-4.2.2.jar" dest= "windows/work/lib" >
<patternset >
<include name= "com/sun/jna/win32-x86/jnidispatch.dll" />
</patternset>
<mapper type= "flatten" />
</unzip>
2017-03-09 15:12:13 +02:00
<move file= "windows/work/lib/jnidispatch.dll" tofile= "windows/work/lib/jnidispatch-4.2.2-win32-x86.dll" />
2017-03-09 15:47:16 +02:00
<antcall target= "make-file-executable" >
<param name= "file" value= "windows/work/lib/jnidispatch-4.2.2-win32-x86.dll" />
</antcall>
2017-03-09 15:12:13 +02:00
2019-07-16 11:02:57 +02:00
<unzip src= "../arduino-core/lib/jssc-2.8.0-arduino4.jar" dest= "windows/work/lib" >
2019-03-20 04:49:20 +01:00
<patternset >
<include name= "libs/windows/jSSC-2.8_x86.dll" />
</patternset>
<mapper type= "flatten" />
</unzip>
2017-05-17 19:05:31 +02:00
<move file= "windows/work/lib/jSSC-2.8_x86.dll" tofile= "windows/work/lib/jSSC-2.8_x86.dll" />
<antcall target= "make-file-executable" >
<param name= "file" value= "windows/work/lib/jSSC-2.8_x86.dll" />
</antcall>
2019-07-16 11:02:57 +02:00
<unzip src= "../arduino-core/lib/jssc-2.8.0-arduino4.jar" dest= "windows/work/lib" >
2019-03-20 04:49:20 +01:00
<patternset >
<include name= "libs/windows/jSSC-2.8_x86_64.dll" />
</patternset>
<mapper type= "flatten" />
</unzip>
2017-05-17 19:05:31 +02:00
<move file= "windows/work/lib/jSSC-2.8_x86_64.dll" tofile= "windows/work/lib/jSSC-2.8_x86_64.dll" />
<antcall target= "make-file-executable" >
<param name= "file" value= "windows/work/lib/jSSC-2.8_x86_64.dll" />
</antcall>
2010-05-08 21:47:19 +00: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 21:47:19 +00: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 21:47:19 +00: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"
2016-11-04 16:03:17 +02:00
includes="application.ico, config.xml, config_debug.xml, arduino.l4j.ini, wrapper-manifest.xml"/>
2010-05-08 21:47:19 +00: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 21:47:19 +00: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
2015-06-23 13:56:20 +01:00
<!-- For JVM within JDK, release file is in parent directory -->
<property file= "${WINDOWS_BUNDLED_JVM}/release" prefix= "windows" />
<property file= "${WINDOWS_BUNDLED_JVM}/../release" prefix= "windows" />
2015-05-12 12:09:36 +02:00
<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>
2015-12-03 16:34:25 +01:00
<antcall target= "portable-${portable}" >
<param name= "parentdir" value= "${staging_folder}/work" />
</antcall>
2010-05-08 21:47:19 +00: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" >
2016-06-22 16:24:13 +02:00
<param name= "unpack_target" value= "unzip" />
2018-05-09 18:33:15 +02:00
<param name= "gcc_archive_file" value= "avr-gcc-${AVRGCC-VERSION}-i686-w64-mingw32.zip" />
2016-06-03 16:45:11 +02:00
<param name= "gcc_version" value= "${AVRGCC-VERSION}" />
2016-09-15 17:42:40 +02:00
<param name= "avrdude_archive_file" value= "avrdude-${AVRDUDE-VERSION}-i686-w64-mingw32.zip" />
<param name= "avrdude_version" value= "${AVRDUDE-VERSION}" />
2017-01-17 12:41:33 +01:00
<param name= "arduinoOTA_archive_file" value= "arduinoOTA-${arduinoOTA-VERSION}-windows_386.zip" />
2016-12-19 18:32:22 +01:00
<param name= "arduinoOTA_version" value= "${arduinoOTA-VERSION}" />
2015-03-05 17:42:26 +01:00
</antcall>
</target>
2015-09-30 09:55:18 +02:00
<target name= "windows-run" depends= "build,start" />
<target name= "windows-start" >
2015-08-21 09:10:50 +02:00
<exec executable= "windows/work/arduino.exe" dir= "windows/work" spawn= "false" failonerror= "true" />
2010-05-08 21:47:19 +00:00
</target>
2015-05-11 10:48:52 +02:00
<target name= "windows-dist" depends= "build" description= "Create .zip files of windows version" >
2015-12-03 16:34:25 +01:00
<zip destfile= "windows/arduino-${full-version}.zip" level= "9" >
2015-03-13 13:21:49 +01:00
<zipfileset dir= "windows/work" prefix= "arduino-${version}" />
2010-05-08 21:47:19 +00: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
2015-12-03 16:34:25 +01:00
windows/arduino-${full-version}.zip
2010-05-08 21:47:19 +00:00
=======================================================
</echo>
</target>
2013-01-23 11:44:37 +01:00
2010-10-03 21:21:27 -04:00
<!-- - - - - - - - -->
<!-- Source -->
<!-- - - - - - - - -->
2013-01-23 11:44:37 +01:00
2010-10-03 21:21:27 -04: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-03 21:21:27 -04: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-03 21:21:27 -04:00
excludes="**/*.tgz,
2012-04-08 19:17:03 -04:00
**/*.bz2,
2012-08-23 11:16:26 -04:00
**/build/macosx/,
**/build/windows/,
2010-10-03 21:21:27 -04:00
**/work/,
**/.git/,
**/*.class"
2013-01-23 11:44:37 +01:00
/>
2010-10-03 21:21:27 -04:00
</tar>
<echo >
=======================================================
2013-01-23 11:44:37 +01:00
Arduino source distribution was built. Grab the archive from
2010-10-03 21:21:27 -04:00
arduino-${version}-src.tar.gz
=======================================================
</echo>
</target>
2013-01-23 11:44:37 +01:00
2010-10-03 21:21:27 -04:00
2010-05-08 21:47:19 +00:00
<!-- - - - - - - - -->
<!-- Run It! -->
<!-- - - - - - - - -->
2013-01-23 11:44:37 +01:00
<target name= "clean" description= "Perform a spring cleaning"
2010-05-08 21:47:19 +00: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}" />
2016-10-04 00:06:25 +02:00
<param name= "archive_url" value= "https://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}" />
2016-10-04 00:06:25 +02:00
<param name= "archive_url" value= "https://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>
2016-12-19 18:32:22 +01:00
<mkdir dir= "${staging_folder}/work/${staging_hardware_folder}/tmp/arduinoOTA" />
<antcall target= "${unpack_target}" >
<param name= "archive_file" value= "${staging_folder}/${arduinoOTA_archive_file}" />
<param name= "archive_url" value= "http://downloads.arduino.cc/tools/${arduinoOTA_archive_file}" />
<param name= "final_folder" value= "${staging_folder}/work/${staging_hardware_folder}/tmp/arduinoOTA/${arduinoOTA_version}" />
<param name= "dest_folder" value= "${staging_folder}/work/${staging_hardware_folder}/tmp/arduinoOTA/" />
</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" />
2016-09-15 17:42:40 +02:00
<move file= "${staging_folder}/work/${staging_hardware_folder}/tmp/avrdude/avrdude" tofile= "${staging_folder}/work/${staging_hardware_folder}/tools/avr" />
2017-01-17 12:41:33 +01:00
<move file= "${staging_folder}/work/${staging_hardware_folder}/tmp/arduinoOTA/arduinoOTA/" tofile= "${staging_folder}/work/${staging_hardware_folder}/tools/avr" />
2015-03-31 17:00:01 +02:00
<echo append= "true" file= "${staging_folder}/work/${staging_hardware_folder}/tools/avr/builtin_tools_versions.txt" message= "arduino.avrdude=${avrdude_version}${line.separator}" />
2016-12-19 18:32:22 +01:00
<echo append= "true" file= "${staging_folder}/work/${staging_hardware_folder}/tools/avr/builtin_tools_versions.txt" message= "arduino.arduinoOTA=${arduinoOTA_version}${line.separator}" />
2015-03-31 17:00:01 +02:00
<echo append= "true" file= "${staging_folder}/work/${staging_hardware_folder}/tools/avr/builtin_tools_versions.txt" message= "arduino.avr-gcc=${gcc_version}${line.separator}" />
<delete dir= "${staging_folder}/work/${staging_hardware_folder}/tmp" />
</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>
2015-12-03 16:34:25 +01:00
<target name= "portable-true" >
<mkdir dir= "${parentdir}/portable" />
</target>
<target name= "portable-false" />
2010-05-08 21:47:19 +00:00
</project>