wiki:AddOnsManagement

Version 17 (modified by martinl, 13 years ago) ( diff )

--

This page collects information about 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.0.svn>
    <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/make.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

Daily re-created XML files are available from http://grass.osgeo.org/addons/

Compile AddOns on MS Windows

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

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.

Note: See TracWiki for help on using the wiki.