diff --git a/app/KjcEngine.java b/app/KjcEngine.java index 439fd1760..e51c781b1 100644 --- a/app/KjcEngine.java +++ b/app/KjcEngine.java @@ -600,6 +600,8 @@ public class KjcEngine extends PdeEngine { applet = (KjcApplet) c.newInstance(); //((KjcApplet)applet).errStream = leechErr; applet.setEngine(this); + // has to be before init + applet.serialProperties(PdeBase.properties); applet.init(); applet.start(); diff --git a/app/PdeBase.java b/app/PdeBase.java index ba8e4f1a5..5053c79fb 100644 --- a/app/PdeBase.java +++ b/app/PdeBase.java @@ -67,6 +67,8 @@ public class PdeBase implements ActionListener { static public void main(String args[]) { + //System.getProperties().list(System.out); + System.out.println(System.getProperty("java.class.path")); PdeBase app = new PdeBase(); } diff --git a/app/PdeEditor.java b/app/PdeEditor.java index 81c6fe08c..a2267724b 100644 --- a/app/PdeEditor.java +++ b/app/PdeEditor.java @@ -537,18 +537,18 @@ public class PdeEditor extends Panel { // -> keep this around for closing the external window public void doClose() { // grab window position - if (engine != null) { + //if (engine != null) { + try { if ((presentationWindow == null) || (!presentationWindow.isVisible())) { appletLocation = engine.window.getLocation(); } - // prone to bugs and doesn't work yet // if ((presentationWindow != null) && // (presentationWindow.isVisible())) { // presentLocation = engine.window.getLocation(); // } - } + } catch (NullPointerException e) { } if (running) { //System.out.println("was running, will call doStop()"); diff --git a/build/windows/dist/Proce55ing.exe b/build/windows/dist/Proce55ing.exe index b7efc7a01..d87368016 100755 Binary files a/build/windows/dist/Proce55ing.exe and b/build/windows/dist/Proce55ing.exe differ diff --git a/build/windows/dist/lib/pde.properties_windows b/build/windows/dist/lib/pde.properties_windows index e69de29bb..4d486acea 100644 --- a/build/windows/dist/lib/pde.properties_windows +++ b/build/windows/dist/lib/pde.properties_windows @@ -0,0 +1 @@ +serial.port=COM1 \ No newline at end of file diff --git a/build/windows/launcher/launcher.cpp b/build/windows/launcher/launcher.cpp index 055cb6fbd..4c2859b0c 100644 --- a/build/windows/launcher/launcher.cpp +++ b/build/windows/launcher/launcher.cpp @@ -13,6 +13,7 @@ //#define STACKSIZE_MATCH " -mx" #define JAVA_ARGS "" #define JAVA_MAIN_CLASS "PdeBase" +//#define JAVA_CLASS_PATH "lib;lib\\build;lib\\pde.jar;lib\\kjc.jar;lib\\oro.jar;lib\\ext\\comm.jar" #ifdef _DEBUG #define new DEBUG_NEW @@ -55,9 +56,9 @@ BOOL CLauncherApp::InitInstance() // what was passed to this application char *incoming_cmdline = (char *)malloc(256 * sizeof(char)); strcpy (incoming_cmdline, this->m_lpCmdLine); - + // what gets put together to pass to jre - char *outgoing_cmdline = (char *)malloc(2048 * sizeof(char)); + char *outgoing_cmdline = (char *)malloc(16384 * sizeof(char)); char *p = outgoing_cmdline; // prepend the args for -mx and -ms if they weren't @@ -89,26 +90,36 @@ BOOL CLauncherApp::InitInstance() strcpy(outgoing_cmdline, JAVA_ARGS); // append the classpath and launcher.Application - char *cp = (char *)malloc(1024 * sizeof(char)); + //char *cp = (char *)malloc(1024 * sizeof(char)); char *loaddir = (char *)malloc(MAX_PATH * sizeof(char)); + *loaddir = 0; GetModuleFileName(NULL, loaddir, MAX_PATH); // remove the application name *(strrchr(loaddir, '\\')) = '\0'; - //cp = (char *)malloc(5 * strlen(loaddir) + 200); + char *cp = (char *)malloc(8 * strlen(loaddir) + 200); // put quotes around contents of cp, // because %s might have spaces in it. + sprintf(cp, "-cp \"" "%s\\lib;" "%s\\lib\\build;" "%s\\lib\\pde.jar;" "%s\\lib\\kjc.jar;" - "%s\\lib\\oro.jar" + "%s\\lib\\oro.jar;" + "%s\\lib\\java\\ext\\comm.jar" "\" ", - loaddir, loaddir, loaddir, loaddir, loaddir); + loaddir, loaddir, loaddir, loaddir, loaddir, loaddir); + + //sprintf(cp, "-cp "); + //strcat(cp, JAVA_CLASSPATH); + //strcat(cp, " "); strcat(outgoing_cmdline, cp); + //strcat(outgoing_cmdline, "-cp "); + //strcat(outgoing_cmdline, JAVA_CLASS_PATH); + //strcat(outgoing_cmdline, " "); // add the name of the class to execute //strcat(outgoing_cmdline, "launcher.Application "); @@ -125,7 +136,7 @@ BOOL CLauncherApp::InitInstance() strcpy(executable, loaddir); // copy in the path for jrew, relative to launcher.exe //strcat(executable, "\\bin\\jrew"); - strcat(executable, "\\java\\bin\\javaw"); + strcat(executable, "\\java\\bin\\java"); //AfxMessageBox(executable); @@ -145,7 +156,8 @@ BOOL CLauncherApp::InitInstance() HINSTANCE result; result = ShellExecute(NULL, "open", executable, - outgoing_cmdline, NULL, SW_SHOWNORMAL); + outgoing_cmdline, loaddir, SW_SHOWNORMAL); +// outgoing_cmdline, NULL, SW_SHOWNORMAL); if ((int)result <= 32) { // some type of error occurred diff --git a/build/windows/launcher/launcher.exe b/build/windows/launcher/launcher.exe index b7efc7a01..9a8dabd4b 100755 Binary files a/build/windows/launcher/launcher.exe and b/build/windows/launcher/launcher.exe differ diff --git a/build/windows/run.sh b/build/windows/run.sh index f7219861d..7c873ac84 100644 --- a/build/windows/run.sh +++ b/build/windows/run.sh @@ -1,2 +1,2 @@ #!/bin/sh -cd work && ./java/bin/java -cp lib\;lib\\build\;lib\\pde.jar\;lib\\kjc.jar\;lib\\oro.jar PdeBase +cd work && ./java/bin/java -cp lib\;lib\\build\;lib\\pde.jar\;lib\\kjc.jar\;lib\\oro.jar\;java\\lib\\ext\\comm.jar PdeBase diff --git a/todo.txt b/todo.txt index 5a2d0b39c..eb33a6700 100644 --- a/todo.txt +++ b/todo.txt @@ -4,16 +4,13 @@ X get icon in macos9/macosx/windows formats X wahoo! figure out how to do do simple .exe with icons o use launcher code from sun jre o needs to be built from command line - -dammit we need a text editor. -gonna get sick of people bitching about it. -also an interesting possibility (for tech-minded only) - use terminal emulator, and run iostream from process - use pooterm stuff for the emulation window - key commands would conflict - but could use emacs under osx, linux - use nano (maybe emacs?) under windows - and nothing for macos9 +X keyPressed() and others weren't being called +X serial work under windows +X make bapplet a serialporteventlistener +X remove 'public' from beginner listener event handlers +X trying to make eventlistener work +X comm.jar has to be in classpath for kjc (interesting) +X fixed launcher.exe because of problems in classpath a _ this code is not performing correctly BImage b; // declare variable "b" of type BImage @@ -54,6 +51,7 @@ a _ for 'java' mode, try run using external vm a _ would need to get error output stream from app.. argh a _ only allow under win/osx/linux a _ not clear how to kill the process.. does that work w/ 1.3? +? _ lockup when something missing from classpath on dynamic load macos9 a _ getResource stuff breaks, sketch.properties can't save @@ -123,6 +121,16 @@ a _ queue for people reporting things externally a _ bugzilla but simpler a _ would also be nice for people to be able to vote on features +dammit we need a text editor. +gonna get sick of people bitching about it. +also an interesting possibility (for tech-minded only) + use terminal emulator, and run iostream from process + use pooterm stuff for the emulation window + key commands would conflict + but could use emacs under osx, linux + use nano (maybe emacs?) under windows + and nothing for macos9 + ////////////////////////////////////////////////////////////////////