[GRASS-dev] Re: winGRASS

Glynn Clements glynn at gclements.plus.com
Tue Feb 13 20:03:13 EST 2007


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 ?)

It probably wouldn't hurt to put quotes around %*.

If it doesn't work without a batch file, that suggests that
$GRASS_HTML_BROWSER is interpreted as a command name, rather than a
command and arguments (i.e. it's being used as the first argument to
exec, rather than being parsed into a list to which the filename is
appended).

That's probably the right thing to do; if it was beig parsed into a
list, you wouldn't be able to specify a path which contained spaces.

> 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 :-(

LOCATION_NAME is a GRASS variable, not an environment variable. Check
that the value of $GISRC and the contents of the file to which it
refers are sane.

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list