From: Daniel A. S. <st...@ic...> - 2002-01-10 09:46:11
|
Jack, At 1:06 +0100 on 10/1/02, Jack Jansen wrote: >With previous versions of Tcl/Tk I could incorporate all tcl modules >needed as TEXT resources in my binary, thereby freeing MacPython >Tkinter users from the need to install Tcl/Tk, as everything needed >was in the binary. > >With 8.3.4 this does not seem to work anymore. bgerror does a "package >require msgcat", and I see no way to put a package into resources, as >a package seems to be a directory (please ignore my Tcl ignorance, >which should be clear by now:-). > >Is there a way to do this, or should I require people to install >Tcl/Tk before using Tkinter? [package require msgcat] should not be a problem if you include msgcat.tcl in a TEXT resource and add a line to the init.tcl rsrc that sources that msgcat resource at startup via [source -rsrc]. msgcat will then be loaded and recognized as a package from the start. aren't you having problems with encodings? that's the one thing that can't be put into the resource fork currently, and indeed I had a bit of work to get encodings to work properly in TclKit to enable me to wrap everything up as a single file executable (using an encoding dir in the tclkit vfs). encodings latin1, utf8 and unicode are statically present (obviously, no recoding necessary there), but I don't think macRoman is, which could be bad. AFAIK, it always needs to be loaded from file. I think there is a bug that makes macRoman appear as an encoding name even if the macRoman.enc file is not accessible (but the encoding will not work correctly), IIRC this is due to the system encoding on the mac being forcibly set to macRoman even if loading the .enc file fails. note however that I recall this from memory from my work over xmas on TclKit using Tcl 8.4a4, but I'm pretty sure the problem exists in 8.3.4 as well. anyway, maybe TclKit would be an option for you? see my recent post to this list about where to get the changes needed for the latest mac port. 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/> |