From a4e958f14728140c622b60293825fee4109ee5de Mon Sep 17 00:00:00 2001 From: sngl Date: Mon, 10 Nov 2014 17:00:27 +0100 Subject: [PATCH 01/54] Updated YunClient::connect method' Now it stop the connection on the linux side when it fails --- libraries/Bridge/src/YunClient.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/Bridge/src/YunClient.cpp b/libraries/Bridge/src/YunClient.cpp index 82965894a..0c5dc479f 100644 --- a/libraries/Bridge/src/YunClient.cpp +++ b/libraries/Bridge/src/YunClient.cpp @@ -160,7 +160,7 @@ int YunClient::connect(const char *host, uint16_t port) { if (connected()) return 1; - opened = false; + stop(); handle = 0; return 0; } From 87865ac19df2f55e3d073cf5dc7ba08c0de4c584 Mon Sep 17 00:00:00 2001 From: Arturo Guadalupi Date: Mon, 12 Jan 2015 14:37:50 +0100 Subject: [PATCH 02/54] Update setCursor.ino Changedfrom (thisRow, thisCol) to lcd.Setcursor(thisCol, thisRow). It was an error. --- libraries/LiquidCrystal/examples/setCursor/setCursor.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/LiquidCrystal/examples/setCursor/setCursor.ino b/libraries/LiquidCrystal/examples/setCursor/setCursor.ino index e45c49181..951c8a576 100644 --- a/libraries/LiquidCrystal/examples/setCursor/setCursor.ino +++ b/libraries/LiquidCrystal/examples/setCursor/setCursor.ino @@ -60,7 +60,7 @@ void loop() { // loop over the rows: for (int thisRow = 0; thisRow < numCols; thisRow++) { // set the cursor position: - lcd.setCursor(thisRow,thisCol); + lcd.setCursor(thisCol,thisRow); // print the letter: lcd.write(thisLetter); delay(200); From 1f08b5ede49126cfdc8d9700dee99e56cd899f15 Mon Sep 17 00:00:00 2001 From: Arturo Guadalupi Date: Mon, 12 Jan 2015 14:37:50 +0100 Subject: [PATCH 03/54] Cherry picked fix from 87865ac19df2f55e3d073cf5dc7ba08c0de4c584 --- libraries/LiquidCrystal/examples/setCursor/setCursor.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/LiquidCrystal/examples/setCursor/setCursor.ino b/libraries/LiquidCrystal/examples/setCursor/setCursor.ino index 689f3297e..4790b68b8 100644 --- a/libraries/LiquidCrystal/examples/setCursor/setCursor.ino +++ b/libraries/LiquidCrystal/examples/setCursor/setCursor.ino @@ -60,7 +60,7 @@ void loop() { // loop over the rows: for (int thisRow = 0; thisRow < numCols; thisRow++) { // set the cursor position: - lcd.setCursor(thisRow, thisCol); + lcd.setCursor(thisCol, thisRow); // print the letter: lcd.write(thisLetter); delay(200); From 379df90b30a6da6e2d14c13e93e09a0a5b70856d Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Fri, 23 Jan 2015 11:22:40 +0100 Subject: [PATCH 04/54] Update revision log --- build/shared/revisions.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/build/shared/revisions.txt b/build/shared/revisions.txt index 6243c4fb7..2072f9eb6 100644 --- a/build/shared/revisions.txt +++ b/build/shared/revisions.txt @@ -20,7 +20,7 @@ The following changes are included also in the Arduino IDE 1.0.7: [ide] * Mitigated Serial Monitor resource exhaustion when the connected device sends a lot of data (Paul Stoffregen) -ARDUINO 1.6.0rc1 +ARDUINO 1.6.0rc1 - 2014.12.11 * IDE internals have been refactored and sorted out. (Claudio Indellicati) https://github.com/arduino/Arduino/pull/2328 @@ -32,11 +32,10 @@ ARDUINO 1.6.0rc1 * Autosave on sketch Upload/Verify (Fulvio Ieva) * Sketch build process: fixed full rebuild on windows even if not needed * Sketch build process: core.a rebuild only if needed (Matthijs Kooijman) -* Updated AStyle formatter to v2.04: http://astyle.sourceforge.net/notes.html +* Updated AStyle formatter to v2.05: http://astyle.sourceforge.net/notes.html * Improved avrdude verbose upload (Matthijs Kooijman) * (Mac OSX) Add Exported UTI for ino files, allows quick look to view the content of the file and external editors to syntax highlight as C++ (Matt Lloyd) -* Updated libastyle to 2.05 [core] * sam: added -MMD flag to let gcc produce dependency files (full rebuild on Arduino Due is now triggered only if needed) From e360f82cae38254d9e299db5e66e4fdbbe074bc1 Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Tue, 27 Jan 2015 20:22:22 +0100 Subject: [PATCH 05/54] Fixed incorrect boards.txt preference handling when submenu id has underscore Fixes #2533 --- .../src/processing/app/BaseNoGui.java | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/arduino-core/src/processing/app/BaseNoGui.java b/arduino-core/src/processing/app/BaseNoGui.java index 2eff168a7..ee1b1d0a6 100644 --- a/arduino-core/src/processing/app/BaseNoGui.java +++ b/arduino-core/src/processing/app/BaseNoGui.java @@ -154,18 +154,27 @@ public class BaseNoGui { TargetBoard board = getTargetBoard(); if (board == null) return null; + String boardId = board.getId(); PreferencesMap prefs = new PreferencesMap(board.getPreferences()); + + String extendedName = prefs.get("name"); for (String menuId : board.getMenuIds()) { + if (!board.hasMenu(menuId)) + continue; + + // Get "custom_[MENU_ID]" preference (for example "custom_cpu") String entry = PreferencesData.get("custom_" + menuId); - if (board.hasMenu(menuId) && entry != null && - entry.startsWith(board.getId())) { - String selectionId = entry.substring(entry.indexOf("_") + 1); + if (entry != null && entry.startsWith(boardId)) { + + String selectionId = entry.substring(boardId.length() + 1); prefs.putAll(board.getMenuPreferences(menuId, selectionId)); - prefs.put("name", prefs.get("name") + ", " + - board.getMenuLabel(menuId, selectionId)); + + // Update the name with the extended configuration + extendedName += ", " + board.getMenuLabel(menuId, selectionId); } } + prefs.put("name", extendedName); return prefs; } From 351cfbbab1e971c8571f7a05238f14570bd6a67e Mon Sep 17 00:00:00 2001 From: jogo- Date: Wed, 28 Jan 2015 23:11:51 +0100 Subject: [PATCH 06/54] 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 07/54] 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 08/54] 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 09/54] 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 10/54] 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 11/54] 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 12/54] 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 13/54] 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 14/54] 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 @@