[GRASS-dev] debugging nviz with TclTk 8.5 aqua

William Kyngesburye woklist at kyngchaos.com
Sun Jul 27 11:58:30 EDT 2008


On Jul 27, 2008, at 2:22 AM, Michael Barton wrote:

> On Jul 26, 2008, at 9:36 PM, William Kyngesburye wrote:
>
>> As a compile & install on a single system, really no bundling of  
>> tcltk is needed.  I'll probably drop that from the OSX app makefile.
>
> A version of wish needs to be somewhere. It seems like a good thing  
> to include it with GRASS if that is all it needs.

What I'm saying is that, if you compile and install GRASS on a single  
Mac, tcltk will be available, so it doesn't need to be bundled inside  
GRASS.  It may need some help since GRASS defaults to 'wish', and  
tcltk installs only a versioned wish8.x by default.  Like adding a  
symlink next to it, or configuring it into grass.sh (which is  
something Glynn was trying to discourage).

Since the app startup doesn't have access to the user's startup  
environment, they can't set it before running GRASS.

> Why not just include 2 versions of wish: 8.5 aqua and 8.5 x11.  
> Switching GRASS_WISH will make the GRASS aqua or x11 compatible.  
> These are small files and then binary users would not need to worry  
> about having TclTk installed or which version they have installed.
>
I noticed something that could cause trouble in freely switching  
between aqua and X11 tcltk at runtime.  There is this 'osxaqua' env  
var (I think it came from Lorenzo a long time ago).  This needs to be  
set when running the GUI with tcltk aqua.

In tcl scripts it's used to set keycontrol to the Mac command key and  
execom to spawn.

There should be a way to detect the graphics system in tcltk so the  
user doesn't have to figure it out.  I poked around a bit and found that

[tk windowingsystem]

returns 'x11', 'aqua' and 'win32', independent of the platform.  So a  
combination of $tcl_platform(platform) and [tk windowingsystem] could  
be used to identify Mac X11 or Aqua.  I did find that [tk  
windowingsystem] opens a small empty tk window, but it's a place to  
start and maybe you know how to execute it properly.


'osxaqua' is also used once outside of tcl scripts, in init.sh.  It's  
used to decide whether to pipe the gis.m startup command to "sh &" or  
not.  I don't know if this really needs to be there, or if a different  
test could be used.


-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

First Pogril: Why is life like sticking your head in a bucket filled  
with hyena offal?
Second Pogril: I don't know.  Why IS life like sticking your head in a  
bucket filled with hyena offal?
First Pogril: I don't know either.  Wretched, isn't it?

-HitchHiker's Guide to the Galaxy




More information about the grass-dev mailing list