[GRASS-dev] Re: winGRASS
Paul Kelly
paul-grass at stjohnspoint.co.uk
Tue Dec 19 14:38:41 EST 2006
On Mon, 18 Dec 2006, Glynn Clements wrote:
>
> Moritz Lennert wrote:
>
>> - trying to create a new location from a georeferenced file or from an
>> EPSG code, I get:
>>
>> couldn't execute "c:\grass\grass-6.3.cvs\etc\grass-xterm-wrapper": no such
>> file or directory
>
>> I imagine that wingrass should'nt even call grass-xterm-wrapper since we
>> don't have an xterm, or ?
>
> It may suffice to set GRASS_XTERM to a command which is compatible
> with an xterm, e.g. a batch file which ignores everything before the
> "-e" switch and runs the command which follows it in a Windows console
> (e.g. using the "start" command).
>
> 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.
> Programs which use a console for simple printf/fgets-style dialogue
> should work in either a Windows console or rxvt (xterm, etc), but
> programs which use pdcurses will only work in a console.
Well I have set it to explicitly use a Windows console. So I guess if
someone compiles using something other than pdcurses that would be a
problem. But perhaps not one worth worrying about.
Paul
More information about the grass-dev
mailing list