update October 3, 2010
menulist - lists the directories corresonding to bioLegato menus, and the  Locally-installed items are automatically merged into the .GDEmenus files. This document assumes that you are familiar with the structure of the .item files as described in the GDE Manual.

makemenus.py works within the current working directory. Typically, this directory is called GDE, and assumes the following directory structure:

<menu directories>
(At a BIRCH site, the bl_instance directory is $BIRCH/dat/blinstance.) Within bl_instance/menus, the file menulist contains menu lines and item lines. Indentation by tab characters defines the File/Menu item hierarchy. Each menu consists of a menu line followed by 0 or more item lines:

<menu>::=<menuline>[<item line>]

<menu line> ::= <menu name>
<item line> ::= <TAB><item name><TAB><platform flags>

<menu name> is the name of a menu and is also the name of a directory in bl_instance/menus containing menu items, each in a separate file. Blanks may be included in menu names, but are discouraged, since the menu name is also a directory name.

<item name> - Item name is the name of a menu item, and is also the name of a file containing the menu item. The actual file name must have the ".item" extension, but this extension must NOT be used in the menulist file. Again, blanks are permitted in item names, but are discouraged.

<platform flags> - This field consists of one or more non-blank letters indicating the platform on which a program is available. If this field is empty, the menu item will be included for all platforms. If the field is not empty, the menu item will only be included when bioLegato is run on the specified platforms.

The following letters may be included in the platform flags fields:

platform flag for menulist file
solaris sparc S
solaris-amd64 s
linux-intel L
linux-x86_64 l
osx-x86_64 M

At login time, the user's $GDE_HELP_DIR is set to one of these directories, so that the user gets menus customized for the platform he is currently logged into.

The order of menus and  items displayed in GDE will be the same as the order in menulist.

Any line on which the first non-whitespace character is a hashmark '#', will be ignored as a comment.
Each time a bioLegato instance launches, it reads the menulist from $birch/dat/bl_instance/menus, and then, if it exists, reads the menulist file from directories specified in $birch/dat/bl_instance/ldir.parm. Usually, that directory is $birch/local/dat/bl_instance/menus,  which contains the name of a local copy of menus directories. The structure of both of these directories and subdirectories is identical.  If a menuitem is read from $BIRCH/local with the same name as an existing item in $BIRCH, the copy in $BIRCH/local overwrites the original. This makes it possible to maintain localy-modified menuitems that replace the ones supplied with BIRCH.

SPECIAL NOTE: Menus present in all bioLegato instances.
Several menus are hardwired into bioLegato. That is, in  the File, Edit and Help, there are several internal bioLegato functions that are not specified in the .GDEmenus file. The DNA/RNA menu contains one hardwired item, the Complement function. If we don't include a menu called DNA/RNA, this function is lost. However, it is a VERY bad idea to have a '/' character in the name of a directory. The workaround is that we call the directory DNARNA. makemenus.py will print this as 'DNA/RNA' to the .GDEmenus file, so that GDE correctly displays this menu.

A menulist file  might include:
# multiple sequence alignment
pima S
boxshade Ll
# phylogenetic analysis
atv SLl
A user logging into a Solaris system would see all items except boxshade, while a user logging into a Linux system would see all items except pima. Note that if the platform field is blank, then the item is available on all platforms. In this example, putting both S and L in the platform field accomplishes the same thing.
(Note: All indentation must be done using TAB characters, not blanks.  Similarly, the platform fields are separated from the item-name fields by TABs.)

In the example, within bl_instance/menus, there must be directories called Alignment and Phylogeny. Alignment would contain clustalx.item, pima.item, jalview.item and boxshade.item. Phylogeny would contain Phylip.item, fastDNAml.item and atv.item.

Locally-installed programs can be integrated a bioLegato instance. For example, if $BIRCH/local/dat/bldna/menus/menulist contained
and there was a file called Alignment/reform.item, then the reform program would be added to the bottom of the Alignment menu.

 None known.
Dr. Brian Fristensky
Department of Plant Science
University of Manitoba
Winnipeg, MB  Canada R3T 2N2