From: Daniel A. S. <st...@ic...> - 2002-04-09 08:09:12
|
Michael, the following setup works for me: (on a HFS+ filesystem) use the _shared_ tclkit build from http://www.maths.mq.edu.au/~steffen/tcltk/tclkit/tclkit_shared.sit.bin and put snack.shlb into e.g. a subdirectory called lib then execute set auto_path [concat [list [file join [pwd] lib]] $auto_path] package require snack You may want to take a look at the mac distribution of Emu (http://sourceforge.net/projects/emu/) where I use something similar (without tclkit) to load snack and other extensions from a local directory. (esp. look at the resources of the executables) For mac package loading to work off a CD, I suspect you need resource forks on the cd (shared libraries on the mac need a 'cfrg' resource so that they can be loaded, and mac Tcl extensions require a TEXT resource with the pkgIndex). AFAIK e.g. Toast for Mac can write hybrid CD's with HFS+, ISO, Joliet and Rockridge filesystems all on one CD; this may allow you to get resource forks onto the cd, as long as you master the cd on the mac. there may be a way around the resource fork requirement; IIRC, the code in tclMacLoad.c will try to load the complete datafork of a file as a PPC fragment if no 'cfrg' resource can be found, and a traditional pkgindex.tcl file should work with that (via [load]), but I have never tried this. The resource fork obstacle is also the main reason why dynamic library loading from vfs in tclkit doesn't work on the mac currently. Also note that [info script] used to have a bug on the mac that could have an impact here, I had a look at it some time back and thought I had fixed it, but that may have been post 8-3-4 on the mac, instead of using [info script], it may be easier to embed a tclkitrc resource in tclkit that sets the auto_path relative to [pwd] (which defaults to the executable's directory at startup) and then sources your main.tcl Cheers, Daniel -- ** Daniel A. Steffen ** "And now to something completely ** Department of Mathematics ** different" Monty Python ** Macquarie University ** <mailto:st...@ma...> ** NSW 2109 Australia ** <http://www.maths.mq.edu.au/~steffen/> |