[GRASS-dev] debugging nviz with TclTk 8.5 aqua

Glynn Clements glynn at gclements.plus.com
Thu Jul 24 12:17:31 EDT 2008


William Kyngesburye wrote:

> >> I worked. It actually looks pretty nice for the main GUI. What you  
> >> need to do is to copy grass7.app/Contents/MacOSX/bin/wish8.5 to  
> >> wish. Hopefully, this can be worked out in the compilation mac.app  
> >> step.
> >>
> > This is part of the messed up logic in the OSX app startup - for the  
> > X11 tcltk the makefile copies tclsh and wish to the GRASS package,  
> > but not for aqua.  But the startup shell sets GRASS_WISH anyways to  
> > a packaged wish.
> >
> > I was trying to bee too flexible for some nonexistent possibilities,  
> > and I need to drop the TCLTK_INTERNAL thing.  And simplify  
> > configuration.
> 
> Glynn, one thing I hack around right now in the OSX app makefile is  
> setting the tcltk version, so I can set the right wish binary and  
> package tcltk files in the GRASS bundle.  Could some logic be added to  
> configure to detect the tcltk version and add it to platform.make (ie  
> TCLTKVER)? (who handles configure changes these days?)

configure already determines the Tcl/Tk version from the headers, in
order to locate the libraries (which may be named e.g. tcl8.4.so or
tcl84.so).

The result is stored in the shell variables tcltk_ver and tcltk_ver2
(the latter doesn't have the dot), but currently these aren't
substituted into Platform.make.

I could add some AC_SUBST() calls for those. Or you could just iterate
through a list of plausible names (wish, wish85, wish8.5, ...) until
you find one. GRASS_WISH doesn't need to be the same version which is
used for NVIZ, v.digit etc.

In fact, using the version may be counter productive; e.g. you could
have libraries/headers for native 8.5, but wish85 might be an X11
version. Also, the executable sometimes has a suffix (e.g. wish84g),
but TK_VERSION doesn't.

Personally, I would suggest trying common names (starting with just
"wish") until you find one which is a native version. Or enumerating
$PATH and trying everything that begins with "wish".

But really, this should be done at startup. You don't know which
versions the user will have installed, and (unlike with libraries) you
don't actually need to know this at compile time.

Or, if it's that much of an issue, we can just add the wish source
code (i.e. tkAppInit.c) to GRASS and include our own "wish" in
$GISBASE/bin.

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-dev mailing list