From d460982623f454a4311b3c641f77011a2bc13ddb Mon Sep 17 00:00:00 2001 From: Federico Fissore Date: Fri, 30 Jan 2015 16:42:04 +0100 Subject: [PATCH] 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