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
$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
-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:
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:
$PTOLEMY/obj.$PTARCH, so you must do a basic build. To build all the
override.mkfile, 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
make.template. You will see messages something like:
pigiRpcexecutable with your own stars statically linked in. If later you add a new star, you should modify the symbols
make.templateto include it, and repeat the above procedure.
SDFMyStar.o, you can test your
pigiRpcby starting up with:
PIGIRPCenvironment 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
pigiRpcto be the default
pigiRpc, you can install it in
$PTOLEMY/bin.$PTARCH, but this will wipe out whatever
pigiRpcis in that directory
pigiRpcprogram that has debug symbols. Just type:
gdbis in your path, specify the executable as follows:
pigiRpc, just type
$PTOLEMY/mk/stars.mk, need to be modified to include your own code. Building your own
tyshthis 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
pigiRpcin 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
pigiRpcin whatever directory you make it even if you type: