Starting grass command from cmd.exe

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Starting grass command from cmd.exe

François-Xavier PRUNAYRE

Hi list, I’m new to grass on windows and I’m wandering if there’s any way to have grass command running directly from cmd.exe without starting grass.

 

I’ve this up&running on linux setting env variable.

I tried the same on windows but can’t get it works. L

 

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 ?

Thanks a lot for your help.

 

Francois



_______________________________________________
winGRASS mailing list
[hidden email]
http://grass.itc.it/mailman/listinfo/wingrass
Reply | Threaded
Open this post in threaded view
|

Re: Starting grass command from cmd.exe

Markus Neteler-3
In recent CVS versions, a grass63.bat file is generated. It is based on this
template:

http://freegis.org/cgi-bin/viewcvs.cgi/*checkout*/grass6/lib/init/grass.bat?rev=HEAD

Maybe you can pick relevant entries from that file.

Markus

François-Xavier PRUNAYRE wrote
Hi list, I’m new to grass on windows and I’m wandering if there’s any way to
have grass command running directly from cmd.exe without starting grass.

 

I’ve this up&running on linux setting env variable.

I tried the same on windows but can’t 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 ?

Thanks a lot for your help.


Francois
Reply | Threaded
Open this post in threaded view
|

Re: Starting grass command from cmd.exe

Glynn Clements
In reply to this post by François-Xavier PRUNAYRE

Fran�ois-Xavier PRUNAYRE wrote:

> Hi list, I�m new to grass on windows and I�m wandering if there�s any way to
> have grass command running directly from cmd.exe without starting grass.
>
> I�ve this up&running on linux setting env variable.
>
> I tried the same on windows but can�t 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 <[hidden email]>

_______________________________________________
winGRASS mailing list
[hidden email]
http://grass.itc.it/mailman/listinfo/wingrass
Reply | Threaded
Open this post in threaded view
|

RE: Starting grass command from cmd.exe

François-Xavier PRUNAYRE
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:[hidden email]]
Envoyé : mercredi 5 septembre 2007 00:36
À : François-Xavier PRUNAYRE
Cc : [hidden email]
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 <[hidden email]>










_______________________________________________
winGRASS mailing list
[hidden email]
http://grass.itc.it/mailman/listinfo/wingrass