Closed wenzeslaus closed 1 year ago
Something like this is already implemented for the Linux case with grass
in the PATH
, as a fall-back, see #64, #63 and f6c6a38.
A wider implementation to get this path for typical (automated) installations, cross-platform, should be available in the link2GI package.
Considering the GRASS_INSTALLATION
environment variable, @rsbivand: it is documented (in Rd and in NEWS) as being used if available, but actually what @Robinlovelace implemented in f6c6a38 is only the grass --config path
fallback in case the variable is not available. Do I overlook something? Still missing IMO: if GRASS_INSTALLATION
is set to a value and is.missing(gisBase)
: set gisBase
to this value (perhaps with a message), still followed by the checks on the value of gisBase
(does it exist etc).
Asking user to provide path to executable seems to me more doable than asking for path to installation. On Windows, it will be something like
C:/Program Files/GRASS GIS 8.2/grass82.bat
, but on Linux, it will likely be simplygrass
(possibly a good default value?).This is what I used myself:
The executable can be then used to provide the install path like I did above or it can be used to provide whatever else is needed.