diff --git a/processing/app/PdeBase.java b/processing/app/PdeBase.java index 8de8374af..74d924214 100644 --- a/processing/app/PdeBase.java +++ b/processing/app/PdeBase.java @@ -118,12 +118,6 @@ public class PdeBase extends Frame static public void main(String args[]) { - try { - UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); - } catch (Exception e) { - e.printStackTrace(); - } - //System.getProperties().list(System.out); //System.out.println(System.getProperty("java.class.path")); @@ -152,6 +146,20 @@ public class PdeBase extends Frame } } + try { + //if (platform == LINUX) { + // linux is by default (motif?) even uglier than metal + // actually, i'm using native menus, so they're ugly and + // motif-looking. ick. need to fix this. + //System.out.println("setting to metal"); + //UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName()); + //} else { + UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); + //} + } catch (Exception e) { + e.printStackTrace(); + } + //try { PdeBase app = new PdeBase(); // people attempting to use p5 in headless mode are @@ -214,13 +222,35 @@ public class PdeBase extends Frame } //properties.list(System.out); - } catch (Exception e) { System.err.println("Error reading pde.properties"); e.printStackTrace(); //System.exit(1); } + // check to see if quicktime for java is installed on windows + // since it's temporarily required for 0058 + if (platform == WINDOWS) { + // location for 95/98/ME/XP + File qt1 = new File("C:\\WINDOWS\\system32\\QTJava.zip"); + // location for win2k + File qt2 = new File("C:\\WINNT\\system32\\QTJava.zip"); + + if (!qt1.exists() && !qt2.exists()) { + final String message = + "QuickTime for Java could not be found.\n" + + "Please download QuickTime from Apple at:\n" + + "http://www.apple.com/quicktime/download\n" + + "and use the 'Custom' install to make sure\n" + + "that QuickTime for Java is included."; + + JOptionPane.showMessageDialog(this, message, + "Could not find QuickTime for Java", + JOptionPane.WARNING_MESSAGE); + System.exit(1); + } + } + // read in the keywords for the reference diff --git a/processing/app/PdeCompiler.java b/processing/app/PdeCompiler.java index cc323a132..d059a5e98 100644 --- a/processing/app/PdeCompiler.java +++ b/processing/app/PdeCompiler.java @@ -24,6 +24,7 @@ */ import java.io.*; +import javax.swing.*; public class PdeCompiler implements PdeMessageConsumer{ @@ -74,8 +75,12 @@ public class PdeCompiler implements PdeMessageConsumer{ #endif } + //System.out.println(userdir + "jikes"); + //System.out.println(System.getProperty("sun.boot.class.path")); + String command[] = new String[] { #ifdef MACOS + // linux doesn't seem to like this userdir + "jikes", #else "jikes", @@ -97,6 +102,11 @@ public class PdeCompiler implements PdeMessageConsumer{ buildPath + File.separator + className + ".java" // file to compile }; + //for (int i = 0; i < command.length; i++) { + //System.out.println("C1: " + command[i]); + //System.out.println(); + //} + firstErrorFound = false; // haven't found any errors yet secondErrorFound = false; @@ -123,6 +133,17 @@ public class PdeCompiler implements PdeMessageConsumer{ } } catch (Exception e) { + if (e.getMessage().indexOf("jikes: not found") != -1) { + //System.err.println("jikes is missing"); + JOptionPane.showMessageDialog(editor.base, + "Could not find the compiler.\n" + + "jikes is missing from your PATH,\n" + + "see readme.txt for help.", + "Compiler error", + JOptionPane.ERROR_MESSAGE); + return false; + } + e.printStackTrace(); result = -1; } @@ -146,7 +167,8 @@ public class PdeCompiler implements PdeMessageConsumer{ // part of the PdeMessageConsumer interface // public void message(String s) { - System.err.println("MSG: " + s); + //System.err.println("MSG: " + s); + System.err.print(s); // ignore cautions if (s.indexOf("Caution") != -1) return; diff --git a/processing/app/PdeEditorStatus.java b/processing/app/PdeEditorStatus.java index f6fa48339..5f93f05c7 100644 --- a/processing/app/PdeEditorStatus.java +++ b/processing/app/PdeEditorStatus.java @@ -53,7 +53,8 @@ public class PdeEditorStatus extends Panel static final String PROMPT_OK = "Ok"; static final String NO_MESSAGE = ""; - static final int BUTTON_WIDTH = 70; //66; + // mac needs it to be 70, windows needs 66, linux needs 76 + static final int BUTTON_WIDTH = 76; static final int BUTTON_HEIGHT = 24; PdeEditor editor;