BIRCH
Helper Applications -
Technical Description
update July 5, 2015


SUMMARY

For brevity, examples are only shown for the Bourne shell, and for BL_PDFViewer on linux-x86_64.

ORGANIZATION OF TASKS

The shell sets BioLegato Environment Variables (BLvariables) by calling setblenv.profile-platform.source. blsetenv.source sets BLvariables based on the value of $BIRCH_PLATFORM. This file is created by BLHelper.py.write_script(), either during installation or update, or when called from birchadmin.


setblenv.profile-platform.source was generated by BLHelper.py, using the local values for BLvariables  which are stored in $BIRCH/local/admin/BL.properties.platform. There is a set of BLvariables in a series of files called BL.properties.platform. This file is read and written by ReadBLChoices() and WriteBLChoices().
 

The BL.properties.<platform> files were generated by BLHelper.py, using possible choices for BLvariables stored in  $BIRCH/admin/BLHelper/BL<viewer_type>_<platform>.list files.

Each BL<viewer_type>_<platform>.list  file contains a list of commands to run for each application, one command per line. These are stored in the .list files as a name/value pair, where the name is the label used in the BioLegato menu, and the value is the command run by BioLegato. The commands may contain command line arguments. The list is evaluated beginning on line 1. BLHelper.py checks to see whether the program exists and is executable. The first program to meet these criteria is chosen as the helper application. Thus, you can set a preferred first, second, third etc. choice of helper application by how the applications are ordered in each file.

BLHelper.py can be run from birchadmin to automate setting of BLvariables. Any time BLHelper.py is run, it generates the HelperApps.blmenu file for birchadmin. That way, an up-to-date list of choices for each BLvariable will be written to the .blmenu file. The HelperApps choice in birchadmin lets the user choose


During installation and updating, BLHelper.py generates the birchadmin-->HelperApps menus, and the setblenv.profile.platform.source.

WORKFLOWS

New install
  1. read Choices from BL_var_platform.list file
  2. foreach BLvariable
    1. select best choice for the platform
  3. write:

Update of an existing system

  1. read BLvariables from BL.properties.platform file
  2. read Choices from BL_var_platform.list file
  3. foreach BLvariable
  4. write:


Choosing Helper Apps using birchadmin
  1. read BLvariables from BL.properties.platform file
  2. read Choices from BL_var_platform.list file
  3. if the program --setvar isn't found
  4. write:



Please send suggestions of comments regarding this page to psgendb@cc.umanitoba.ca