wiki:AddOnsManagement

This page collects information about the wxGUI GRASS AddOns management from developer point of view.

AddOns XML file

GRASS AddOns metadata XML file can be created by build-xml.py Python script available from SVN. It's creating XML file modules.xml in ~/.grass6/addons for GRASS 6 and in ~/.grass7/addons for GRASS 7.

Example:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task SYSTEM "grass-addons.dtd">
<modules version="7">
    <task name="d.mon2">
        <description>Starts a graphics display monitor which can be controlled from the command line.</description>
        <keywords>display,CLI</keywords>
    </task>
    <task name="i.points.auto">
        <description>Generate ground control points for image group to be rectified.</description>
        <keywords>imagery,ground control points</keywords>
    </task>
...
    <task name="v.unpack">
        <description>Unpacks a vector map packed with r.pack.</description>
        <keywords>vector,import,copying</keywords>
    </task>
</modules>

There is also available script called compile-xml.sh which compiles GRASS AddOns modules for GRASS 6 and GRASS 7 and creates XML metadata file. This script simply calls compile.sh and build-xml.py. When running the script the main log file is stored in ~/grass<version>/addons/log/ALL.log and each modules log in ~/.grass<version>/addons/log/<module>.log. Beside that the script also prints basic information about progress to standard output

At revision 49265.
-----------------------------------------------------
AddOns '/home/landa/.grass7/addons'...
-----------------------------------------------------
Compiling d.mon2... SUCCESS
Compiling i.points.auto... SUCCESS
...
Compiling v.unpack... SUCCESS
-----------------------------------------------------
AddOns '/home/landa/.grass6/addons'...
-----------------------------------------------------
Compiling d.barb... SUCCESS
Compiling d.edit.rast... SUCCESS
...
Compiling v.what.rast.buffer... SUCCESS
-----------------------------------------------------
Creating XML file '/home/landa/.grass7/addons/modules.xml'...
-----------------------------------------------------
Parsing <d.mon2>...  SUCCESS
Parsing <i.points.auto>...  SUCCESS
...
Parsing <v.unpack>...  SUCCESS
-----------------------------------------------------
Creating XML file '/home/landa/.grass6/addons/modules.xml'...
-----------------------------------------------------
Parsing <d.barb>...  FAILED
Parsing <d.edit.rast>...  SUCCESS
...
Parsing <v.what.rast.buffer>...  SUCCESS

Automatically created XML files are available from http://grass.osgeo.org/addons/

Compile AddOns on MS Windows

Background: g.extension(.py) in winGRASS is not trying to compile given AddOn as on GNU/Linux, it just downloads pre-compiled binaries from the remote server.

If you would like to try to build them yourself you must ensure that the osgeo4w and GRASS software is located in paths without spaces in them. The Make system we use can't deal with that, and it is beyond our control to fix.

The GRASS AddOns binaries are downloaded in winGRASS by default from http://wingrass.fsv.cvut.cz, eg. for GRASS 7 it's http://wingrass.fsv.cvut.cz/grass70/addons. The GRASS AddOns are compiled on that server by script compile.sh available from SVN.

Last modified 5 years ago Last modified on Oct 25, 2012 2:55:21 PM