From: Rob B. <rb...@qu...> - 2001-05-31 23:35:24
|
After only a small amount of fiddling, I was able to use the classic version of MacTcl to successfully run the custom app described below. All I did was set up a clean 9.1 partition for use of Classic under X, and install MacTcl 8.3.3 there. It was important to eliminate the old "Tool Command Language" folder from Extensions first, otherwise a stale Tclapplescript1.1.shlb got left in there from the 8.3.1 install I had used previously. Considering the chain of command involved: key binding in CW pressed... 'glue' AppleScript applet... (classic) Tcl script (processing)... (classic) AppleEvent to trigger CW 'make' it is good to see that this type of thing works even though CW is under Carbon native on X, and the Tcl shell being used is in classic. This gives me enough to work with right now, although I would be happier if I could have the MacTcl shell as a native Carbonized app someday, and avoid the overhead of Classic. At 4:15 PM -0700 5/30/01, Rob Barris wrote: > > My company uses MacTcl on 9.1 as the backbone of a customized build >system for our game projects. A common set of scripts is used to automate >some unique source code preprocessing tasks on both Mac and Windows (we >also use the stock Win32 Tcl on the Win32 systems.) > > On the Mac, the scripts are triggered from inside the Metrowerks IDE by >way of a key binding which runs a tiny AppleScript. The AppleScript does >these things: > - run a default "per user" environment script in Tcl > - send an AppleEvent to the MW IDE to query it for the project path > - run the generic build tool in Tcl > - send an AppleEvent to the MW IDE to trigger the actual 'Make'. > > It's structured this way, so that changes made to source files (and some >generated source files) actually get noticed by the IDE as "changed" during >the dependency checking of the Make. That is to say we try to avoid >hitting the "Make" button in the IDE, instead we hit the "builder" button >which triggers the above. > > With OS X I am at a crossroads in figuring out how to make this stuff >work. I have tried to get it running with MacTcl installed and launched >under Classic, it gets partway but seems to run into some problems getting >the main script launched. In this case I still have MacTcl 8.3.1 >installed, I am thinking about putting 8.3.3 on there and seeing how well >that works. > I would be very open to running our scripts under the built-in Tcl of >OSX - however in my brief test of 'tclsh' from the Terminal command line, I >was not able to do the "package require Tclapplescript" command, so I >suspect the Tcl version there is more of a bare UNIX flavor without any >AppleScript capability - essential for this task. -- Rob Barris Quicksilver Software Inc. rb...@qu... |