still more work to make exporting applications for 32 and 64-bit work

This commit is contained in:
benfry
2011-11-01 17:11:31 +00:00
parent 69158c3f38
commit 2cb12efa85
6 changed files with 27 additions and 13 deletions

View File

@@ -1352,16 +1352,16 @@ public class JavaBuild {
runOptions += " -Xmx" +
Preferences.get("run.options.memory.maximum") + "m";
}
if (exportPlatform == PConstants.MACOSX) {
// If no bits specified (libs are all universal, or no native libs)
// then exportBits will be 0, and can be controlled via "Get Info".
// Otherwise, need to specify the bits as a VM option.
if (exportBits == 32) {
runOptions += " -d32";
} else if (exportBits == 64) {
runOptions += " -d64";
}
}
// if (exportPlatform == PConstants.MACOSX) {
// // If no bits specified (libs are all universal, or no native libs)
// // then exportBits will be 0, and can be controlled via "Get Info".
// // Otherwise, need to specify the bits as a VM option.
// if (exportBits == 32) {
// runOptions += " -d32";
// } else if (exportBits == 64) {
// runOptions += " -d64";
// }
// }
/// macosx: write out Info.plist (template for classpath, etc)
@@ -1395,6 +1395,18 @@ public class JavaBuild {
sb.replace(index, index + "@@lsuipresentationmode@@".length(),
Preferences.getBoolean("export.application.fullscreen") ? "4" : "0");
}
while ((index = sb.indexOf("@@lsarchitecturepriority@@")) != -1) {
// More about this mess: http://support.apple.com/kb/TS2827
// First default to exportBits == 0 case
String arch = "<string>x86_64</string>\n <string>i386</string>";
if (exportBits == 32) {
arch = "<string>i386</string>";
} else if (exportBits == 64) {
arch = "<string>x86_64</string>";
}
sb.replace(index, index + "@@lsarchitecturepriority@@".length(), arch);
}
lines[i] = sb.toString();
}
// explicit newlines to avoid Windows CRLF

View File

@@ -343,7 +343,6 @@
tofile="macosx/work/Processing.app" />
<chmod file="macosx/work/Processing.app/Contents/MacOS/JavaApplicationStub" perm="ugo+x" />
<chmod file="macosx/work/Processing.app/Contents/MacOS/JavaApplicationStub64" perm="ugo+x" />
<copy todir="macosx/work/Processing.app/Contents/Resources/Java" flatten="true">
<fileset refid="runtime.jars"/>
@@ -368,7 +367,6 @@
<!-- The ant copy command does not preserve permissions. -->
<chmod file="macosx/work/Processing.app/Contents/MacOS/JavaApplicationStub" perm="ugo+x" />
<chmod file="macosx/work/Processing.app/Contents/MacOS/JavaApplicationStub64" perm="ugo+x" />
<replace file="macosx/work/Processing.app/Contents/Info.plist"
token="VERSION" value="${version}" />
@@ -404,7 +402,6 @@
<!-- The ant copy command does not preserve permissions. -->
<chmod file="macosx/working_dir/Processing.app/Contents/MacOS/JavaApplicationStub" perm="ugo+x" />
<chmod file="macosx/working_dir/Processing.app/Contents/MacOS/JavaApplicationStub64" perm="ugo+x" />
<!-- Pause briefly for the OS to catch up with the DMG changes.
This prevents "hdiutil: couldn't eject "disk3" - Resource busy"

View File

@@ -27,6 +27,11 @@
<key>LSUIPresentationMode</key>
<integer>@@lsuipresentationmode@@</integer>
<key>LSArchitecturePriority</key>
<array>
@@lsarchitecturepriority@@
</array>
<key>Java</key>
<dict>
<key>VMOptions</key>