[GRASS-dev] Re: winGRASS

Moritz Lennert mlennert at club.worldonline.be
Tue Feb 13 18:26:32 EST 2007


On Tue, February 13, 2007 17:06, Glynn Clements wrote:
>
> Moritz Lennert wrote:
>
>> Would your solution translate to:
>> if "%GRASS_HTML_BROWSER%"=="" set GRASS_HTML_BROWSER="rundll32
>> url.dll,FileProtocolHandler"
>> or does this have to be handled outside the GRASS_HTML_BROWSER variable ?
>
> I'd try setting GRASS_HTML_BROWSER as above; if that doesn't work, you
might need to create a batch file to do the same thing.

Maybe I simply did not quote the rundll32 line correctly, but I did not
manage to make it work. However, it works great using a
bin/url_handler.bat which simply contains:

rundll32.exe url.dll,FileProtocolHandler %*

(any quoting needed here ?)

and then set GRASS_HTML_BROWSER in Init.bat to url_handler.bat.

Now I get my default browser when clicking on the help button in the
startup screen or in a standalone module gui called from the command line.

However, this does not solve the g.manual issue. I still get
"LOCATION_NAME not set" whenever I try to launch g.manual. Actually I get
this whenever I try to launch something (script or C-binary) via
%GRASS_SH% which is set to msys' sh.exe. But even within this shell, echo
$LOCATION_NAME gives me the correct location name, so I don't understand
where this message comes from :-(

I can reproduce this also in the GIS Manager: whenever I select a module
in the menu which is actually a script, I get the "LOCATION_NAME not set"
error.

I can get g.manual to run (i.e. show it's gui window), by changing
bin/g.manual.bat from

@"%GRASS_SH%" -c '"%GISBASE%/scripts/g.manual" %*'

to

g.parser "%GISBASE%/scripts/g.manual" %*

But then, when I enter a module name and press Run, I get:

GRASS 6.3.cvs (spearfish60):C:\ >g.parser
"c:/GRASS/grass-6.3.cvs/scripts/g.manual" entry=d.vect
Starting browser <url_handler.bat> for module d.vect...

But nothing happens. Same on the command line, where I also only get the
message "Starting browser <url_handler.bat> for module d.vect..." but
nothing happens.

When I try to apply the same recipe to v.dissolve it continues to fail
with "LOCATION_NAME not set" until I comment out the call to v.extract...

I have the feeling that the g.parser route is the wrong one, but I was
hpoing it might give us an idea of where this error comes from. Am tired
and a bit lost, so I think I'll better get some sleep and think about it
more tomorrow.

Moritz




More information about the grass-dev mailing list