The Ptolemy kernel and
vem
(the schematic editor) run in separate Unix processes. The Ptolemy kernel process is called "pigiRpc
", while the vem
process is called "vem
". You can create your own version of pigiRpc
that contains your stars and other extensions permanently linked in. pigiRpc
, depending on the kind of extensions you are making. The first way uses src/pigiExample
, and it is intended for users who just need to add new stars. The second and third ways use the mkPtolemyTree
script and csh aliases and are for users that are creating new domains or making other more extensive changes.mkPtolemyTree
and the csh aliases can help you setup these symbolic links.1.3.1 Creating a pigiRpc that includes your own stars
For those who just want to statically link in their own stars with minimal hacking with makefiles, an example showing how to do this is provided in $PTOLEMY/src/pigiExample.
$PTOLEMY
and $PTARCH
are set and that you have write permission to the Ptolemy source tree. If you don't have write permission, you can set up a parallel tree with the Unix ln
-s
command. If, for example, the Ptolemy tree was at /users/ptolemy
, but you wanted to build under ~/pt
, you could do the following to create the directory and create symbolic links for the dot files, like .cshrc
, and create symbolic links for the other files and directories in the distribution:
cd ~/pt
ln -s /users/ptolemy/* .
ln -s /users/ptolemy/.??* .
setenv PTOLEMY ~/pt
setenv PTARCH `$PTOLEMY/bin/ptarch`
rm obj.$PTARCH src bin.$PTARCH
mkdir -p src src/pigiExample bin.$PTARCH
cd bin.$PTARCH; ln -s /users/ptolemy/bin.$PTARCH
cd ../src; ln -s /users/ptolemy/src/* .
cd pigiExample; cp /users/ptolemy/src/pigiExample/* .pigiRpc
that includes your own stars:
pigiRpc
. PigiRpc
depends on .o
files under $PTOLEMY/obj.$PTARCH
, so you must do a basic build. To build all the .o
files, type:
override.mk
file, you can reduce the build time by building only the functionality you need. See
"Using mkPtolemyTree to create a custom Ptolemy trees" on page 1-9 for more information.
$PTOLEMY/src/pigiExample/make.template
. Add your stars to LOCAL_OBJS
and PL_SRCS
.
cd
to $PTOLEMY/obj.$PTARCH/pigiExample
and type:
makefile
from the
make.template
. You will see messages something like:
$PTOLEMY/obj.$PTARCH/pigiExample
, type
pigiRpc
executable with your own stars statically linked in. If later you add a new star, you should modify the symbols OBJS
and PLSRCS
in make.template
to include it, and repeat the above procedure.
pigiRpc
with SDFMyStar.o
, you can test your pigiRpc
by starting up with:
PIGIRPC
environment variable to the name of the binary you just built:
pigi
, your new executable will be used instead of the standard one. To revert to using the installed pigiRpc
, just type
pigiRpc
to be the default pigiRpc
, you can install it in $PTOLEMY/bin.$PTARCH
, but this will wipe out whatever pigiRpc
is in that directory
pigiRpc
program that has debug symbols. Just type:
gdb
is in your path, specify the executable as follows:
pigi
as follows:
pigiRpc
, just type
$PTOLEMY/mk/ptbin.mk
and $PTOLEMY/mk/stars.mk
, need to be modified to include your own code. Building your own pigiRpc
, ptcl
or tysh
this way requires extensive knowledge of the Ptolemy directory tree structure and makefiles, but if you are doing serious development in Ptolemy, you will need to know this anyway.Warning: If you have write permission in the directory where Ptolemy is installed, make sure to modify the place where "make install" puts the completed executable, or it will attempt to overwrite the
pigiRpc
in the Ptolemy installation, and other users may be upset with you if you succeed in doing that. (If you are using the makefile from $PTOLEMY/src/pigiExample
, you do not need to worry about this because "make install" has been removed from that makefile.) The simplest thing to do is to replace the line in the makefile
:
pigiRpc
in whatever directory you make it even if you type: