diff --git a/.gitignore b/.gitignore
index 9a2f56075a1..3fbbc04c278 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 bd0d6c75c11..c9d2ec3fbd9 100644
--- a/app/src/processing/app/Editor.java
+++ b/app/src/processing/app/Editor.java
@@ -2025,6 +2025,8 @@ protected boolean checkModified() {
// 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 2eff168a743..dd1e3527e17 100644
--- a/arduino-core/src/processing/app/BaseNoGui.java
+++ b/arduino-core/src/processing/app/BaseNoGui.java
@@ -7,13 +7,8 @@
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.net.URISyntaxException;
+import java.util.*;
import java.util.logging.Level;
import java.util.logging.Logger;
@@ -170,19 +165,17 @@ static public PreferencesMap getBoardPreferences() {
}
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;
+ try {
+ path = new File(BaseNoGui.class.getProtectionDomain().getCodeSource().getLocation().toURI().getPath()).getParentFile();
+ } catch (URISyntaxException e) {
+ throw new RuntimeException(e);
}
}
- 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 ca219dfaa8d..bd5d632840f 100644
--- a/build/build.xml
+++ b/build/build.xml
@@ -5,23 +5,33 @@
-
+
+
+
+
+
+
+
+
+
+
+
@@ -180,6 +190,8 @@
+
+
@@ -220,6 +232,92 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -228,20 +326,6 @@
-
-
@@ -249,7 +333,7 @@
-
+
@@ -272,17 +356,42 @@
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
@@ -344,25 +453,17 @@
-
-
-
-
-
-
-
+
+
-
-
+
+
+
+
-
=======================================================
diff --git a/build/build_pull_request.bash b/build/build_pull_request.bash
index 1d622fdad3b..6989da559a7 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=macosxnew -Dversion="${VERSION}" clean dist
+mv macosx/arduino-*$VERSION*.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 00000000000..a3253112781
--- /dev/null
+++ b/build/macosx/appbundler-1.0ea.jar.zip.sha
@@ -0,0 +1 @@
+28b3ccde1631791575a11f73e5fd0097df566fe2