[GRASSGUI] Re: wx init.sh needs updating

William Kyngesburye woklist at kyngchaos.com
Tue Aug 7 13:13:04 EDT 2007


On Aug 7, 2007, at 12:44 AM, Michael Barton wrote:

> I started messing around with a python replacement for init.sh,  
> just to see
> what is needed. It is going pretty well, but tedious. Once done (and
> probably won't work right off) it could be a good opportunity to  
> clean up
> the start up script for GRASS. Thinking ahead to a time when the  
> same script
> can start GRASS on all platforms.
>
> Michael
>
Yeah, I just noticed a another oddity in init.sh related to wx - the  
gui dependency test is still based on X.  While wxpython on other  
'nix platforms may need X, it doesn't on OSX, and probably not on  
Windows either.  Summarized:

if DISPLAY set (though it may be set but no X is available, at least  
on OSX)
   test gui dependency - python for wx, wish for tcltk
   if it fails
     warn that *wish* doesn't work (oops)
else
   no gui possible
   if a gui is set
     warn that *X* is not available, and there a gui is not possible  
(oops again)

Instead of testing the gui dependency first, maybe this should test  
the gui setting first:

case GRASS_GUI:
   tcltk, etc)
     test X availability
     or better, ignore DISPLAY and test only wish - if it works, X is  
implied, or whatever graphical base needed (this would take care of  
native tcltk implementations, like Aqua or Windows, not that they  
work well)
   wx)
     test python availability (X implied if needed - as long as  
python works)


...just some thoughts...

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

"We are at war with them. Neither in hatred nor revenge and with no  
particular pleasure I shall kill every ___ I can until the war is  
over. That is my duty."

"Don't you even hate 'em?"

"What good would it do if I did? If all the many millions of people  
of the allied nations devoted an entire year exclusively to hating  
the ____ it wouldn't kill one ___ nor shorten the war one day."

<Ha, ha> "And it might give 'em all stomach ulcers."

- Tarzan, on war



-----
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-gui mailing list