javac
and java
are available,
and have the make
command available.
export PTII=c:/Ptolemy/ptII5.0
setenv PTII /users/yourname/ptII
cd "$PTII" rm -f config.* ./configure
make fast install
$PTII/bin/vergil
PTII
is covered in
the Unix and Windows
sections below.
http://java.sun.com/j2se/1.5/
.
Locally, we used Java 1.4.2_06 and Java 1.5.0_01.
The Java download is available in several formats.
javac
bin
directory is in your path so that
the javac
and java
commands are available.
http://java.sun.com/products/plugin/
Currently, the Java Plug-in 1.5 is included in the JRE and JDK downloads for Windows.
If you are running under Solaris, you can download a separate plug-in or a complete Netscape installation.
If your platform is not supported by the plug-in, you can run
the applets with the JDK appletviewer
command.
See the Plug-in section of the Ptolemy II Troubleshooting guide for details.
The Ptolemy II distribution includes $PTII/lib/diva.jar
.
As of Ptolemy II 4.0, the Diva sources and documentation are included in the source release.
More information about Diva can be found at
http://embedded.eecs.berkeley.edu/diva/
.
Usually, one not need install Jython as
all Ptolemy II distributions that include the PythonScript actor
also include Jython as $PTII/lib/jython.jar
.
The Ptolemy II source distribution also includes $PTII/lib/jython.jar
.
Jython is covered by a
Jython specific copyright
If, for some reason you want to install Jython by hand:
http://www.jython.org
http://www.jython.org/install.html
java -classpath . jython-21and then install Jython in
$PTII/vendors/jython
$PTII/lib/jython.jar
and
then $PTII/vendors/jython/jython.jar
test
subdirectory that contains
Tcl files that use Jacl to test the Ptolemy II Java code.
Jacl is only necessary if you are planning on running the Ptolemy II test suite.
We ship a customized version of Jacl called Ptjacl. The primary difference between Ptjacl and Jacl1.1 is that Ptjacl is shipped as one jar file.
The Ptjacl jar file at $PTII/lib/ptjacl.jar
is shipped with Ptolemy II.
For more information about Jacl and Tcl Blend, see
http://www.sable.mcgill.ca/soot/
If the code generator is present, then we include
sootclasses.jar
and jasminclasses.jar
in
$PTII/lib
Soot and Jasmin are both covered by the Soot and Jasmin specific copyright
You need not download the CaffeineMark benchmark unless you are interested in benchmarking the Copernicus C code generator.
The main page for the CaffeineMark is
http://www-sor.inria.fr/~java/tools/cmkit
To install, do
cd $PTII/vendors/cm # Download http://www-sor.inria.fr/~java/tools/cmkit/embed.zip jar -xf embed.zip
http://hoschek.home.cern.ch/hoschek/colt/
You need not download Colt unless you are planning on using the Colt actors or running the demonstrations in ptolemy/actor/lib/colt.
We verified that Colt 1.0.3 works with these actors.
http://hoschek.home.cern.ch/hoschek/colt/download.htm
$PTII/vendors/misc/colt
$PTII/vendors/misc/colt/colt.jar
to $PTII/lib/
http://www.hpl.hp.com/personal/Hans_Boehm/gc/
You need not download the Garbage Collector unless you are planning on using the Copernicus C code generator.
The configure program looks for the Garbage Collector in
$PTII/vendors/gc
.
To install the Garbage Collector:
http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/
cd $PTII/vendors/gc tar -zxf /tmp/gc.tar.gz cd gc6.1 ./configure --prefix=$PTII make make check make installNote that under Windows, PTII cannot have a backslash in it or else make will have problems.
As of 4/03, we were using version 6.1
http://java.sun.com/products/java-media/jai/
You need not install JAI if you are not planning on using the JAI Actors.
We verified that JAI 1.1.2_01 works with these actors.
You probably want to install the JAI "JDK Install".
Note that under Web Start, we had to install the JAI jar files
by hand in
c:/Program Files/java/j2re1.4.1_02/lib/ext
by copying jai_codec.jar
, jai_core.jar
,
and mlibwrapper_jai.jar
from the
c:/j2sdk1.4.1_02/jre/lib/ext
Web Start users might want to try the
"Windows Auto-installation for Java Plug-in"
http://java.sun.com/products/java-media/3D/
.
You need not install Java3d if you are not planning on using GR domain.
If you plan on recompiling the GR domain, then install the Java 3D SDK and runtime. If you plan on only running the GR domain demos, then installing only the Java 3D runtime should be sufficient. We have verified the demos with the Java 3D 1.3.1 SDK (DirectX Version).
Note that JDK1.4.0 requires Java 3D 1.2.1_04 or later. If you run with Java 3D 1.2.1_03 and JDK1.4.0, the GR demos will fail to initialize and you will see the message:
Fail to create back buffer - DDERR_INALIDPARAMThe Java 3D 1.2.1_04 release notes say that this bug:
4470749 Java3D fail to initialize underlying OGL/D3D library in jdk1.4was fixed in Java 3D 1.2.1_04
http://sourceforge.net/projects/javajoystick/
.
The Joystick interface works under Windows and Linux.
Joystick is covered by a
Joystick specific copyright
You must download and install the Joystick interface to use the Joystick actor.
Configure looks for the joystick interface in
$PTII/vendors/misc/joystick
. In that directory,
it looks for joystick.jar
.
http://sourceforge.net/projects/javajoystick/
$PTII/vendors/misc
cp $PTII/vendors/misc/joystick/lib/jjstick.dll $PTII/bin
http://java.sun.com/products/java-media/jmf/
You need not install JMF if you are not planning on using the JMF Actors.
The installer also looks for the USB camera, so you may find
it helpful if you connect a USB camera before running the installer.
To configure a USB camera after installation, run c:/Program Files/JMF2.1.1e/bin/jmfinit.exe
We verified that JMF 2.1.1e works with these actors.
The Matlab interface works only under Windows and it requires that Matlab be installed on the local machine. The Matlab interface has been tested with Matlab 6.1, which corresponds with R12.1.
The Matlab Expression actor can access Matlab methods to process matrices and plot data using the Matlab plotter.
A demo can be found at
$PTII/ptolemy/matlab/demo/MatlabExpression/MatlabExpression.xml
The Matlab interface works under Windows and Linux. In theory, the Matlab interface might work under Solaris, but we have not tested it.
Under Windows, we compile the Matlab interface with Microsoft
Visual C if it is available. Matlab interface has problems work with gcc-3.3
Under Windows, the Matlab interface has problems at runtime with gcc-3.3.
Under Windows, we recommend using gcc-3.2 or Microsoft Visual C.
Below are the instructions for compiling under gcc.
If you do not have gcc
or dlltool
installed, you can install them as part of the
Cygwin installation
The Matlab interface is implemented using the Java Native Interface
(JNI). When $PTII/configure
is run, it look in the user
path for a binary called matlab
, determines the location
of the Matlab extern/include/libeng.dif
file and then checks
for gcc
and dlltool
.
If these components were not found at when configure was run, then you can rerun configure, remake and run the demo with:
cd $PTII rm config.*; ./configure cd $PTII/ptolemy/matlab make $PTII/bin/vergil ./demo/MatlabExpression/MatlabExpression
GCC doesn't have a __int64 built-in, and this patch basically uses "long long" instead.
- Edit the file
jdk_root>/include/win32/jni_md.h
, Wherejdk_root
is the installation root (eg.,c:/Program Files/Java/jdk1.5.0_01
- Replace the segment:
typedef long jint; typedef __int64 jlong;with:typedef long jint; #ifdef __GNUC__ typedef long long jlong; #else typedef __int64 jlong; #endif typedef signed char jbyte;
To use these actors, install QuickTime with the "QuickTime For Java"
option from
http://developer.apple.com/quicktime/qtjava/
There is a standalone installer with QuickTime For Java at
http://www.apple.com/quicktime/download/standalone/
(This page seems to have problems with Firefox, try IE).
During installation, choose "custom" and then "select all".
This drops QTJava.zip
into the lib/ext of all your installed JREs.
Then you have to copy this zip file to the jre/lib/ext directory
of your SDK, for example:
cp c:/Program\ Files/java/j2re1.4.2_08/lib/ext/QTJava.zip c:/j2sdk1.4.2_08/jre/lib/ext
The X10 actors require the Java serial port communcations package and the X10 package.
For installation instructions, see the
X10Interface class documentation in $PTII/ptolemy/actor/lib/x10/X10Interface.java
.
cd $PTII; rm config.*; ./configureand then make
make fast
Ptolemy II has been built with GNU make 3.77, but does not use GNU make extensions, so GNU make is not requires. Ptolemy II has also been built
with Solaris 8 /usr/ccs/bin/make
.
It seems that the make that is included with SGI Irix 6.5 may have problems, the workaround is to installed GNU make.
yacc
and lex
.
JavaCC is only necessary if you modify the expression parser in
ptolemy/data/expr
.
javacc-3.2.tar.gz
from
http://javacc.dev.java.net/http://javacc.dev.java.net/
$PTII/vendors/sun
if necessary
mkdir -p $PTII/vendors/sun
cd $PTII; rm config.*; ./configure
PTII
environment variable in your
environment. Under C Shell:
setenv PTII /users/ptIIYou may want to add that line to your
~/.cshrc
file.
To configure the makefiles,
run $PTII/configure
, which is
a GNU autoconf script that looks for your Java compiler, reads in
$PTII/mk/ptII.mk.in
and generates
$PTII/mk/ptII.mk
:
cd "$PTII" rm -f config.* ./configure
$PTII/configure
creates $PTII/config.status
and $PTII/config.cache
. If you would like to reconfigure
Ptolemy II to use a different Java compiler, set your path so
that the appropriate compiler is first in your path, then
remove config.status
and rerun configure. You
may also use the --with-java=
configure command line
argument. For more information, run configure -help
.
To build:
make fast all
To build Ptolemy II under Windows XP:
http://java.sun.com/j2se/1.4/
Be sure to add the bin
directory
to your path so that javac
and java
are available.
http://sources.redhat.com/cygwin/
See the Ptolemy II 5.0 Website for Cygwin downloads that include the tools necessary to build Ptolemy II.
An alternative to using the Cygwin downloads we provide is to download directly from the Cygwin website.
Complete installation instructions can be found at
http://sources.redhat.com/cygwin/faq
,
The Cygwin installer tends to change over time, but below is a summary of the steps necessary:
http://sources.redhat.com/cygwin/setup.exe
and save it in the empty directory
setup
, then Next
Install from Internet
, then
click on Next
c:/cygwin
Next
button.
Next
Next
Base
,
which is roughly a 6Mb download that expands into about 26Mb
of files.
If you are serious about development you may also want
to install the packages below. To install an individual package,
click on the +
to the left of the group name, then
click on the arrows to the right of the group name
until Default
changes to Install
Next
, which should download the packages and
install them
Add icon to Start Menu
, and then
Finish
.
Start
-> Cygnus Solutions
->
Cygwin Bash Shell
PTII
environment variable
to the
name of the directory where Ptolemy II is installed.
Under Windows XP, you set the environment variable via
the Environment tab of the System control panel
(Start Menu
-> Settings
->
Control Panels
-> System
->
Advanced
-> Environment Variables
)
The PTII value should be set using back slashes so that javac
gets the right path if you've installed Cygwin in a location
other than C:\
such as C:\Cygwin
.
If you have installed Cygwin in c:/cygwin, and your Ptolemy II installation is in a directory outside of the c:/cygwin tree, then Cygwin may change your PTII variable to include "/cygdrive/c". This will cause problems with non-Cygwin tools like javac that do not understand /cygdrive/c.The best fix for this is to move your home directory outside of c:/cygwin. An alternative is to place your Ptolemy II tree outside of c:/cygwin.
How to tell Cygwin where your home directory is
- Cygwin gets the location of your home directory from a line that contains your login in
c:/cygwin/etc/passwd
. If your login is not listed, then runmkpasswd -lTo list all the local accounts and add the line for your account toc:/cygwin/etc/passwd
usingworkdpad
. To startwordpad
, do Start -> Run and type inwordpad
.
Note: you can usemkpasswd -help
to get help. If you are logged in to the domain and not the local machine, trymkpasswd -d | grep yourloginto get just your login- Edit
c:/cygwin/etc/passwd
with wordpad and change the home directory from/home/yourlogin
to/cygdrive/c/users/yourlogin
, which will set your home directory asc:/users/yourlogin
Savec:/cyginw/etc/passwd
- Start up a new bash shell and see where your home directory is by typing
pwd
An example PTII value would be:
c:\users\yourname\ptII
Cygwin directory mapping
Note that Cygwin remaps directories, so
d:\tmp
may appear as/cygdrive/d/tmp
.Unfortunately, the
java
command does not understand the Cygwin/cygdrive
notation, sojava
may not find the files it needs.For example,
pwd
returns/cygdrive/d/tmp/ptII
, which will not work withjava
:cxh@MOWAT-171 /cygdrive/d/tmp/ptII $ PTII=d:\\tmp\\ptII cxh@MOWAT-171 /cygdrive/d/tmp/ptII $ echo $PTII d:\tmp\ptII cxh@MOWAT-171 /cygdrive/d/tmp/ptII $ cd $PTII cxh@MOWAT-171 /cygdrive/d/tmp/ptII $ pwd /cygdrive/d/tmp/ptIISo, under Cygwin, it is best to avoid using pwd when setting variables. Avoid:PTII=`pwd`/ptIIand usePTII=d:\\tmp\\ptIIinstead. Note that the configure script checks for this sort of thing.
C:\j2sdk1.4.1_01\bin
)
When you run cygwin.bat, your path
should be set to include the Cygwin tools. You can test this
by typing type make
, which should return
make is /usr/bin/makeIf
make
cannot be found, then
you may also need to add the Cygwin bin directory
c:\cygwin\usr\bin
to your path.
bash
, and cd to the Ptolemy II directory.
rm -f config.*
./configure
make fast all
vergil
(or
$PTII/bin/vergil
if you did not set your path) in the C
shell or cygwin Bash window and the Ptolemy II GUI should start up
Currently, Ptolemy II does not support building via Microsoft
Visual Studio nmake
under Windows. Also, we have not
tried building Ptolemy II under Windows '95 or Windows '98.
The instructions for setting up a parallel tree using CVS can be found in
$PTII/doc/coding/develsetup
.
Last Updated: $Date: 2005/07/21 22:51:33 $