[GRASS-dev] Running "grass71" from command line on MS Windows

Vaclav Petras wenzeslaus at gmail.com
Mon May 18 07:31:36 PDT 2015


Hi,

do you think it would make sense for MS Windows installer to add the main
GRASS executable on path?

I'm asking because of #2579 (r65252). On MS Windows you will have to use:

C:\Program Files (x86)\GRASS GIS...\grass71 C:\grassdata\... exec g.region
-p

It would be much nicer to be able to do the same as on Linux where GRASS is
on path when installed:

grass71 ~/grassdata/... exec g.region -p

I guess we can instruct the user somewhere (?) that one have to add a
particular to PATH variable to have GRASS on path, but this is quite
cumbersome to do. Is it possible to modify the installer that it
(optionally) adds GRASS on path?

The goal is to enable writing (non-grass) scripts which are portable from
one computer to another. In case the GRASS command/executable is named
grass, rather then grass7 or even grass70/grass71 the scripts can be even
more universal (supposing that your script will work with the version
marked as grass). Surely, you should have it in some variable in your
script but you have to set the value somehow and I would prefer to see
scripts not starting with:

grass = "C:\Program Files (x86)\GRASS GIS...\grass71"

but rather

grass = "grass"

or

grass = "grass7"

Best,
Vaclav

https://trac.osgeo.org/grass/ticket/2579
https://trac.osgeo.org/grass/changeset/65252
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20150518/6c83a02c/attachment.html>


More information about the grass-dev mailing list