From: Alan W. I. <ir...@be...> - 2002-08-05 17:20:02
|
Vince, The reason why we cannot install anything into fixed system locations is many unix users do not have root privileges. However, they are still able to install plplot in their own home directory (or some other disk area they have control of) using the appropriate prefix. Using a prefix this way for tarball packages has become the unix/linux standard so I imagine there are nice ways to make non-standard prefixes work for tcl. The question is how to find those nice ways. From what you say below, it seems to me you could just tell the user (or configure the examples) to set autopath to set autopath $prefix/lib/plplot5.1.0/tcl so it could find the pkgIndex.tcl file there (that file is not currently installed there, but we could do that easily). Would that gain access to pkgIndex.tcl or am I missing something? Assuming you could access a special version of pkgIndex.tcl this way, what *specific* changes would have to be made to that file so everything else would work with the tcl files installed in $prefix/lib/plplot5.1.0/tcl and the libraries installed in $prefix/lib including a symlink (called libtkwin[d].so, say) from there pointing to $prefix/lib/plplot5.1.0/drivers/tkwin[d]_drv.so. I need the specifics because my tcl skills are just at the newbie level. Alan email: ir...@be... phone: 250-727-2902 FAX: 250-721-7715 snail-mail: Dr. Alan W. Irwin Department of Physics and Astronomy, University of Victoria, P.O. Box 3055, Victoria, British Columbia, Canada, V8W 3P6 __________________________ Linux-powered astrophysics __________________________ On Mon, 5 Aug 2002, Vince Darley wrote: > What we would like, under Wish, is for the following to work: > > > wish > % package require Plplotter > 5.1.0 > % plframe .p > etc etc. > > Now, for 'package require Plplotter' to work, there must be an appropriate > pkgIndex.tcl file somewhere that tcl is going to search by default. > Clearly tcl is never going to search in any /usr/local/plplot by default, > so that means we must install something *extra* into a location that tcl > will search. Tcl uses the 'auto_path' as the set of directories to look > for subdirectories which contain new pkgIndex.tcl files. For example, on > Windows, my auto_path is this: > > % set auto_path > {C:/Program Files/Tcl/lib/tcl8.4} {C:/Program Files/Tcl/lib} {C:/Program > Files/Tcl/lib/tcllib0.8} {C:/Program Files/Tcl/lib/tk8.4} > > The second one of these (.../tcl/lib) is the most generic. If I create a > directory in there (..../tcl/lib/plplot5.1.0/) and put a pkgIndex.tcl file > inside that directory, then tcl will find it automatically. This is what > we want. > > Having done that, we then have a choice whether to put all the rest of the > tcl bindings in that directory as well (symlinks if desired), or whether > that pkgindex actually just points Tcl to /usr/local/plplot/.... instead. > That is a choice for all of you to make. If you wish to allow the tcl/tk > plplot bindings to be used when they are wrapped inside a standalone > tcl/tk executable (which would be nice) then there should at least be the > option of putting everything in the Tcl hierarchy. I would suggest making > symlinks to everything that might be needed in that directory (including > the .fnt, .map files). > > hope that helps, > > -- Vince > > <http://www.santafe.edu/~vince> > > > On Fri, 2 Aug 2002, Alan W. Irwin wrote: > > > Let's get down to specifics. Currently, all the tcl stuff is installed here > > > > ls /usr/local/plplot/lib/plplot5.1.0/tcl > > FileSelector.tcl cmap0a.pal cmap1d.pal plcolor.tcl* pltools.tcl > > PLWin.itk cmap1a.pal help_gui.tcl plconfig.tcl plwidget.tcl > > PLXWin.itk cmap1a1.pal help_keys.tcl pldefaults.tcl tclIndex > > Pltkwin.tcl cmap1b.pal help_tcltk.tcl plplot.tcl > > about.tcl cmap1c.pal plclient.tcl plserver.tcl > > > > and the drivers are installed here > > > > ls /usr/local/plplot/lib/plplot5.1.0/drivers/tkwind_drv.so > > /usr/local/plplot/lib/plplot5.1.0/drivers/tkwind_drv.so > > > > where /usr/local/plplot is my prefix. > > > > Are you suggesting copying bindings/tk-x-plat/pkgIndex.tcl to > > $prefix/lib/plplot5.1.0/tcl and also putting a symbolic link from > > that directory to the actual driver share object location (so it appears > > the shared object is in the same directory as pkgIndex.tcl)? I think you > > also imply below that autopath would have to be changed to find > > /usr/local/plplot/lib/plplot5.1.0/tcl, but I may be misunderstanding you. > > > > What would be the exact wish recipe associated with what you would like me > > to do? > > > > Please give me the full wish cookbook. Currently, my linking changes of > > moving everything to tkwind_drv.so seems to have confused the ability of > > wish to find the *.tcl files in /usr/local/plplot/lib/plplot5.1.0/tcl, and I > > am hoping that problem will get straightened out by the changes you suggest > > (perhaps the autopath change?) that are associated with the using the > > pkgIndex.tcl file. > > > > Incidentally, the library linking changes cause no problems with > > > > /usr/local/plplot/bin/plserver > > source tkdemos.tcl > > 1 > > 2 > > 3 > > ... > > > > but now if I try source runAllDemos.tcl instead, it (unlike tkdemos.tcl) > > cannot find the x??.tcl examples in the current directory. I have no idea > > why subtleties of linking are having this bad effect on the runAllDemos.tcl > > case, but I hope you are able to change runAllDemos.tcl to look in the > > current directory for x??.tcl so it won't be so sensitive to linking > > changes. > > > > Alan > > > > email: ir...@be... > > phone: 250-727-2902 FAX: 250-721-7715 > > snail-mail: > > Dr. Alan W. Irwin > > Department of Physics and Astronomy, > > University of Victoria, P.O. Box 3055, > > Victoria, British Columbia, Canada, V8W 3P6 > > __________________________ > > > > Linux-powered astrophysics > > __________________________ > > > > On Fri, 2 Aug 2002, Vince Darley wrote: > > > > > [...] 'load' will search > > > anything on your path, but, by and large all normal uses of 'load' specify > > > a full path, so it's not so much of an issue. for easiest use with > > > tcl/tk, we will need to install something into the tcl/tk hierarchy so it > > > is automatically picked up by them. We need to put a directory (called, > > > say, plplot5.1.0, but that doesn't matter too much) anywhere on Tcl's > > > auto_path, and put the pkgIndex.tcl (from bindings/tk-x-plat) into that > > > directory, together with appropriate information on where to find the .so > > > it will be loading (currently that pkgIndex.tcl assumes that everything it > > > is looking for will also be in that directory, since that is how things > > > are installed for a normal Tcl extension). > > > > > > -- Vince > > > > > > <http://www.santafe.edu/~vince> > > > > > > > > > > > > > > > > > > |