[GRASS-dev] Re: winGRASS

Paul Kelly paul-grass at stjohnspoint.co.uk
Fri Feb 9 09:25:08 EST 2007


On Fri, 9 Feb 2007, Moritz Lennert wrote:

>>> - Help does not work. In individual command windows, the help button is
>>> desactivated. In layer panels in the main GIS Manager window, when I
>>> push
>>> the help button, I get:
>>>
>>> child process exited abnormally
>>> child process exited abnormally
>>>    while executing
>>> "exec -- g.manual d.vect >& NUL:"
>>>    ("eval" body line 1)
>>>    invoked from within
>>> "eval [list exec -- $cmd] $args >& $devnull"
>>>    (procedure "run" line 8)
>>>    invoked from within
>>> "run g.manual d.vect"
>>>    ("uplevel" body line 1)
>>>    invoked from within
>>> "uplevel \#0 $cmd"
>>>    (procedure "Button::_release" line 18)
>>>    invoked from within
>>> "Button::_release .mainframe.frame.pw1.f1.frame.sw.sf.frame.fr.name.e"
>>>    (command bound to event)
>>>
>>
>> This was due to g.parser assuming the shell (c:\msys\1.0\bin\sh.exe) that
>> it needed to run g.manual (required for all the help) was in the path. I
>> have since changed the way it operates on Windows to first check the
>> environment variable GRASS_SH before looking for sh.exe in the path. So
>> the help should work now.
>
> No, I still see exactly the same situation (with cvs from Feb. 5): greyed
> out in individual module gui, error message in gis.m layer panel.

OK this seems very complicated. For me, it works from the button with the 
GRASS logo superimposed with a green question mark in the layer panel. It 
also works from the Help menu in gis.m. Does g.manual work for you when 
you run it from the command-line (grass63.bat -text)?

The problem with the greyed out button is due to this check in the 
make_fun_buttons() function in gui/tcltk/gis.m/runandoutput.tcl

  # Turn off help button if the help file doesn't exist
  if {! [file exists $env(GISBASE)/docs/html/$pgm_name.html]} {
          $buttonframe.help configure -state disabled
  }

For some reason $pgm_name has .exe at the end so the test fails.
BUT - this is just a clone of the code for the standalone Tcl/Tk dialog in 
lib/gis/gui.tcl, and it works there (for me anyway - can you confirm if 
you run a command from the command-line without any arguments that the 
Help button isn't greyed out and works?). The $pgm_name there, wherever it 
is derived from, doesn't have .exe at the end.

I'm really not sure where it's coming from; find Tcl code hard enough to 
follow anyway and not sure about the way everything interacts here anyway.

Another interesting point is that in lib/gis/gui.tcl the help button runs:
exec $env(GRASS_HTML_BROWSER) $env(GISBASE)/docs/html/$pgm_name.html &
whereas most places in gis.m run g.manual $pgm_name or something similar. 
As g.manual requires a bash interpreter to run, maybe the former solution 
is more platform-independent? Or are other places not supposed to access 
$GRASS_HTML_BROWSER - should it be just for g.manual to use?

[...]
> - New thing in current (5/2) version: it seems that the grass63.bat file
> is not adapted and copied to the bin directory during 'make install'.

This should be fixed as of yesterday, also the problem with the directory 
separator characters in grass63.bat should be all sorted.

Paul




More information about the grass-dev mailing list