[GRASS-dev] Re: winGRASS
Glynn Clements
glynn at gclements.plus.com
Tue Dec 19 19:05:23 EST 2006
Paul Kelly wrote:
> > Ideally, on Windows, grass-xterm-wrapper should be a .bat/.cmd script
> > which ignores GRASS_XTERM and does this automatically.
>
> This is the way I have handled a similar thing in lib/gtcltk/gronsole.tcl
> (for the "Run in xterm" button in the gis.m command Window):
>
> if { $mingw == "1" } {
> exec -- cmd.exe /c start $env(GISBASE)/etc/grass-run.bat $cmd &
> } else {
> exec -- $env(GISBASE)/etc/grass-xterm-wrapper -name xterm-grass -e $env(GISBASE)/etc/grass-run.sh $cmd &
> }
>
> where grass-run.bat sets the console Window title, forces terminal parser
> mode, runs the command, pauses at the end and prints a note if the command
> has exited with a non-zero return value. Just a duplicate of the
> functionality of grass-run.sh really.
>
> Setting the GRASS_XTERM variable to a suitable value that it works on
> Windows without the $mingw check in the Tcl script sounds like a neat idea
> however if it works.
If it works, a grass-xterm-wrapper.bat file would work for everything
which currently uses grass-xterm-wrapper without the need for the user
to set GRASS_XTERM. Actually, setting GRASS_XTERM relies upon the
existing grass-xterm-wrapper shell script getting run, which
presumably won't happen on MinGW?
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev
mailing list