FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

moving to Java 1.6 requirement, also add -d32/64 for exports, other misc · jekyllwrite/processing@c981c5d · GitHub

Repository navigation

Commit c981c5d

Browse files
committed
moving to Java 1.6 requirement, also add -d32/64 for exports, other misc
1 parent a27b061 commit c981c5d

8 files changed

Lines changed: 78 additions & 32 deletions

File tree

‎app/src/processing/app/Base.java‎

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -310,12 +310,10 @@ public static void initRequirements() {
310310
try {
311311
Class.forName("com.sun.jdi.VirtualMachine");
312312
} catch (ClassNotFoundException cnfe) {
313-
//Base.showPlatforms();
314-
//static public void showPlatforms() {
315313
Base.openURL("http://wiki.processing.org/w/Supported_Platforms");
316-
Base.showError("Please install JDK 1.5 or later",
314+
Base.showError("Please install JDK 1.6 or later",
317315
"Processing requires a full JDK (not just a JRE)\n" +
318-
"to run. Please install JDK 1.5 or later.\n" +
316+
"to run. Please install JDK 1.6 or later.\n" +
319317
"More information can be found in the reference.", cnfe);
320318
}
321319
}
@@ -373,29 +371,25 @@ public Base(String[] args) {
373371

374372
libraryManagerFrame = new ContributionManagerDialog("Library Manager",
375373
new ContributionListing.Filter() {
376-
377374
public boolean matches(Contribution contrib) {
378375
return contrib.getType() == Contribution.Type.LIBRARY
379376
|| contrib.getType() == Contribution.Type.LIBRARY_COMPILATION;
380377
}
381378
});
382379
toolManagerFrame = new ContributionManagerDialog("Tool Manager",
383380
new ContributionListing.Filter() {
384-
385381
public boolean matches(Contribution contrib) {
386382
return contrib.getType() == Contribution.Type.TOOL;
387383
}
388384
});
389385
modeManagerFrame = new ContributionManagerDialog("Mode Manager",
390386
new ContributionListing.Filter() {
391-
392387
public boolean matches(Contribution contrib) {
393388
return contrib.getType() == Contribution.Type.MODE;
394389
}
395390
});
396391
updateManagerFrame = new ContributionManagerDialog("Update Manager",
397392
new ContributionListing.Filter() {
398-
399393
public boolean matches(Contribution contrib) {
400394
if (contrib instanceof InstalledContribution) {
401395
return ContributionListing.getInstance().hasUpdates(contrib);

‎app/src/processing/mode/java/JavaBuild.java‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1325,6 +1325,16 @@ private boolean exportApplication(File destFolder,
13251325
runOptions += " -Xmx" +
13261326
Preferences.get("run.options.memory.maximum") + "m";
13271327
}
1328+
if (exportPlatform == PConstants.MACOSX) {
1329+
// If no bits specified (libs are all universal, or no native libs)
1330+
// then exportBits will be 0, and can be controlled via "Get Info".
1331+
// Otherwise, need to specify the bits as a VM option.
1332+
if (exportBits == 32) {
1333+
runOptions += " -d32";
1334+
} else if (exportBits == 64) {
1335+
runOptions += " -d64";
1336+
}
1337+
}
13281338

13291339
/// macosx: write out Info.plist (template for classpath, etc)
13301340

‎build/macosx/template.app/Contents/Info.plist‎

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -69,22 +69,16 @@
6969
<key>MainClass</key>
7070
<string>processing.app.Base</string>
7171

72+
<!-- As of 2.0a2 we are now requiring Java 1.6 -->
7273
<key>JVMVersion</key>
73-
<string>1.5+</string>
74+
<string>1.6*</string>
7475

7576
<key>ClassPath</key>
7677
<!-- In 0149, removed /System/Library/Java from the CLASSPATH because
7778
it can cause problems if users have installed weird files there.
7879
http://dev.processing.org/bugs/show_bug.cgi?id=1045 -->
7980
<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>
8081

81-
<key>JVMArchs</key>
82-
<array>
83-
<!-- <string>x86_64</string> --> <!-- currently no 64 bit support -->
84-
<string>i386</string>
85-
<string>ppc</string>
86-
</array>
87-
8882
<!-- 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 -->
8983
<key>Properties</key>
9084
<dict>

‎build/shared/revisions.txt‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
PROCESSING 2.0a2 (REV 0201) - 31 October 2011
2+
3+
Happy Halloween! I'll be dressing up as an ArrayIndexOutOfBoundsException.
4+
5+
This release is primarily focused on the new video library and making it
6+
usable across platforms. It also has some changes for how applications
7+
are exported, and a number of other bug fixes and tweaks.
8+
9+
[ about those changes ]
10+
11+
12+
13+
14+
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
15+
16+
117
PROCESSING 2.0a1 (REV 0200) - 2 September 2011
218

319
First alpha release as we head toward 2.0. Please read the changes page

‎build/windows/export/launcher.cpp‎

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,7 @@ WinMain (HINSTANCE hInst, HINSTANCE hPrev, LPSTR lpCmd, int nShow)
308308
strcpy(executable, "javaw.exe");
309309
}
310310

311+
/*
311312
SHELLEXECUTEINFO ShExecInfo;
312313
313314
//MessageBox(NULL, executable, outgoing_cmd_line, MB_OK);
@@ -352,7 +353,44 @@ WinMain (HINSTANCE hInst, HINSTANCE hPrev, LPSTR lpCmd, int nShow)
352353
break;
353354
}
354355
}
356+
355357
return 0;
358+
*/
359+
360+
PROCESS_INFORMATION pi;
361+
memset(&pi, 0, sizeof(pi));
362+
STARTUPINFO si;
363+
memset(&si, 0, sizeof(si));
364+
si.cb = sizeof(si);
365+
int wait = 0;
366+
367+
DWORD dwExitCode = -1;
368+
char cmdline[32768];
369+
//executable;
370+
//outgoing_cmd_line;
371+
//exe_directory;
372+
strcpy(cmdline, "\"");
373+
strcat(cmdline, executable);
374+
strcat(cmdline, "\" ");
375+
strcat(cmdline, outgoing_cmd_line);
376+
377+
if (CreateProcess(NULL, cmdline, NULL, NULL,
378+
//TRUE, priority, NULL, NULL,
379+
TRUE, 0, NULL, exe_directory,
380+
&si, &pi)) {
381+
if (wait) {
382+
WaitForSingleObject(pi.hProcess, INFINITE);
383+
GetExitCodeProcess(pi.hProcess, &dwExitCode);
384+
//debug("Exit code:\t%d\n", dwExitCode);
385+
//closeHandles();
386+
char[128] big_trouble;
387+
sprintf(big_trouble, "Sorry, could not launch. (Error %d)", dwExitCode);
388+
MessageBox(NULL, big_trouble, "Apologies", MB_OK);
389+
} else {
390+
dwExitCode = 0;
391+
}
392+
}
393+
return dwExitCode;
356394
}
357395

358396

‎build/windows/launcher/config.xml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
</classPath>
2626
<jre>
2727
<path>java</path>
28-
<minVersion>1.5.0</minVersion>
28+
<minVersion>1.6.0</minVersion>
2929
<maxVersion></maxVersion>
3030
<jdkPreference>jdkOnly</jdkPreference>
3131
<opt>-Xms128m -Xmx128m</opt>

‎java/application/template.plist‎

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -27,28 +27,17 @@
2727
<key>LSUIPresentationMode</key>
2828
<integer>@@lsuipresentationmode@@</integer>
2929

30-
<!-- make sure that applications open in 32-bit mode on Snow Leopard,
31-
otherwise video and most other native libraries will choke
32-
http://developer.apple.com/mac/library/documentation/General/Reference/InfoPlistKeyReference/Articles/LaunchServicesKeys.html#//apple_ref/doc/uid/TP40009250-SW1 -->
33-
<key>LSArchitecturePriority</key>
34-
<array>
35-
<string>i386</string>
36-
<string>ppc</string>
37-
</array>
38-
3930
<key>Java</key>
4031
<dict>
4132
<key>VMOptions</key>
4233
<string>@@vmoptions@@</string>
34+
4335
<key>MainClass</key>
4436
<string>@@sketch@@</string>
37+
4538
<key>JVMVersion</key>
46-
<string>1.5*</string>
47-
<key>JVMArchs</key>
48-
<array>
49-
<string>i386</string>
50-
<string>ppc</string>
51-
</array>
39+
<string>1.6*</string>
40+
5241
<key>ClassPath</key>
5342
<string>@@classpath@@</string>
5443

‎todo.txt‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ X on Windows, move the exported DLLs et al inside 'lib'
1010
X requires change to export/launcher.cpp to include the exe dir
1111
_ this will cause trouble with ...
1212
X change Linux script to handle the 'lib' dir as part of the lib path
13+
X changed Mac OS X launchers, also requiring Java 1.6.
14+
15+
// If no bits specified (libs are all universal, or no native libs)
16+
// then exportBits will be 0, and can be controlled via "Get Info".
17+
// Otherwise, need to specify the bits as a VM option.
1318

1419
_ add a preferences option for whether to run in 32 or 64-bit
1520
_ also make note of when library is not available (serial) with error msg

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL