[winGRASS] Starting grass command from cmd.exe

François-Xavier PRUNAYRE fx.prunayre at oieau.fr
Wed Sep 5 02:20:47 EDT 2007


Thanks a lot Glynn, you're right, I made a gisrc file with 
LOCATION_NAME: data
MAPSET: user1
DIGITIZER: none
GISDBASE: c:\grass\data
OVERWRITE: 1
GRASS_GUI: text

Then start the command line and set
set GISBASE=c:\grass\grass-6.3.cvs
set GISRC=c:\grass\gisrc
set PATH=%PATH%;C:\grass\grass-6.3.cvs\bin;C:\grass\grass-6.3.cvs\lib;C:\grass\grass-6.3.cvs\scripts;C:\grass\grass-6.3.cvs\etc

And that's it. 

Cheers. Francois.

-----Message d'origine-----
De : Glynn Clements [mailto:glynn at gclements.plus.com] 
Envoyé : mercredi 5 septembre 2007 00:36
À : François-Xavier PRUNAYRE
Cc : wingrass at grass.itc.it
Objet : Re: [winGRASS] Starting grass command from cmd.exe


Fran輟is-Xavier PRUNAYRE wrote:

> Hi list, I知 new to grass on windows and I知 wandering if there痴 any way to
> have grass command running directly from cmd.exe without starting grass. 
> 
> I致e this up&running on linux setting env variable. 
> 
> I tried the same on windows but can稚 get it works. :-(
> 
> I added : C:\grass\grass-6.3.cvs\bin and C:\grass\grass-6.3.cvs\lib to PATH
> 
> Defined : GISBASE, GRASS_GUI, LOCATION_NAME and MAPSET variables
> 
> Any ideas ? 

Use the same mechanism as on Linux; just change the syntax for setting
environment variables from bash's "export" to cmd.exe's "set".

Apart from PATH (which needs to contain the bin, scripts and lib
subdirectories), you also need to set GISBASE and GISRC.

Note that GISDBASE, LOCATION_NAME and MAPSET are GRASS variables, set
in the file referenced by %GISRC%, not environment variables.

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













More information about the grass-windows mailing list