fix "Embed Java" for 32-bit Linux export

This commit is contained in:
Ben Fry
2016-08-19 17:08:01 -04:00
parent 2e9357839c
commit eba6ed14e6
2 changed files with 8 additions and 3 deletions

View File

@@ -693,21 +693,25 @@ public class JavaBuild {
Preferences.getBoolean("export.application.embed_java");
if (Preferences.getBoolean(JavaEditor.EXPORT_PREFIX + platformName)) {
final int bits = Platform.getNativeBits();
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 && Platform.getNativeBits() == 32 && "x86".equals(Platform.getNativeArch()))) {
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");
if (!exportApplication(folder, platform, "64", embedJava && Platform.getNativeBits() == 64 && "amd64".equals(Platform.getNativeArch()))) {
if (!exportApplication(folder, platform, "64", embedJava && (bits == 64) && "amd64".equals(arch))) {
return false;
}
if (platform == PConstants.LINUX) {
// export the armv6hf version as well
folder = new File(sketch.getFolder(), "application.linux-armv6hf");
if (!exportApplication(folder, platform, "armv6hf", embedJava && Platform.getNativeBits() == 32 && "arm".equals(Platform.getNativeArch()))) {
if (!exportApplication(folder, platform, "armv6hf", embedJava && (bits == 32) && "arm".equals(arch))) {
return false;
}
}

View File

@@ -7,6 +7,7 @@ _ might be ext.dirs trouble with spaces in path names?
_ or the backwards slashes?
X fixes for Python Mode crashing on startup
X disable ext.dirs on Linux export and set jna.nosys as well
X Java not included properly with 32-bit Linux export
_ JavaInputHandler not registering
_ library compilations handled oddly