These instructions assume you are using Eclipse 3.1 under Windows. Other ways of setting up and building Ptolemy II are described on the Ptolemy II install page. Contents of this page:
C:\Program Files
).
eclipse/eclipse.exe
.
The default configuration of Eclipse has some difficulties with Ptolemy II, so a few changes are necessary.
C:\Program Files\eclipse
,
then the Target should read:
"C:\Program Files\eclipse\eclipse.exe" -vmargs -Xmx256MThe maximum memory size will now be 256 megabytes when you restart Eclipse.
makefile
s,
*.c
, *.h
files and *.tcl
files with
-kb
. This causes no end of problems when the tree is
checked out on a platform that has a different line ending.
Once the ptII project has been set up there seems to be no way to switch between using CVS and not using CVS. I.E., the only way to switch is to re-create the ptII project. (Actually, this isn't too hard after you've done it a couple of times :-)). Therefore, you'll need to decide if you want Eclipse to be aware of, and manage the CVS aspects of the ptII project.
.classpath.default
. below.
Eclipse will manage your ptII code tree as a project called the ptII project. Assuming Eclipse is running:
gigasource.eecs.berkeley.edu
/home/cvs/cvsanon
http://embedded.eecs.berkeley.edu/concurrency/private/4.html
. To get access to that page, you must be a member of
the "concurrency" group, which means that you are taking
the UC Berkeley EECS 290n class.
http://chess.eecs.berkeley.edu/ptexternal/private/2.html
ptexternal
workgroup. (Currently, membership
is only available to active participants in the project).
pserver
.
Note: Most users will select pserver
because
they will be accessing the tree with read-only CVS access.
If you have an individual read/write CVS account on gigasource,
then select extssh
. See the
Ptexternal page
for details.
ptII
Head.
ptII
Head,
then Select the "Check Out As..." option. Follow the wizard,
creating selections as follows:
ptII
C:\ptII
, rather than the default, which is within the
Eclipse workspace directory.
.classpath.default
file.
.classpath.default
and copy it into a new file called
.classpath
.
.classpath.default
and select "Refresh", then Eclipse will produce
thousands of errors. This is not really a problem. It reflects
that you probably don't have installed many optional packages that
are needed to build subsets of Ptolemy II. You can ignore the errors
(not advised, since they will mask errors you make), or you can copy
the .classpath.default
file and rebuild.
Alternatively, you can install
the optional packages and run configure.
Vergil
ptII
ptolemy.vergil.VergilApplication
You may now wish to read the Using Vergil tutorial.
Ptolemy II includes a number of packages that rely on software that you may or may not have installed, such as MATLAB, the Java comm package (for serial port connections), joystick support, Java Advanced Imaging (JAI), the Java Media Framework (JMF), and Java 3D. If you wish to use or extend these features, you will need to perform a few extra steps. These steps require execution of a script called "configure" in the Ptolemy II home directory, which in turn requires (on Windows) installation of Cygwin, a package that offers Unix-like facilities within Windows. You can find instructions for installing Cygwin at http://ptolemy.eecs.berkeley.edu/ptolemyII/ptIIlatest/cygwin.htm.
The procedure below will modify the .classpath file that is provided in the CVS repository to customize it for the software that you have installed. The procedure is as follows:
PTII=c:/ptII export PTII
cd $PTII
./configureThis will create
$PTII/.classpath
$PTII/bin
on the command line, you will probably
want to run the following commands within Cygwin bash:
cd $PTII/bin make
ptII/.classpath
and to build
the project (or you may have to manually rebuild if you turned
off automatic rebuild).
.options
file:
org.eclipse.team.cvs.core/debug=true org.eclipse.team.cvs.core/cvsprotocol=true
./eclipse -vm c:/j2sdk1.4.2_03/jre/bin/java.exe -debug -consolelogNote that it is important that you run the jre version of java and not javaw.
-Dptolemy.ptII.dir=your PtII directory
-Dptolemy.ptII.dir=c:\hyzheng\ptII
)
C:\hyzheng\ptII\ptolemy\domains\de\lib\test
)
workspace
directory in the
Eclipse directory. The workspace
directory will only
appear if you have already run Eclipse. Note that removing the
workspace
directory will cause Eclipse to 'forget'
about any projects that you may have set up
https://bugs.eclipse.org/bugs/show_bug.cgi?id=15724
suggests using
a compression level of 5.
After the failure, the cvs log (Window -> Show Views -> CVS -> CVS Console says:
U ptII/ptolemy/domains/fsm/demo/ABP/img/Receiver.vsd U ptII/ptolemy/domains/fsm/demo/ABP/img/Sender.gif Terminated with fatal signal 11 The server reported an error while performing the "cvs checkout" command. (took 15:16.607) Error: : Terminated with fatal signal 11 ***
If you have problems where clicking on build briefly flashes up
a window, look in $PTII/.classpath
for and empty
exclusion that looks like ||
If you have problems with the classpath, look in the
workspace/.metadata/log
file that is in
the directory where eclipse is installed. For more information
about the .metadata
directory, see
below.
Basically, when eclipse starts up, it might try to update
H:/workspace/.metadata
. The solution is covered in
http://www.eclipse.org/documentation/html/plugins/org.eclipse.platform.doc.user/doc/tasks/running_eclipse.htm
:
The way I figured this out was by running Norton Antivirus and
doing View -> File System Realtime Scan Statistics and then I noticed
that my machine was updating H:/workspace/.metadata
I think I introduced the problem by clicking on the Eclipse.exe binary and selecting Pin to Start Menu. My solution was to remove the Eclipse bogus entry in the start menu and then create a shortcut, change Start in property and then pin that shortcut to my start menu.
-Dsun.java2d.d3d=false
argument.
The way to do this is to do
Run
0> Debug ...
-> Arguments
and then add -Dsun.java2d.d3d=false
to the
VM arguments
text area.