[GRASS-user] How To Develop Own GRASS Modules on Windows

Hi Daniel,

I reply you starting a new thread on the list because I think it could be of general interest:

my goal is just to understand how to create a module like v.in.ascii (by example)
because i must create a specific tool importing data
your page is a learning tool not for replacing the install
If you have a better way for me, please help me

if you want to develop you own GRASS modules on Windows I suggest you to:

  1. download this archive: http://grass.osgeo.org/grass63/binary/mswindows/native/GRASS_MSYS_Environment.zip

it is still not updated, but it’s fair enough for your job.

  1. refer to this document on how to develop GRASS modules: http://download.osgeo.org/grass/grass6_progman/

you don’t need to build GRASS to build your own modules; the smartest way is to:

  1. download and install the current WinGRASS release (6.3.0-3)

referring to my building guide (http://www.webalice.it/marco.pasetti/grass/BuildFromSource.html):

  1. execute steps 1 and 2

  2. jump to step 24, download and extract the GRASS sources tarball (it’s very important that you use the same sources as the current binary release, that is 6.3.0) as suggested by the guide

  3. run the configure as suggested by the guide and run the “export PATH=[…]” command

  4. run: make libs

assuming that you have your own module v.in.daniel in C:\msys\local\src\my-grass-modules\v.in.daniel:

  1. go to your module’s source root: cd /usr/local/src/my-grass-modules/v.in.daniel

  2. run: make MODULE_TOPDIR=/usr/local/src/grass-6.3.0

your own module’s binaries will be built in: C:\msys\local\src\grass-6.3.0\dist.i686-pc-mingw32\bin
while the html help pages in: C:\msys\local\src\grass-6.3.0\dist.i686-pc-mingw32\docs\html

  1. just copy the binaries and html pages to your GRASS-Install-Dir\bin and \docs\html\ respectively

Happy hacking :slight_smile:

Marco

On Wed, Jun 18, 2008 at 10:08 AM, <marco.pasetti@alice.it> wrote:

Hi Daniel,

I reply you starting a new thread on the list because I think it could be of
general interest:

my goal is just to understand how to create a module like v.in.ascii (by
example)
because i must create a specific tool importing data
your page is a learning tool not for replacing the install
If you have a better way for me, please help me

if you want to develop you own GRASS modules on Windows I suggest you to:

I have copied your comments to:
http://trac.osgeo.org/grass/wiki/BuildingOnWindows

Markus

Hi Markus,

I have copied your comments to:
http://trac.osgeo.org/grass/wiki/BuildingOnWindows

Thanks.
I just edited few lines to complete it.

Marco