From: Daniel A. S. <st...@ic...> - 2002-04-24 17:38:45
|
Maths, At 18:21 +0200 on 24/4/02, Mats Bengtsson wrote: >Is it possible to load shared libs from within vfs using a >separate pkgIndex.tcl file? Is there a problem only when the >pkgIndex stuffs are inside the resource fork? the problem is not with the pkgIndex resource but the the 'cfrg' resource which is needed for full CFM library functionality; however c.f. tcl/mac/tclMacLoad.c (TclpLoadFile): * See if this fragment has a 'cfrg' resource. It will tell us where * to look for the fragment in the file. If it doesn't exist we will * assume we have a ppc frag using the whole data fork. and indeed this works in my testing (not inside a vfs, just by removing the 'cfrg' resource from a Tcl extension), i.e. datafork only libraries can be loaded from disk, so the same _should_ be true for vfs. there is a problem with merged fragments however, as only loading of the first sub-fragment will be attempted (e.g. can't have merged shared libraries and the like) same problem for ppc & cfm68k fat fragments, separate libraries will be needed for ppc & 68k, with e.g. the pkgIndex.tcl loading one or the other depending on $::tcl_platform(machine) (btw, the comment in TclpLoadFile about assuming a ppc frag is wrong, it's really the current RT arch. that's assumed) I'll look into loading from vfs once my dev. box is booted back into 9... 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/> |