[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.7 Module Installation

This section tells how to install an external module so you can invoke it within Geomview. There are two ways to install a module: you can install a private module so that the module is available to you whenever you run Geomview, or you can install a system module so that the module is available to all users on your system whenever they run Geomview.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.7.1 Private Module Installation

The emodule-define command arranges for a module to appear in Geomview's Modules browser. emodule-define takes two string arguments; the first is the name that will appear in the Modules browser. The second is the shell command for running the module; it may include arguments. Geomview executes this command in a subshell when you click on the module's entry in the browser. For example

 
(emodule-define "Foo" "/u/home/modules/foo -x")

adds a line labeled "Foo" to the Modules browser which causes the command "/u/home/modules/foo -x" to be executed when selected.

You may put emodule-define commands in your `~/.geomview' file to arrange for certain modules to be available every time you run Geomview; See section Customization: `.geomview' files. You can also execute emodule-define commands from the Commands panel to add a module to an already running copy of Geomview.

There are several other gcl commands for controlling the entries in the Modules browser; for details, See section gcl: the Geomview Command Language.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.7.2 System Module Installation

To install a module so that it is available to all Geomview users do the following

1.

Create a file called `.geomview-module' where `module' is the name of the module. This file should contain a single line which is an emodule-define command for that module:

 
(emodule-define "New Module" "newmodule")

The first argument, "New Module" above, is the string that will appear in the Modules browser. The second string, "newmodule" above, is the Bourne shell command for invoking the module. It may include arguments, and you may assume that the module is on the $path searched by the shell.

2.

Put a copy of the `.geomview-module' and the module executable itself in Geomview's `modules/<CPU>' directory, where `<CPU>' is your system type.

After these steps, the new module should appear, in alphabetical position, in the Modules browser of Geomview's Main panel next time Geomview is run. The reason this works is that when Geomview is invoked it processes all the `.geomview-*' files in its `modules' directory. It also remembers the pathname of this directory and prepends that path to the $path of the shell in which it invokes such a module.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]

This document was generated on June, 24 2006 using texi2html 1.76.