[GRASS5] GRASS 6 extension manager

Michael Barton michael.barton at asu.edu
Sun May 1 01:46:37 EDT 2005


Benjamin,

This is very exciting. I am looking forward to being able to manage GRASS
extensions without needing to compile the entire program.

With respect to incorporating them into the GIS manager, probably the
easiest is to have a separate 'extensions' menu; I can add one easily.
However, it should not be that difficult for an extension to integrate into
the existing menu scheme either. ArcView extensions often worked that way.

All GIS Manager menus are handled by a single TclTk script file (in ascii)
called menu.tcl. Any modification of this script file shows up immediately
in the GIS Manager as soon as you restart d.m. It is not necessary to
compile it (which has made it much easier for me to work with). Menu.tcl is
located (in the compiled binary) in the $GISBASE/etc/dm directory. If you
take a look at this file, it should be pretty obvious how the menus are
handled. But basically, each menu item is a single line of TclTk script.
Cascade lines set off submenus. Separator lines produce horizontal rules
that divide up a set of menus into visual groups.

The buttons are a bit more complicated. But again, each button is called by
a single line of TclTk script. These are in tool1.tcl and tool2.tcl. It is
conceivable for an extension to install as a button. However, I haven't left
much room for that. There is a little on the second button bar line
(tool2.tcl), but not much.

I'm happy to help you with this.

Michael


On 4/28/05 12:39 AM, "benducke at compuserve.de" <benducke at compuserve.de>
wrote:

> For the past weeks, I have been working on a stand-alone program
> that allows for compilation and installation of GRASS 6 modules
> and libs, called GRASSS Extensions Manager ('gem').
> 
> Gem will allow GRASS users to download, compile and install
> additional GRASS commands and libraries without the need
> to have a complete GRASS 6 source tree or know a lot
> about C source code configuration and compilation.
> 
> An extension may contain:
> - source code written for GRASS 6
> - any number of binary sets for specific architectures
> - scripts
> - ASCII files that describe the contents and dependencies
>   of the extension
> 
> 'gem' can do the following things for the user:
> - compile and install extensions from within a directory
>   or a compressed archive (tar.gz, tar.bz2, zip) provided
>   that tar, gzip and friends are available
> - install pre-compiled binaries and scripts
> - retrieve extension packages from http and ftp sources,
>   provided that wget is available
> - query extensions and display information and license
>   files
> - upgrade extensions
> - remove extensions from the system
> - manage dependencies on other extensions and specific
>   GRASS versions
> 
> It is really easy for extension authors to get their source
> code into a form that works with 'gem'. I will provide
> an extension skeleton with commented ASCII files that extension
> authors just need to fill in. Other than that, it should be
> possible to keep Makefile and source structure untouched
> as 'gem' uses a simplified copy of the original GRASS 6 make
> system.
> 
> I am going to release a version of 'gem', as well as a
> few usefull extensions sometime next month and would like
> everyone with some time to spare to try and download and
> install some of those on their systems. Otherwise, I will
> never be able to know if the simplified compilation scheme
> works reliably on different systems.
> 
> Before I release 'gem' for testing, I would like to complete
> its functionality. For this, I need some help with the following
> two items that should also be stored inside an extension package:
> - HTML documentation
> - Hooks for the GIS manager
> 
> My questions are:
> 
> - what is the best way to merge an extension's HTML docs into
>   the GRASS 6 installation? I think it would be important
>   to register the new pages in 'index.html', perhaps in a
>   separate paragraph so that the user can quickly see which
>   additional commands an extension has added to the system.
> 
> - how are we going to make new commands available in the
>   GIS manager?
>   Should the extension author be able to register them
>   in any of GIS manager's menus?
>   Or would it be better to have a menu 'Extensions' under
>   which every extension registers its commands?
> 
> Cheers,
> 
> Benjamin
> 
> 

____________________
C. Michael Barton, Professor of Anthropology
School of Human Evolution and Social Change
PO Box 872402
Arizona State University
Tempe, AZ  85287-2402
USA

Phone: 480-965-6262
Fax: 480-965-7671
www: <www.public.asu.edu/~cmbarton>




More information about the grass-dev mailing list