[GRASS-dev] Re: winGRASS

Glynn Clements glynn at gclements.plus.com
Tue Feb 13 11:06:43 EST 2007


Moritz Lennert wrote:

> >> Another similar problem: I have a German language WinXP installed on my
> >> machine in which programs are installed at c:\Programme and not
> >> "c:\Program Files".
> > 
> > That's due to this line in lib/init/init.bat:
> > 
> > if "%GRASS_HTML_BROWSER%"=="" set GRASS_HTML_BROWSER=%SYSTEMDRIVE%/PROGRA~1/INTERN~1/IEXPLORE.EXE
> > 
> > It should probably be:
> > 
> > if "%GRASS_HTML_BROWSER%"=="" set GRASS_HTML_BROWSER=%ProgramFiles%/INTERN~1/IEXPLORE.EXE
> > 
> > %ProgramFiles% will be set to the system's "Program Files" directory
> > (or whatever it is called on a particular system, e.g. "C:\Programme"
> > on a German system).
> > 
> > However, there are better solutions available on Windows, e.g.
> > 
> > 	rundll32 url.dll,FileProtocolHandler <filename or URL>
> > 
> > E.g.:
> > 
> > 	rundll32 url.dll,FileProtocolHandler "c:\Cygwin\usr\local\grass-6.2.1\docs\html\grass6.html"
> > or:
> > 	rundll32 url.dll,FileProtocolHandler "http://grass.itc.it"
> > 
> > This has the advantage of using the default application rather than
> > hardcoding MSIE.
> 
> Actually IIUC, it's not only MSIE which is hardcoded, but also the fact 
> that "Program Files" and "Internet Explorer" are the (alphabetically 
> first directories) with their respective abbreviation, i.e. if someone 
> has something like c:\Programe Files\Internet Ace, this would be 
> Intern~1 and Internet Explorer would become Intern~2. Do I understand 
> this correctly ?

The ~ suffixes are allocated in order of creation, so that they don't
change as new entries are added to or removed from the directory.

Even so, I don't see any reason to abbreviate the directory names.

> 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.

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




More information about the grass-dev mailing list