Skip to content

Commit 15d0b85

Browse files
committed
avoid attempts to export 32-bit verrsions of apps on macOS (fixes processing#4971)
1 parent 03cb1da commit 15d0b85

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

java/src/processing/mode/java/JavaBuild.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ public String preprocess(File srcFolder,
381381

382382
// grab the imports from the code just preprocessed
383383

384-
importedLibraries = new ArrayList<Library>();
384+
importedLibraries = new ArrayList<>();
385385
Library core = mode.getCoreLibrary();
386386
if (core != null) {
387387
importedLibraries.add(core);
@@ -697,11 +697,13 @@ protected boolean exportApplication() throws IOException, SketchException {
697697
final String arch = Platform.getNativeArch();
698698

699699
if (Library.hasMultipleArch(platform, importedLibraries)) {
700-
// export the 32-bit version
701-
folder = new File(sketch.getFolder(), "application." + platformName + "32");
702-
703-
if (!exportApplication(folder, platform, "32", embedJava && (bits == 32) && ("x86".equals(arch) || "i386".equals(arch)))) {
704-
return false;
700+
// Don't try to export 32-bit on macOS, because it doesn't exist.
701+
if (platform != PConstants.MACOSX) {
702+
// export the 32-bit version
703+
folder = new File(sketch.getFolder(), "application." + platformName + "32");
704+
if (!exportApplication(folder, platform, "32", embedJava && (bits == 32) && ("x86".equals(arch) || "i386".equals(arch)))) {
705+
return false;
706+
}
705707
}
706708
// export the 64-bit version
707709
folder = new File(sketch.getFolder(), "application." + platformName + "64");

todo.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ X examples window
1818
X sketchbook window
1919
X https://github.com/processing/processing/issues/4936
2020
X https://github.com/processing/processing/issues/5007
21+
X get rid of error message when exporting sketches with the video library
22+
X https://github.com/processing/processing/issues/4971
2123

2224
_ mode list does not update after changing sketchbook folder
2325
_ already reported?

0 commit comments

Comments
 (0)