From 909a87f1b6c798aec5e69c2f6d9374db52add475 Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Sun, 23 Apr 2017 09:22:31 -0400 Subject: [PATCH] avoid attempts to export 32-bit verrsions of apps on macOS (fixes #4971) --- java/src/processing/mode/java/JavaBuild.java | 14 ++++++++------ todo.txt | 2 ++ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/java/src/processing/mode/java/JavaBuild.java b/java/src/processing/mode/java/JavaBuild.java index 14c7e8e5f..8e0c679b5 100644 --- a/java/src/processing/mode/java/JavaBuild.java +++ b/java/src/processing/mode/java/JavaBuild.java @@ -381,7 +381,7 @@ public class JavaBuild { // grab the imports from the code just preprocessed - importedLibraries = new ArrayList(); + importedLibraries = new ArrayList<>(); Library core = mode.getCoreLibrary(); if (core != null) { importedLibraries.add(core); @@ -697,11 +697,13 @@ public class JavaBuild { final String arch = Platform.getNativeArch(); if (Library.hasMultipleArch(platform, importedLibraries)) { - // export the 32-bit version - folder = new File(sketch.getFolder(), "application." + platformName + "32"); - - if (!exportApplication(folder, platform, "32", embedJava && (bits == 32) && ("x86".equals(arch) || "i386".equals(arch)))) { - return false; + // Don't try to export 32-bit on macOS, because it doesn't exist. + if (platform != PConstants.MACOSX) { + // export the 32-bit version + folder = new File(sketch.getFolder(), "application." + platformName + "32"); + if (!exportApplication(folder, platform, "32", embedJava && (bits == 32) && ("x86".equals(arch) || "i386".equals(arch)))) { + return false; + } } // export the 64-bit version folder = new File(sketch.getFolder(), "application." + platformName + "64"); diff --git a/todo.txt b/todo.txt index 13567665b..76b31f5d8 100755 --- a/todo.txt +++ b/todo.txt @@ -18,6 +18,8 @@ X examples window X sketchbook window X https://github.com/processing/processing/issues/4936 X https://github.com/processing/processing/issues/5007 +X get rid of error message when exporting sketches with the video library +X https://github.com/processing/processing/issues/4971 _ mode list does not update after changing sketchbook folder _ already reported?