From: Michael A. C. <mi...@cl...> - 2002-04-09 04:16:43
|
I'm writing a multimedia Tk application which will be distributed on a CD-ROM. It uses the Snack extension for audio, and for video either QuickTimeTcl/TMCI (Windows) or xanim drawing into a Tk frame (Linux; probably eventually Solaris & *BSD too). I'd like to add Macintosh support, but I'm having difficulty figuring out how to (or if it's even possible) to load shared libraries off of the CD-ROM on-the-fly. The layout of the file system for the CD is: main.tcl assets/ assets/audio assets/gifs assets/video lib/ lib/generic lib/generic/BWidget-1.3.1 lib/generic/MovieController lib/macintosh lib/macintosh/QuickTimeTcl lib/macintosh/snack2.1 lib/linux lib/linux/Img1.2 lib/linux/snack2.1 lib/windows lib/windows/Img1.2 lib/windows/QuickTimeTcl lib/windows/snack2.1 lib/windows/tmci bin/ tcl/ In the bin/ directory I have copies of the tclkit runtime for Windows & Linux. (To be clear, I'm not using/creating a scripted document; the tclkit binaries are just a convenient way to get Tcl/Tk in one nice self-contained package.) The main.tcl script figures out where it's running from via [info script] and then adds the following directories (using [file join]) to auto_path: $HOME/lib/[string tolower $tcl_platform(platform)] $HOME/lib/[string tolower $tcl_platform(os)] $HOME/lib/generic This works like a charm for Windows & Linux. Tcl is able to find the right version of Snack & the other extensions. On Macintosh, however, it doesn't seem to work--at least, not for the compiled extensions (BWidgets doesn't have a problem). I initially tried to use the static build of tclkit for the Macintosh and the snack package wouldn't load snack.shlb. I next downloaded the Tcl/Tk 8.3.4 binary from SF. Same problem. Only when I specifically installed the Snack .shlb's into the "Applications:Tcl/Tk Folder 8.3.4:Tool Command Language" folder (and also ran the QuickTimeTcl installer) was I able to load either package. I only have limited experience with the Macintosh. Can someone clue me in on how I can have my app run on a Macintosh without making the end user first install Tcl/Tk & then the extensions? Would it be possible to build Tcl/Tk with QuickTimeTcl & Snack statically linked, and would this solve my problem? (Not that I have a C compiler for the Mac, but I'd be happy to PayPal someone who did.) Or are my problems caused due to the fact that the CD doesn't have data/resource fork info? And, without Tcl/Tk being installed, could I work around this using the Mac-specific Tcl commands? As you can see, I'm rather confused as to what to do. :-) Thanks in advance, Michael |