From 351cfbbab1e971c8571f7a05238f14570bd6a67e Mon Sep 17 00:00:00 2001 From: jogo- Date: Wed, 28 Jan 2015 23:11:51 +0100 Subject: [PATCH 01/14] Fix typos in BlinkWithoutDelay.ino --- .../02.Digital/BlinkWithoutDelay/BlinkWithoutDelay.ino | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/shared/examples/02.Digital/BlinkWithoutDelay/BlinkWithoutDelay.ino b/build/shared/examples/02.Digital/BlinkWithoutDelay/BlinkWithoutDelay.ino index d4ed2f77e..537353f6e 100644 --- a/build/shared/examples/02.Digital/BlinkWithoutDelay/BlinkWithoutDelay.ino +++ b/build/shared/examples/02.Digital/BlinkWithoutDelay/BlinkWithoutDelay.ino @@ -1,6 +1,6 @@ /* Blink without Delay - Turns on and off a light emitting diode(LED) connected to a digital + Turns on and off a light emitting diode (LED) connected to a digital pin, without using the delay() function. This means that other code can run at the same time without being interrupted by the LED code. @@ -28,7 +28,7 @@ const int ledPin = 13; // the number of the LED pin // Variables will change : int ledState = LOW; // ledState used to set the LED -// Generally, you shuould use "unsigned long" for variables that hold time +// Generally, you should use "unsigned long" for variables that hold time // The value will quickly become too large for an int to store unsigned long previousMillis = 0; // will store last time LED was updated From f7bc69a3011fa7afa9326a515ed9eda291215145 Mon Sep 17 00:00:00 2001 From: Federico Fissore Date: Sat, 31 Jan 2015 19:32:24 +0100 Subject: [PATCH 02/14] build.xml linux-clean target was not deleting old linux builds --- build/build.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/build.xml b/build/build.xml index eb8b7d02a..ca219dfaa 100644 --- a/build/build.xml +++ b/build/build.xml @@ -434,7 +434,7 @@ - + From d61568a8be188fb242252774379e28627ae2ac9f Mon Sep 17 00:00:00 2001 From: Federico Fissore Date: Mon, 2 Feb 2015 09:48:47 +0100 Subject: [PATCH 03/14] build_pull_requests now moves the artifacts to the parent folder: this allows calling "clean" target before each build --- build/build_pull_request.bash | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/build/build_pull_request.bash b/build/build_pull_request.bash index cfb6574c8..1d622fdad 100755 --- a/build/build_pull_request.bash +++ b/build/build_pull_request.bash @@ -1,4 +1,4 @@ -#!/bin/bash -e +#!/bin/bash -ex if [ "x${ghprbPullId}" == "x" ] then @@ -15,8 +15,15 @@ fi VERSION="PR-${ghprbPullId}-BUILD-${BUILD_NUMBER}" -ant -Djava.net.preferIPv4Stack=true -Dplatform=linux32 -Dlinux32=1 -Dversion="${VERSION}" dist -ant -Djava.net.preferIPv4Stack=true -Dplatform=linux64 -Dlinux64=1 -Dversion="${VERSION}" dist -ant -Djava.net.preferIPv4Stack=true -Dplatform=windows -Dwindows=1 -Dversion="${VERSION}" dist -ant -Djava.net.preferIPv4Stack=true -Dplatform=macosx -Dmacosx=1 -Dversion="${VERSION}" dist +ant -Djava.net.preferIPv4Stack=true -Dplatform=linux32 -Dversion="${VERSION}" clean dist +mv linux/arduino-*$VERSION*.tar.xz ../ + +ant -Djava.net.preferIPv4Stack=true -Dplatform=linux64 -Dversion="${VERSION}" clean dist +mv linux/arduino-*$VERSION*.tar.xz ../ + +ant -Djava.net.preferIPv4Stack=true -Dplatform=windows -Dversion="${VERSION}" clean dist +mv windows/arduino-*$VERSION*.zip ../ + +ant -Djava.net.preferIPv4Stack=true -Dplatform=macosx -Dversion="${VERSION}" clean dist +mv macosx/arduino-*$VERSION*.zip ../ From d460982623f454a4311b3c641f77011a2bc13ddb Mon Sep 17 00:00:00 2001 From: Federico Fissore Date: Fri, 30 Jan 2015 16:42:04 +0100 Subject: [PATCH 04/14] Macosx: new appbundler, new macosx builds. Use platform=macosx and platform=oldmacosx --- .gitignore | 2 + app/src/processing/app/Editor.java | 2 + .../src/processing/app/BaseNoGui.java | 22 +-- build/build.xml | 179 ++++++++++++++---- build/macosx/appbundler-1.0ea.jar.zip.sha | 1 + 5 files changed, 152 insertions(+), 54 deletions(-) create mode 100644 build/macosx/appbundler-1.0ea.jar.zip.sha diff --git a/.gitignore b/.gitignore index 9a2f56075..3fbbc04c2 100644 --- a/.gitignore +++ b/.gitignore @@ -29,6 +29,8 @@ build/macosx/dist/*.tar.gz build/macosx/dist/*.tar.bz2 build/macosx/libastylej* build/macosx/appbundler*.jar +build/macosx/appbundler*.zip +build/macosx/appbundler build/linux/work/ build/linux/dist/*.tar.gz build/linux/dist/*.tar.bz2 diff --git a/app/src/processing/app/Editor.java b/app/src/processing/app/Editor.java index bd0d6c75c..c9d2ec3fb 100644 --- a/app/src/processing/app/Editor.java +++ b/app/src/processing/app/Editor.java @@ -2025,6 +2025,8 @@ public class Editor extends JFrame implements RunnerListener { // As of Processing 1.0.10, this always happens immediately. // http://dev.processing.org/bugs/show_bug.cgi?id=1456 + toFront(); + String prompt = I18n.format(_("Save changes to \"{0}\"? "), sketch.getName()); if (!OSUtils.isMacOS()) { diff --git a/arduino-core/src/processing/app/BaseNoGui.java b/arduino-core/src/processing/app/BaseNoGui.java index 2eff168a7..6b5efdcf8 100644 --- a/arduino-core/src/processing/app/BaseNoGui.java +++ b/arduino-core/src/processing/app/BaseNoGui.java @@ -7,13 +7,7 @@ import java.io.FileInputStream; import java.io.FileWriter; import java.io.IOException; import java.io.InputStream; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Date; -import java.util.HashMap; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; +import java.util.*; import java.util.logging.Level; import java.util.logging.Logger; @@ -170,19 +164,13 @@ public class BaseNoGui { } static public File getContentFile(String name) { - String path = System.getProperty("user.dir"); + File path = new File(System.getProperty("user.dir")); - // Get a path to somewhere inside the .app folder if (OSUtils.isMacOS()) { -// javaroot -// $JAVAROOT - String javaroot = System.getProperty("javaroot"); - if (javaroot != null) { - path = javaroot; - } + path = new File(BaseNoGui.class.getProtectionDomain().getCodeSource().getLocation().getPath()).getParentFile(); } - File working = new File(path); - return new File(working, name); + + return new File(path, name); } static public TargetPlatform getCurrentTargetPlatformFromPackage(String pack) { diff --git a/build/build.xml b/build/build.xml index ca219dfaa..6f231c198 100644 --- a/build/build.xml +++ b/build/build.xml @@ -6,11 +6,19 @@ + + + + + + + + @@ -18,11 +26,13 @@ + - + + @@ -180,6 +190,8 @@ + + @@ -201,7 +213,7 @@ - + @@ -220,6 +232,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -228,20 +326,6 @@ - - @@ -249,7 +333,7 @@ - + @@ -272,17 +356,42 @@ - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -343,32 +452,28 @@ + + + + + + - - - - - - - - - - + + + + + - + - ======================================================= Arduino for Mac OS X was built. Grab the image from - macosx/arduino-${version}-${platform}.zip + macosx/arduino-${version}-${custom_platform}.zip ======================================================= diff --git a/build/macosx/appbundler-1.0ea.jar.zip.sha b/build/macosx/appbundler-1.0ea.jar.zip.sha new file mode 100644 index 000000000..a32531127 --- /dev/null +++ b/build/macosx/appbundler-1.0ea.jar.zip.sha @@ -0,0 +1 @@ +28b3ccde1631791575a11f73e5fd0097df566fe2 From 7f6cf5d7ef08e895364fa00bcb24c1b60508f66a Mon Sep 17 00:00:00 2001 From: Federico Fissore Date: Mon, 2 Feb 2015 09:48:47 +0100 Subject: [PATCH 05/14] build_pull_requests now builds oldmacosx as well --- build/build_pull_request.bash | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build/build_pull_request.bash b/build/build_pull_request.bash index 1d622fdad..76e9e5cb8 100755 --- a/build/build_pull_request.bash +++ b/build/build_pull_request.bash @@ -27,3 +27,6 @@ mv windows/arduino-*$VERSION*.zip ../ ant -Djava.net.preferIPv4Stack=true -Dplatform=macosx -Dversion="${VERSION}" clean dist mv macosx/arduino-*$VERSION*.zip ../ +ant -Djava.net.preferIPv4Stack=true -Dplatform=oldmacosx -Dversion="${VERSION}" clean dist +mv macosx/arduino-*$VERSION*.zip ../ + From ce911788eb989939280724d5fed1b2272be7c815 Mon Sep 17 00:00:00 2001 From: Federico Fissore Date: Mon, 2 Feb 2015 15:30:34 +0100 Subject: [PATCH 06/14] Fixed bug with paths with spaces --- arduino-core/src/processing/app/BaseNoGui.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/arduino-core/src/processing/app/BaseNoGui.java b/arduino-core/src/processing/app/BaseNoGui.java index 6b5efdcf8..dd1e3527e 100644 --- a/arduino-core/src/processing/app/BaseNoGui.java +++ b/arduino-core/src/processing/app/BaseNoGui.java @@ -7,6 +7,7 @@ import java.io.FileInputStream; import java.io.FileWriter; import java.io.IOException; import java.io.InputStream; +import java.net.URISyntaxException; import java.util.*; import java.util.logging.Level; import java.util.logging.Logger; @@ -167,7 +168,11 @@ public class BaseNoGui { File path = new File(System.getProperty("user.dir")); if (OSUtils.isMacOS()) { - path = new File(BaseNoGui.class.getProtectionDomain().getCodeSource().getLocation().getPath()).getParentFile(); + try { + path = new File(BaseNoGui.class.getProtectionDomain().getCodeSource().getLocation().toURI().getPath()).getParentFile(); + } catch (URISyntaxException e) { + throw new RuntimeException(e); + } } return new File(path, name); From 3303774844df46c0c40d622988477ba2d9af9936 Mon Sep 17 00:00:00 2001 From: Federico Fissore Date: Tue, 3 Feb 2015 11:53:48 +0100 Subject: [PATCH 07/14] build.xml and mac. Change in platform names: macosx now macosxnew, oldmacosx now macosx --- build/build.xml | 48 ++++++++++++++++------------------- build/build_pull_request.bash | 2 +- 2 files changed, 23 insertions(+), 27 deletions(-) diff --git a/build/build.xml b/build/build.xml index 6f231c198..bd5d63284 100644 --- a/build/build.xml +++ b/build/build.xml @@ -5,8 +5,8 @@ - - + + @@ -17,22 +17,22 @@ - - + + + - - - + + @@ -190,7 +190,7 @@ - + @@ -213,7 +213,7 @@ - + @@ -241,7 +241,7 @@ - + @@ -369,22 +369,22 @@ - - - - - - + + + + + + @@ -452,28 +452,24 @@ - - - - + + - - - - + + - + ======================================================= Arduino for Mac OS X was built. Grab the image from - macosx/arduino-${version}-${custom_platform}.zip + macosx/arduino-${version}-${platform}.zip ======================================================= diff --git a/build/build_pull_request.bash b/build/build_pull_request.bash index 76e9e5cb8..6989da559 100755 --- a/build/build_pull_request.bash +++ b/build/build_pull_request.bash @@ -27,6 +27,6 @@ mv windows/arduino-*$VERSION*.zip ../ ant -Djava.net.preferIPv4Stack=true -Dplatform=macosx -Dversion="${VERSION}" clean dist mv macosx/arduino-*$VERSION*.zip ../ -ant -Djava.net.preferIPv4Stack=true -Dplatform=oldmacosx -Dversion="${VERSION}" clean dist +ant -Djava.net.preferIPv4Stack=true -Dplatform=macosxnew -Dversion="${VERSION}" clean dist mv macosx/arduino-*$VERSION*.zip ../ From 7e568e21f44e7a7007762e73ccdb354191f2eb11 Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Tue, 3 Feb 2015 12:12:09 +0100 Subject: [PATCH 08/14] Updated revision log. Version set to 1.6.0rc3 --- build/shared/revisions.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build/shared/revisions.txt b/build/shared/revisions.txt index 2072f9eb6..007185401 100644 --- a/build/shared/revisions.txt +++ b/build/shared/revisions.txt @@ -1,4 +1,9 @@ +ARDUINO 1.6.0rc3 - 2015.02.03 + +[ide] +* Bunch of bugfix on MacOSX build (https://github.com/arduino/Arduino/pull/2590) + ARDUINO 1.6.0rc2 - 2015.01.20 [ide] From e8fa4211b3204af5a66b1805ed5a7121a2ab271f Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Tue, 3 Feb 2015 13:17:35 +0100 Subject: [PATCH 09/14] Renamed mac build from "macosxnew" to "macosx-java-latest" --- build/build.xml | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/build/build.xml b/build/build.xml index bd5d63284..75ffd44d6 100644 --- a/build/build.xml +++ b/build/build.xml @@ -5,7 +5,7 @@ - + @@ -17,21 +17,21 @@ - - + + - + - + @@ -190,7 +190,7 @@ - + @@ -241,7 +241,7 @@ - + @@ -278,6 +278,7 @@