javac
and java
are available,
and have the make
command available.
export PTII=c:/Ptolemy/ptII10.0.1
setenv PTII /users/yourname/ptII
cd "$PTII" rm -f config.* ./configure
make fast installOR: Install Apache Ant from https://ant.apache.org/ and run
ant cd bin; makeApache ant is much faster than make.
$PTII/bin/vergil
PTII
is covered in
the Unix and Windows
sections below.
http://www.oracle.com/technetwork/java/javase/downloads/index.html
.
Locally, we use Java 1.7.0_51.
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://www.oracle.com/technetwork/java/index-jsp-141438.html
Currently, the Java Plug-in 1.6 is included in the JRE and JDK downloads for Windows.
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.
http://acs.lbl.gov/software/colt/
(Formerly http://hoschek.home.cern.ch/hoschek/colt/
)
We include a subset of Colt, based on Colt 1.0.3, in $PTII/lib/ptcolt.jar
.
Colt is covered by a Colt specific copyright.
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 -jar jython_installer-2.2.1.jarand then select the Standalone Jython installation, which will create
jython.jar
and then install Jython in
$PTII/vendors/jython
.
Note that if you don't select the Standalone Jython install, then a set of Jython directories will be created. You should add the directory where Jython was installed to your path.
configure
script will look for jython
and jython.jar
in your path and then look for
$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:
Soot is used by the Copernicus code generator.
Soot, is a Java optimization framework from
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
http://www.oracle.com/technetwork/java/current-142188.html
You need not install JAI if you are not planning on using the JAI Actors.
Note that you probably want to install the JAI "JDK Install".
We verified that jai-1_1_3-lib-windows-i586-jdk.exe
works with these actors.
Note that under Windows, only a x86 JAI installer is available, so you will may need to copy jar files to the 64-bit jre directory:
cp c:/Program\ Files\ \(x86\)/Java/jdk1.7.0_51/jre/lib/ext/jai* c:/Program\ Files/Java/jdk1.7.0_51/jre/lib/ext cp c:/Program\ Files\ \(x86\)/Java/jdk1.7.0_51/jre/lib/ext/jai* c:/Program\ Files/Java/jre7/lib/ext/ cp c:/Program\ Files\ \(x86\)/Java/jdk1.7.0_51/jre/bin/mlib* c:/Program\ Files/Java/jdk1.7.0_51/jre/bin cp c:/Program\ Files\ \(x86\)/Java/jdk1.7.0_51/jre/bin/mlib* c:/Program\ Files/Java/jre7/bin
Note that under Web Start, we had to install the JAI jar files
by hand in
c:/Program Files/Java/jre1.6.0_04/lib/ext
by copying jai_codec.jar
, jai_core.jar
,
and mlibwrapper_jai.jar
from the
c:/Program Files/Java/jdk1.6.0_04/lib/ext
Web Start users might want to try the
"Windows Auto-installation for Java Plug-in"
http://www.oracle.com/technetwork/java/javase/tech/index-jsp-138252.html
.
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.
You may need to update the jre by hand:
cp c:/Program\ Files/Java/jdk1.7.0_51/jre/bin/j3dcore-ogl.dll c:/Program\ Files/Java/jre7/bin/ cp c:/Program\ Files/Java/jdk1.7.0_51/jre/lib/ext/j3* c:/Program\ Files/Java/jre7/lib/ext/ cp c:/Program\ Files/Java/jdk1.7.0_51/jre/lib/ext/vecmath.jar c:/Program\ Files/Java/jre7/lib/ext/
We have verified the demos with the
java3d-1_5_1-windows-amd64.exe
installer.
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://www.oracle.com/technetwork/java/javase/tech/index-jsp-140239.html
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
Under 64-bit Windows, we copied the jar files and other files into the JRE.
cp c:/Program\ Files\ \(x86\)/JMF2.1.1e/lib/* c:/Program\ Files/Java/jdk1.7.0_51/jre/lib/ext cp c:/Program\ Files\ \(x86\)/JMF2.1.1e/lib/* c:/Program\ Files/Java/jre7/lib/ext/
We verified that jmf-2_1_1e-windows-i586.exe
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.
If you do not have Microsoft Visual C,
you can try installing cygwinDevel
with gcc-3.2 from
https://ptolemy.berkeley.edu/ptolemyII/ptIIlatest/cygwin.htm
.
Note that you should uninstall the previous version of cygwin
and then install the new version.
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.6.0_20
- 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, go to https://www.apple.com/quicktime/download/
(Note that the QuickTime SDK does not include QuickTime For Jav)
We chose the "Quicktime Standalone Installer", which does not contain iTunes.
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\ \(x86\)/Java/jre7/lib/ext/QTJava.zip c:/Program\ Files/Java/jdk1.7.0_51/jre/lib/ext/ cp c:/Program\ Files\ \(x86\)/Java/jre7/lib/ext/QTJava.zip c:/Program\ Files/Java/jre7/lib/ext/
RXTX binary builds provided as a courtesy of Mfizz Inc. (http://mfizz.com/). Please see http://mfizz.com/oss/rxtx-for-java for more information.
Under Windows, download the zip file, then do something like:
cp ~/src/rxtx/mfz-rxtx-2.2-20081207-win-x64/RXTXcomm.jar c:/Program\ Files/Java/jdk1.7.0_51/jre/lib/ext/ cp ~/src/rxtx/mfz-rxtx-2.2-20081207-win-x64/RXTXcomm.jar c:/Program\ Files/Java/jre7/lib/ext/ cp ~/src/rxtx/mfz-rxtx-2.2-20081207-win-x64/*.dll c:/Program\ Files/Java/jdk1.7.0_51/jre/bin cp ~/src/rxtx/mfz-rxtx-2.2-20081207-win-x64/*.dll c:/Program\ Files/Java/jre7/bin
Under Mac OS X, see http://jlog.org/rxtx-mac.html. These files should be copied as follows:
sudo -i cp ~yourlogin/Downloads/librxtxSerial.jnilib /Library/Java/Extensions/ cp ~yourlogincxh/Downloads/RXTXcomm.jar /Library/Java/Extensions/
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-5.0.tar.gz
from
http://java.net/projects/javacc/downloads
$PTII/vendors/sun
if necessary
mkdir -p $PTII/vendors/sun
cd $PTII; rm config.*; ./configure
Note that JavaCC-4.2 will not work, there are problems with ReInit() in the data.expr tests.
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://www.oracle.com/technetwork/java/javase/overview/index.html
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 6.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://cygwin.com/install.html
and download and install either the 32-bit or 64-bit version
of setup.exe
.
setup
, then Next
Install from Internet
, then
click on Next
C:\cygwin
or C:\cygwin64
.
Downloads
directory in your home directory.
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 compute the dependencies,
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.
Executive Summary: Under Windows, it is safest if you use forward slashes
in both the Environment Variables
panel and when running
Cygwin bash. In Cygwin bash, don't use pwd
to set your PTII variable.
Under Windows 8, you set the environment variable via
the Control Panel, then search for env
and click on Edit environment variables for your account
.
Under older versions of Windows, 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 in the Environment tab should be set using forward slashes.
If Cygwin is installed in a location other than
C:\
such as C:\Cygwin
, then try
using backslashes, though installing Cygwin in such a manner
is not recommended.
Windows 8 users should set PTII in the Environment Tab using forward slashes.
Note that when setting PTII from Cygwin bash, you should use forward slashes.
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 in the Environment Tab would be:
c:/Users/yourname/ptII
An example PTII value inside Cygwin bash would be:
export PTII=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:\Program Files\Java\jdk1.6.0_04\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: 2014-12-16 13:52:11 -0800 (Tue, 16 Dec 2014) $