[GRASS-dev] Windows-style Pathnames

Glynn Clements glynn at gclements.plus.com
Tue Nov 7 01:00:01 EST 2006


Paul Kelly wrote:

> > AFAICT, the "interpreter" is selected according the registry entry
> > corresponding to the extension, the same as if you had double-clicked
> > on the file's icon from an Explorer window.
> >
> > So, if we were to add ".sh" extensions to all of the scripts, and add
> > ".sh" to PATHEXT, calling e.g. system("r.out.gdal ...") should run
> > r.out.gdal.sh using the program associated with ".sh" in the registry.
> 
> That sounds like a fairly handy way of doing it. Does the installing user 
> need to be an administator on the Windows machine to change the registry 
> to do this file extension association?

I think that you might need to be at least "Power User" to add the
interpreter to the registry, but a normal user can change the
association between the extension and the interpreter.

> Or the other way that was discussed before was some kind of launcher 
> executable program. I was thinking that it could even be installed instead 
> of all the scripts like "front.end" used to be, and it would check the 
> contents of the real scripts and start them with the shell specified in a 
> GRASS_SH environment variable. But that might be a bit complicated and 
> prone to going wrong whereas the first approach would be more 
> understandable for experienced Windows users.

Using extensions has the advantage that it will work within cmd.exe
without having to manually invoke the launcher/interpreter.

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




More information about the grass-dev mailing list