Installing Ptplot
Ptplot is distributed in several formats.
Ptplot is shipped with the java files precompiled, so you need not
recompile. However, if you are using the standalone scripts such as
ptplot
, then you may want to go through the installation
procedure so that the standalone scripts are properly localized.
If you are using Windows and you want to rebuild Ptplot or
localize the standalone scripts, then you will need to install the
Cygwin toolkit from
http://sourceware.cygnus.com/cygwin/
so that you can run /bin/sh
and make
.
If you are running Windows and do not want to install the Cygwin toolkit,
then see
Using Ptplot under Windows without Cygwin
Below are the installation instructions for Unix and Windows
with Cygwin.
- Be sure that JDK1.2 is installed, and that
javac
is in your path.
- Untar or unzip the Ptplot distribution.
- Set the
PTII
environment variable to point
to the top of the Ptplot tree. Under C-shell, one would do:
setenv PTII ~/src/ptplot3.1
- cd into the
PTII
directory:
cd $PTII
- Run
configure
./configure
- Run make
make
- View the applets by going starting your browser and going to:
ptolemy/plot/doc/index.htm
Ptplot is also available in several self-extracting formats
that were created with the Installshield JShield tool.
Our use of this tool is still experimental. If you have problems,
please try the tar or zip files.
Note that when you run the installer under Windows, Ptplot is
added to your Start menu under Ptolemy -> Ptplot.
Installshield limitations
Notes about building and installing
How does configure work?
configure
is a /bin/sh
script
that determines some information about your environment and
then modifies a few files.
When the configure
script is run, it reads in
mk/ptII.mk.in
and
ptolemy/plot/ptplot.in
generates
mk/ptII.mk
and
ptolemy/plot/ptplot
To get help with configure
, try
./configure --help
configure
reads in the .in
files
and substitutes strings inside the @
For example, configure
reads in
ptolemy/plot/ptplot.in
and
PTII_DEFAULT=@PTII_DEFAULT@
PTJAVA_DIR=@PTJAVA_DIR@
becomes
PTII_DEFAULT=/users/cxh/ptII
PTJAVA_DIR=/usr/java1.1
Below are the instructions for using Ptplot
if you are under Windows and you do not have the Cygwin and have
downloaded the tar or zip files.
- Set the
PTII
variable to the top-level
directory of the Ptplot tree.
C:\ptplot3.1> PTII=c:\ptplot3.1
PTII
is used by the standalone ptplot.bat
script and other scripts
- Be sure that
java
is in your path by running
java -version
- Added
%PTII\bin
to your PATH.
- Run
ptplot.in
Usually, it is not necessary to recompile the Ptplot classes, but
below are the instructions for recompiling by hand under Windows without
Cygwin.
- To compile the Ptplot Java classes, they must be in the directory
ptolemy\plot.
C:\ptplot3.1> cd ptolemy\plot
- set your CLASSPATH to ..\..
C:\ptplot3.1\ptolemy\plot>set CLASSPATH=..\..
C:\ptplot3.1\ptolemy\plot>echo %CLASSPATH%
..\..
- Remove the old Java files and compile them
C:\ptplot3.1\ptolemy\plot>del *.java *\*.java
C:\ptplot3.1\ptolemy\plot>javac *.java
- Run
ptplot.bat
, which reads %PTII%
C:\ptplot3.1\ptolemy\plot>ptplot.bat
Installing Ptplot as an applet
Ptplot includes several jar files, which are collections of
Java .class
files
-
plotapplet.jar
- .class files necessary for simple JDK1.1
browser applets - no pxgraph, no plotml.
-
pxgraphapplet.jar
- .class files necessary for simple JDK1.1
browser applets with pxgraph classes, no plotml.
Applets that use the
pxgraphargs
applet parameter
should use this jar file.
-
plotmlapplet.jar
- .class files necessary for PlotML applets -
includes com/microstar/xml and the plotml code, but does not include pxgraph,
or PlotFrame.
-
plot.jar
- The standard Ptolemy II jar file that includes the
ptolemy/plot/*.class files and the class files in plotml and compat.
Does not include com/microstar/xml or ptolemy/gui.
plot.jar
is used by the Ptolemy II build system.
-
plotapplication.jar
- .class files necessary for standalone applications - includes
com/microstar/xml, ptolemy/gui and the plotml code, but does not
include pxgraph. If
plotapplication.jar
is
present, then it is used by the standalone scripts (ptplot
etc.)
The best way to use Ptplot as an applet is to copy the appropriate
*applet.jar
file into the same directory as your applet,
and then to use the archive
applet directive.
For examples of applet html code, see the demonstrations.
Installing Ptplot as an application
Under Unix and Windows with the Cygwin toolkit,
ptplot can be run as three standalone applications:
When configure is run, it substitutes variables inside ptplot.in
and produced ptplot
. The ptplot
script
is shared between the standalone applications, ptplot
determines what name it was called with, and selects the appropriate
class accordingly.
If the ptplot
script is run,
then ptolemy.plot.PlotApplication
is run
If the ptplot
script is copied to histogram
,
then ptolemy.plot.plotml.HistogramMLApplication
is run
If the ptplot
script is copied to pxgraph
,
then ptolemy.plot.compat.PxgraphApplication
is run
Under Unix, you can use a hard link to create the histogram and
pxgraph script:
ln ptplot histogram
ln ptplot pxgraph
Under Windows, three .bat scripts are provided:
ptplot.bat
, histogram.bat
and
pxgraph.bat
Last Updated: $Date: 1999/08/20 15:58:52 $