moving to Java 1.6 requirement, also add -d32/64 for exports, other misc

This commit is contained in:
benfry
2011-10-31 23:45:44 +00:00
parent b38875a56e
commit c4faf2dc28
8 changed files with 78 additions and 32 deletions

View File

@@ -310,12 +310,10 @@ public class Base {
try {
Class.forName("com.sun.jdi.VirtualMachine");
} catch (ClassNotFoundException cnfe) {
//Base.showPlatforms();
//static public void showPlatforms() {
Base.openURL("http://wiki.processing.org/w/Supported_Platforms");
Base.showError("Please install JDK 1.5 or later",
Base.showError("Please install JDK 1.6 or later",
"Processing requires a full JDK (not just a JRE)\n" +
"to run. Please install JDK 1.5 or later.\n" +
"to run. Please install JDK 1.6 or later.\n" +
"More information can be found in the reference.", cnfe);
}
}
@@ -373,7 +371,6 @@ public class Base {
libraryManagerFrame = new ContributionManagerDialog("Library Manager",
new ContributionListing.Filter() {
public boolean matches(Contribution contrib) {
return contrib.getType() == Contribution.Type.LIBRARY
|| contrib.getType() == Contribution.Type.LIBRARY_COMPILATION;
@@ -381,21 +378,18 @@ public class Base {
});
toolManagerFrame = new ContributionManagerDialog("Tool Manager",
new ContributionListing.Filter() {
public boolean matches(Contribution contrib) {
return contrib.getType() == Contribution.Type.TOOL;
}
});
modeManagerFrame = new ContributionManagerDialog("Mode Manager",
new ContributionListing.Filter() {
public boolean matches(Contribution contrib) {
return contrib.getType() == Contribution.Type.MODE;
}
});
updateManagerFrame = new ContributionManagerDialog("Update Manager",
new ContributionListing.Filter() {
public boolean matches(Contribution contrib) {
if (contrib instanceof InstalledContribution) {
return ContributionListing.getInstance().hasUpdates(contrib);

View File

@@ -1325,6 +1325,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";
}
}
/// macosx: write out Info.plist (template for classpath, etc)

View File

@@ -69,8 +69,9 @@
<key>MainClass</key>
<string>processing.app.Base</string>
<!-- As of 2.0a2 we are now requiring Java 1.6 -->
<key>JVMVersion</key>
<string>1.5+</string>
<string>1.6*</string>
<key>ClassPath</key>
<!-- In 0149, removed /System/Library/Java from the CLASSPATH because
@@ -78,13 +79,6 @@
http://dev.processing.org/bugs/show_bug.cgi?id=1045 -->
<string>$JAVAROOT/pde.jar:$JAVAROOT/core.jar:$JAVAROOT/ant.jar:$JAVAROOT/ant-launcher.jar:$JAVAROOT/antlr.jar:$JAVAROOT/ecj.jar:$JAVAROOT/jna.jar:$JAVAROOT/quaqua.jar</string>
<key>JVMArchs</key>
<array>
<!-- <string>x86_64</string> --> <!-- currently no 64 bit support -->
<string>i386</string>
<string>ppc</string>
</array>
<!-- More properties can be found in http://developer.apple.com/releasenotes/Java/java141/system_properties/chapter_4_section_1.html#//apple_ref/doc/uid/TP30000285 -->
<key>Properties</key>
<dict>

View File

@@ -1,3 +1,19 @@
PROCESSING 2.0a2 (REV 0201) - 31 October 2011
Happy Halloween! I'll be dressing up as an ArrayIndexOutOfBoundsException.
This release is primarily focused on the new video library and making it
usable across platforms. It also has some changes for how applications
are exported, and a number of other bug fixes and tweaks.
[ about those changes ]
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
PROCESSING 2.0a1 (REV 0200) - 2 September 2011
First alpha release as we head toward 2.0. Please read the changes page

View File

@@ -308,6 +308,7 @@ WinMain (HINSTANCE hInst, HINSTANCE hPrev, LPSTR lpCmd, int nShow)
strcpy(executable, "javaw.exe");
}
/*
SHELLEXECUTEINFO ShExecInfo;
//MessageBox(NULL, executable, outgoing_cmd_line, MB_OK);
@@ -352,7 +353,44 @@ WinMain (HINSTANCE hInst, HINSTANCE hPrev, LPSTR lpCmd, int nShow)
break;
}
}
return 0;
*/
PROCESS_INFORMATION pi;
memset(&pi, 0, sizeof(pi));
STARTUPINFO si;
memset(&si, 0, sizeof(si));
si.cb = sizeof(si);
int wait = 0;
DWORD dwExitCode = -1;
char cmdline[32768];
//executable;
//outgoing_cmd_line;
//exe_directory;
strcpy(cmdline, "\"");
strcat(cmdline, executable);
strcat(cmdline, "\" ");
strcat(cmdline, outgoing_cmd_line);
if (CreateProcess(NULL, cmdline, NULL, NULL,
//TRUE, priority, NULL, NULL,
TRUE, 0, NULL, exe_directory,
&si, &pi)) {
if (wait) {
WaitForSingleObject(pi.hProcess, INFINITE);
GetExitCodeProcess(pi.hProcess, &dwExitCode);
//debug("Exit code:\t%d\n", dwExitCode);
//closeHandles();
char[128] big_trouble;
sprintf(big_trouble, "Sorry, could not launch. (Error %d)", dwExitCode);
MessageBox(NULL, big_trouble, "Apologies", MB_OK);
} else {
dwExitCode = 0;
}
}
return dwExitCode;
}

View File

@@ -25,7 +25,7 @@
</classPath>
<jre>
<path>java</path>
<minVersion>1.5.0</minVersion>
<minVersion>1.6.0</minVersion>
<maxVersion></maxVersion>
<jdkPreference>jdkOnly</jdkPreference>
<opt>-Xms128m -Xmx128m</opt>

View File

@@ -27,28 +27,17 @@
<key>LSUIPresentationMode</key>
<integer>@@lsuipresentationmode@@</integer>
<!-- make sure that applications open in 32-bit mode on Snow Leopard,
otherwise video and most other native libraries will choke
http://developer.apple.com/mac/library/documentation/General/Reference/InfoPlistKeyReference/Articles/LaunchServicesKeys.html#//apple_ref/doc/uid/TP40009250-SW1 -->
<key>LSArchitecturePriority</key>
<array>
<string>i386</string>
<string>ppc</string>
</array>
<key>Java</key>
<dict>
<key>VMOptions</key>
<string>@@vmoptions@@</string>
<key>MainClass</key>
<string>@@sketch@@</string>
<key>JVMVersion</key>
<string>1.5*</string>
<key>JVMArchs</key>
<array>
<string>i386</string>
<string>ppc</string>
</array>
<string>1.6*</string>
<key>ClassPath</key>
<string>@@classpath@@</string>

View File

@@ -10,6 +10,11 @@ X on Windows, move the exported DLLs et al inside 'lib'
X requires change to export/launcher.cpp to include the exe dir
_ this will cause trouble with ...
X change Linux script to handle the 'lib' dir as part of the lib path
X changed Mac OS X launchers, also requiring Java 1.6.
// 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.
_ add a preferences option for whether to run in 32 or 64-bit
_ also make note of when library is not available (serial) with error msg