DES = Discrete Event Simulator/Simulation Your suggestions for how to get it working under DOS/Windows and how to install the files on other machies will be very helpful. I am going to play around some with the actor first and build a model using it before I tackle those problems. I'll let you know how it works out.
-----Original Message----- Cool, glad it works. Sounds like an interesting application. What is a "DES"? You said > We are looking at replacing this with Ptolemy as a DES with actors > that call the spreadsheet models. $PTII/bin/vergil.bat is created by running make in $PTII/bin which uses a great hack to generate the .bat files. I think if you have your $CLASSPATH set to include your jar file and then do the following from a Cygwin bash shell: cd $PTII/bin make clean make then you will find that your CLASSPATH will be included in vergil.bat. It is arguable that the .bat files should read the users %CLASSPATH% at runtime instead of at compile time. I leave this up to the reader. :-) The quick and dirty thing would be to modify the vergil script so that it properly sets the classpath to include the jar file and distribute that along with a tar of the installation. Another idea would be to modify the Windows Installer files so that the jar files are present and the actors are listed in the configuration. To do this, place your actors in a jar file and add the actor jar file and the poi-2.5.1-final-20040804.jar file to the lax.class.path parameter in vergil-full.lax. When you run vergil-full.exe, vergil-full.lax is read, so your jar files will be accessible. You would also need to create a configuration file that listed your actor so that it would show up in the user's browser. One way to do this is to use the user library. When Ptolemy starts up, it looks for $HOME/.ptolemyII/UserLibrary.xml which can contain user actors. Usually, one can right click on an actor and select "Save in Library", but I managed to break that in the beta. The final release, due out sometime soon (maybe on July 22) will have that fixed. In the short term, you could edit ptolemy/vergil/actor/ActorController.java and change: if (((BasicGraphController) getController()).getFrame() != null) { // If we are in an applet, then we have no frame, so no need // for a "Listen to Actor" or "Save in Library" menu choices. // FIXME: this is not perfect, it would be better if we // could just test if we are in an applet or else fix this // so we have a frame. // NOTE: This requires that the configuration be non null, or it // will report an error. _menuFactory.addMenuItemFactory(new MenuActionFactory( new SaveInLibraryAction())); _listenToActorAction = new ListenToActorAction((BasicGraphController) getController()); _menuFactory.addMenuItemFactory(new MenuActionFactory( _listenToActorAction)); _listenToActorAction.setConfiguration(_configuration); } to: // if (((BasicGraphController) getController()).getFrame() != null) { // If we are in an applet, then we have no frame, so no need // for a "Listen to Actor" or "Save in Library" menu choices. // FIXME: this is not perfect, it would be better if we // could just test if we are in an applet or else fix this // so we have a frame. // NOTE: This requires that the configuration be non null, or it // will report an error. _menuFactory.addMenuItemFactory(new MenuActionFactory( new SaveInLibraryAction())); _listenToActorAction = new ListenToActorAction((BasicGraphController) getController()); _menuFactory.addMenuItemFactory(new MenuActionFactory( _listenToActorAction)); _listenToActorAction.setConfiguration(_configuration); // } and then recompile. Once you have the "Save in library" menu choice working, you could follow the instructions in Volume 1 of the Ptolemy II Design doc, Chapter 5 "Designing Actors" "Appendix B: Creating and Using a simple actor" to add your actor to your $HOME/.ptolemyII/UserLibrary.xml file, which is probably found in C:/Documents and Settings/yourlogin/.ptolemyII/UserLibrary.xml where "yourlogin" is your Windows login. Then, you could distribute that UserLibrary.xml file and a tar of the installed Windows installer to other users. They would need to put the UserLibrary.xml file in the right place and then, if your user clicked on the vergil-full icon, they would get your actor and the poi*.jar file in their classpath. Sounds like a lot of work, eh? Another alternative would be to unjar ptolemy/ptsupport.jar and modify ptolemy/actor/lib/io/io.xml to include your file, rejar up ptolemy/ptsupport.jar, skip modifying UserLibrary.xml but add your jars to vergil-full.lax Another solution that requires quite a bit more work is to create a Web Start configuration or an InstallAnywhere or Installshield installer includes your actors and jar files. _Christopher ---------------------------------------------------------------------------- Posted to the ptolemy-hackers mailing list. Please send administrative mail for this list to: [EMAIL PROTECTED]