diff --git a/app/PdeBase.java b/app/PdeBase.java index d2e97ce7f..50b358ba1 100644 --- a/app/PdeBase.java +++ b/app/PdeBase.java @@ -34,9 +34,7 @@ import javax.swing.event.*; import javax.swing.text.*; import javax.swing.undo.*; -#ifdef MACOS import com.apple.mrj.*; -#endif /** @@ -171,7 +169,6 @@ public class PdeBase { Runtime.getRuntime().exec("cmd /c \"" + url + "\""); } -#ifdef MACOS } else if (platform == MACOSX) { //com.apple.eio.FileManager.openURL(url); @@ -201,7 +198,6 @@ public class PdeBase { } else if (platform == MACOS9) { com.apple.mrj.MRJFileUtils.openURL(url); -#endif } else if (platform == LINUX) { // how's mozilla sound to ya, laddie? @@ -240,11 +236,9 @@ public class PdeBase { // not tested //Runtime.getRuntime().exec("start explorer \"" + folder + "\""); -#ifdef MACOS } else if (platform == MACOSX) { openURL(folder); // handles char replacement, etc -#endif } } catch (IOException e) { e.printStackTrace(); @@ -371,9 +365,7 @@ public class PdeBase { to.close(); // ?? to = null; -#ifdef JDK13 bfile.setLastModified(afile.lastModified()); // jdk13+ required -#endif //} catch (IOException e) { // e.printStackTrace(); //} @@ -434,9 +426,7 @@ public class PdeBase { if (source.isDirectory()) { //target.mkdirs(); copyDir(source, target); -#ifdef JDK13 target.setLastModified(source.lastModified()); -#endif } else { copyFile(source, target); } diff --git a/app/PdeCompilerJavac.java b/app/PdeCompilerJavac.java index 8993d1b6e..c5f9c4edd 100755 --- a/app/PdeCompilerJavac.java +++ b/app/PdeCompilerJavac.java @@ -23,7 +23,7 @@ */ -#ifdef WE_ARE_OUT_OF_IRAQ +/* import java.io.*; @@ -63,13 +63,8 @@ public class PdeCompilerJavac extends PdeCompiler { args[argc++] = buildPath + File.separator + className + ".java"; //System.out.println("args = " + args[0] + " " + args[1]); -#ifdef JAVAC System.out.println("compiling with javac"); return new sun.tools.javac.Main(leechErr, "javac").compile(args); -#else - System.out.println("compile fell thru"); - return false; -#endif // probably not needed with javac //System.setErr(PdeEditorConsole.consoleErr); @@ -125,4 +120,4 @@ public class PdeCompilerJavac extends PdeCompiler { } -#endif +*/ \ No newline at end of file diff --git a/app/PdeEditor.java b/app/PdeEditor.java index 82d9d644d..d6d2c7712 100644 --- a/app/PdeEditor.java +++ b/app/PdeEditor.java @@ -36,16 +36,11 @@ import javax.swing.undo.*; import com.oroinc.text.regex.*; -#ifdef MACOS import com.apple.mrj.*; -#endif public class PdeEditor extends JFrame -#ifdef MACOS - // TODO dynamically load these handlers via introspection - implements MRJAboutHandler, MRJQuitHandler, MRJPrefsHandler -#endif +implements MRJAboutHandler, MRJQuitHandler, MRJPrefsHandler { // yeah static final String WINDOW_TITLE = "Processing"; @@ -124,12 +119,10 @@ public class PdeEditor extends JFrame // this is needed by just about everything else preferences = new PdePreferences(); -#ifdef MACOS - // #@$*(@#$ apple.. always gotta think different - MRJApplicationUtils.registerAboutHandler(this); - MRJApplicationUtils.registerPrefsHandler(this); - MRJApplicationUtils.registerQuitHandler(this); -#endif + // #@$*(@#$ apple.. always gotta think different + MRJApplicationUtils.registerAboutHandler(this); + MRJApplicationUtils.registerPrefsHandler(this); + MRJApplicationUtils.registerQuitHandler(this); // set the window icon try { @@ -242,9 +235,16 @@ public class PdeEditor extends JFrame screen.height + insets.top + insets.bottom); } else { presentationWindow = new Frame(); -#ifdef JDK14 - ((Frame)presentationWindow).setUndecorated(true); -#endif + //((Frame)presentationWindow).setUndecorated(true); + try { + Method undecoratedMethod = + Frame.class.getMethod("setUndecorated", + new Class[] { Boolean.TYPE }); + undecoratedMethod.invoke(presentationWindow, + new Object[] { Boolean.TRUE }); + + } catch (NoSuchMethodError e) { } + presentationWindow.setBounds(0, 0, screen.width, screen.height); } diff --git a/app/PdeHistory.java b/app/PdeHistory.java index 87b6b4c3a..06fa37890 100644 --- a/app/PdeHistory.java +++ b/app/PdeHistory.java @@ -23,7 +23,7 @@ */ -#ifdef THINGS_WERENT_SO_BUSY +/* import java.awt.*; import java.awt.event.*; @@ -73,9 +73,9 @@ public class PdeHistory { } - /** - * Set the path for the current sketch - */ + + /// Set the path for the current sketch + public void setPath(String path, boolean readOnlySketch) { this.readOnlySketch = true; @@ -95,10 +95,8 @@ public class PdeHistory { } - /** - * Check to see if history should be recorded. - * mode is RUN, SAVE, AUTOSAVE, or BEAUTIFY - */ + /// Check to see if history should be recorded. + /// mode is RUN, SAVE, AUTOSAVE, or BEAUTIFY public void record(String program, int mode) { if (readOnlySketch) return; @@ -255,13 +253,11 @@ public class PdeHistory { } - /* - class HistoryMenuListener implements ActionListener { - public void actionPerformed(ActionEvent e) { - editor.selectHistory(e.getActionCommand); - } - } - */ +// class HistoryMenuListener implements ActionListener { +// public void actionPerformed(ActionEvent e) { +// editor.selectHistory(e.getActionCommand); +// } +// } //public void rebuildHistoryMenu(String path) { @@ -335,14 +331,13 @@ public class PdeHistory { } // add the items to the menu in reverse order - /* - ActionListener historyMenuListener = - new ActionListener() { - public void actionPerformed(ActionEvent e) { - editor.retrieveHistory(e.getActionCommand()); - } - }; - */ + + //ActionListener historyMenuListener = + // new ActionListener() { + // public void actionPerformed(ActionEvent e) { + // editor.retrieveHistory(e.getActionCommand()); + //} + //}; for (int i = historyCount-1; i >= 0; --i) { JMenuItem mi = new JMenuItem(historyList[i]); @@ -359,4 +354,4 @@ public class PdeHistory { } -#endif \ No newline at end of file +*/ \ No newline at end of file diff --git a/app/PdePreferences.java b/app/PdePreferences.java index 39d1efbed..e0a25bb6c 100644 --- a/app/PdePreferences.java +++ b/app/PdePreferences.java @@ -459,14 +459,7 @@ public class PdePreferences extends JComponent { String urlstr = url.getFile(); urlstr = urlstr.substring(0, urlstr.lastIndexOf("/") + 1) + ".properties"; -#ifdef JDK13 - // the ifdef is weird, but it's set for everything but - // macos9, and this will never get hit output = new FileOutputStream(URLDecoder.decode(urlstr)); -#else - System.err.println("bad error while writing sketch.properties"); - System.err.println("you should never see this message"); -#endif } */ diff --git a/app/PdeSketchbook.java b/app/PdeSketchbook.java index 86b8ae307..79f0d3ea3 100644 --- a/app/PdeSketchbook.java +++ b/app/PdeSketchbook.java @@ -35,9 +35,7 @@ import javax.swing.event.*; import javax.swing.text.*; import javax.swing.undo.*; -#ifdef MACOS import com.apple.mrj.*; -#endif public class PdeSketchbook { @@ -162,7 +160,6 @@ public class PdeSketchbook { File newbieFile = new File(newbieDir, newbieName + ".pde"); new FileOutputStream(newbieFile); // create the file -#ifdef MACOS // TODO this wouldn't be needed if i could figure out how to // associate document icons via a dot-extension/mime-type scenario // help me steve jobs. you're my only hope @@ -177,7 +174,6 @@ public class PdeSketchbook { // thank you apple, for changing this @#$)(* //com.apple.eio.setFileTypeAndCreator(String filename, int, int) } -#endif // make a note of a newly added sketch in the sketchbook menu rebuildMenu(); diff --git a/build/windows/make.sh b/build/windows/make.sh index a2200f233..de9862789 100755 --- a/build/windows/make.sh +++ b/build/windows/make.sh @@ -2,27 +2,27 @@ # move to base 'processing' directory -cd ../.. +#cd ../.. ### -- CHECK TO MAKE SURE BAGEL EXISTS ------------------------- # make sure bagel exists, if not, check it out of cvs -if test -d bagel -then -else - echo Doing CVS checkout of bagel... - cvs co bagel - cd bagel - cvs update -P - cd .. -fi +#if test -d bagel +#then +#else +# echo Doing CVS checkout of bagel... +# cvs co bagel +# cd bagel +# cvs update -P +# cd .. +#fi ### -- SETUP WORK DIR ------------------------------------------- # back to where we came from -cd build/windows +#cd build/windows if test -d work then @@ -61,82 +61,90 @@ else chmod +x client/*.dll cd ../../.. - mkdir work/lib/export +# mkdir work/lib/export mkdir work/lib/build # this will copy cvs files intact, meaning that changes # could be made and checked back in.. interesting mkdir work/classes - # no longer needed with super-release + # no longer needed with megabucket #cp dist/lib/pde_windows.properties work/lib/ - + echo Compiling processing.exe cd launcher make && cp processing.exe ../work/ cd .. # get the serial stuff - echo Copying serial support from bagel dir... - cp ../../bagel/serial/comm.jar work/lib/ - cp ../../bagel/serial/javax.comm.properties work/lib/ - cp ../../bagel/serial/win32com.dll work/ - chmod +x work/win32com.dll +# echo Copying serial support from processing.lib dir... +# cp ../../lib/serial/comm.jar work/lib/ +# cp ../../lib/serial/javax.comm.properties work/lib/ +# cp ../../lib/serial/win32com.dll work/ +# chmod +x work/win32com.dll # get jikes and depedencies - #gunzip < dist/jikes.gz > work/jikes.exe cp dist/jikes.exe work/ chmod +x work/jikes.exe fi cd ../.. -### -- BUILD BAGEL ---------------------------------------------- +### -- BUILD CORE ---------------------------------------------- + +echo Building processing.core # move to bagel inside base 'processing' directory -cd bagel +#cd bagel +cd core +rm -f processing/core/*.class # clear jikespath to avoid problems if it is defined elsewhere -unset JIKESPATH +#unset JIKESPATH -QT_JAVA_PATH="$WINDIR\\system32\\QTJava.zip" -if test -f "${QT_JAVA_PATH}" -then - #echo "Found Quicktime at $QT_JAVA_PATH" -else - QT_JAVA_PATH="$WINDIR\\system\\QTJava.zip" - if test -f "${QT_JAVA_PATH}" - echo "could not find qtjava.zip in either" - echo "${WINDIR}\\system32\\qtjava.zip or" - echo "${WINDIR}\\system\\qtjava.zip" - echo "quicktime for java must be installed before building." - exit 1; - then - #echo "Found Quicktime at $QT_JAVA_PATH" - else - fi -fi +#QT_JAVA_PATH="$WINDIR\\system32\\QTJava.zip" +#if test -f "${QT_JAVA_PATH}" +#then +# #echo "Found Quicktime at $QT_JAVA_PATH" +#else +# QT_JAVA_PATH="$WINDIR\\system\\QTJava.zip" +# if test -f "${QT_JAVA_PATH}" +# echo "could not find qtjava.zip in either" +# echo "${WINDIR}\\system32\\qtjava.zip or" +# echo "${WINDIR}\\system\\qtjava.zip" +# echo "quicktime for java must be installed before building." +# exit 1; +# then +# #echo "Found Quicktime at $QT_JAVA_PATH" +# else +# fi +#fi # new regular version -CLASSPATH="..\\build\\windows\\work\\java\\lib\\rt.jar;..\\build\\windows\\work\\lib\\comm.jar;${QT_JAVA_PATH}" +#CLASSPATH="..\\build\\windows\\work\\java\\lib\\rt.jar;..\\build\\windows\\work\\lib\\comm.jar;${QT_JAVA_PATH}" +CLASSPATH="..\\build\\windows\\work\\java\\lib\\rt.jar export CLASSPATH -perl make.pl JIKES=../build/windows/work/jikes JDK13 -cp classes/*.class ../build/windows/work/classes/ +../build/windows/work/jikes -d . +D -target 1.1 *.java +zip -r0q ../../build/windows/work/lib/core.jar processing + +#perl make.pl JIKES=../build/windows/work/jikes JDK13 +#cp classes/*.class ../build/windows/work/classes/ + +#echo Building export classes for 1.1 +#rm -f classes/*.class +#perl make.pl JIKES=../build/windows/work/jikes +#cd classes +#zip -0q ../../build/windows/work/lib/export11.jar *.class +#cd .. + +#echo Building export classes for 1.3 +#rm -f classes/*.class +#perl make.pl JIKES=../build/windows/work/jikes +#cd classes +#zip -0q ../../build/windows/work/lib/export13.jar *.class +#cd .. -echo Building export classes for 1.1 -rm -f classes/*.class -perl make.pl JIKES=../build/windows/work/jikes -cd classes -zip -0q ../../build/windows/work/lib/export11.jar *.class -cd .. - -echo Building export classes for 1.3 -rm -f classes/*.class -perl make.pl JIKES=../build/windows/work/jikes -cd classes -zip -0q ../../build/windows/work/lib/export13.jar *.class -cd .. # back to base processing dir cd .. @@ -173,10 +181,9 @@ fi cd app -CLASSPATH="..\\build\\windows\\work\\classes;..\\build\\windows\\work\\lib\\kjc.jar;..\\build\\windows\\work\\lib\antlr.jar;..\\build\\windows\\work\\lib\\oro.jar;..\\build\\windows\\work\\java\\lib\\rt.jar;..\\build\\windows\\work\\lib\\comm.jar;${QT_JAVA_PATH}" +CLASSPATH="..\\build\\windows\\work\\classes;..\\build\\windows\\work\\lib\antlr.jar;..\\build\\windows\\work\\lib\\oro.jar;..\\build\\windows\\work\\java\\lib\\rt.jar;..\\build\\windows\\work\\lib\\comm.jar" perl ../bagel/buzz.pl "../build/windows/work/jikes +D -classpath \"$CLASSPATH\" -d \"..\\build\\windows\\work/classes\"" -dJDK13 -dJDK14 *.java jeditsyntax/*.java preprocessor/*.java -#perl ../bagel/buzz.pl "javac -classpath \"$CLASSPATH\" -d \"..\\build\\windows\\work/classes\"" -dJDK13 -dJDK14 *.java jeditsyntax/*.java preprocessor/*.java cd ../build/windows/work/classes rm -f ../lib/pde.jar diff --git a/core/PApplet.java b/core/PApplet.java index c94bd5c41..f4f0eb8e8 100644 --- a/core/PApplet.java +++ b/core/PApplet.java @@ -829,7 +829,7 @@ public class PApplet extends Applet createImage(new MemoryImageSource(image.width, image.height, image.pixels, 0, image.width)); - Toolkit tk = Toolkit.getDefaultToolkit(); + //Toolkit tk = Toolkit.getDefaultToolkit(); Point hotspot = new Point(hotspotX, hotspotY); try { Method mCustomCursor =