avoid attempts to export 32-bit verrsions of apps on macOS (fixes #4971)

This commit is contained in:
Ben Fry
2017-04-23 09:22:31 -04:00
parent cb089320da
commit 909a87f1b6
2 changed files with 10 additions and 6 deletions

View File

@@ -381,7 +381,7 @@ public class JavaBuild {
// grab the imports from the code just preprocessed
importedLibraries = new ArrayList<Library>();
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");