librarymanager
OML library management.
Syntax
librarymanager(action)
librarymanager('install', directory)
librarymanager('uninstall', directory)
librarymanager('load', directory)
librarymanager('unload', directory)
librarymanager('list')
librarymanager('listdetail')
librarymanager('launch')
returnlist = librarymanager('scriptlist')
libraryname = librarymanager('libraryname')
librarymanager('saveini', iniSettings)
librarymanager('unixlinkadd', directory, fileListAdd)
librarymanager('unixlinkdel', fileListDel)
librarymanager('unixlinkdir')
Inputs
- action
- The first librarymanager variable, a string specifying the librarymanager action.
- directory
- The full directory path to the library being acted upon.
- iniSettings
- Single-dimension cell containing the elements to describe the library.
- Library root directory.
- Library descriptive name.
- Library version.
- Library short description. Optional.
- Library long description. Optional.
- fileListAdd
- Required for the 'unixlinkadd' action in the loader.oml script used to add BCI libraries on Linux systems.
- fileListDel
- Required for the 'unixlinkdel' action in the unload.oml script used to remove BCI libraries on Linux systems.
Outputs
- returnlist
- A cell containing a list of script functions returned by the 'scriptlist' action.
- libraryname
- A string containing containing the directory name of the library.
Comments
Notes for the various forms of the librarymanager function.
- librarymanager('install', directory)
- The install process runs the loader.omc or loader.oml script provided by the library creator in the library root directory. An installed library is active (loaded and ready for usage) each time Twin Activate is started.
- librarymanager('uninstall', directory)
- The uninstall process runs the unload.omc or unload.oml script provided by the library creator in the library root directory. An uninstalled library does not load when Twin Activate is started. The 'uninstall' command searches for an exact match in the library list table and removes the library entry from that table.
- librarymanager('load', directory)
- A loaded library remains exposed and available during the current Twin Activatesession until unloaded or until the Twin Activate session is ended. When Twin Activate is started, a library loaded in a previous session won’t be loaded automatically. The load process runs the loader.omc or loader.oml script provided by the library creator in the library root directory.
- librarymanager('unload', directory)
- An unloaded library is no longer active (not exposed, not available) during the current Twin Activate session. An installed library is not uninstalled by unload and is activated (exposed and available) when Twin Activate is started next. The unload process runs the unload.omc or unload.oml script provided by the library creator in the library root directory.
- librarymanager('list')
- Show brief details about installed libraries. Applies only to installed libraries, not loaded libraries. Displays the installed library paths from the library installation table.
- librarymanager('listdetail')
- Show more details about installed libraries. Applies only to installed libraries, not loaded libraries. Details here come from the library.ini file, with the details originating in the library's loader.oml file provided by the library creator.
- librarymanager('launch')
- This feature runs the load process for each installed directory. In practice, this means the loader.oml (or loader.omc) script is executed for the library. Ordinarily, librarymanager users should not need to run this feature, because the librarymanager's loader.oml runs this function. However, running this feature after OML has launched may provide useful information during the load sequence depending on messaging provided by library creators.
- returnlist = librarymanager('scriptlist')
- Return a cell containing all filenames in the scripts/oml directory. Each *.oml file under scripts/oml is assumed to be a script containing an OML function. If this is not the case, the 'scriptlist' option provides an incorrect function list and should not be used.
- libraryname = librarymanager('libraryname')
- Root directory of the library is its name. The 'libraryname' option returns the library's root directory name. Again, this is considered to be the library's name. You are encouraged to place libraries in directories with meaningful folder names.
- librarymanager('saveini', iniSettings)
- Write library.ini file in the root directory. The variable iniSettings must contain the library root directory, library descriptive name, library version, library short description and long description.
- librarymanager('unixlinkadd', directory, fileListAdd)
- Create symbolic links to run a Unix BCI library. BCI libraries are accessed by symbolic links created in a directory added to the LD_LIBRARY_PATH when Twin Activate is launched. This command is required in the loader.oml (or .omc) file to enable the use of a BCI library on a Unix system. The library_directory needs to be the full path to a directory containing the library’s binary files. Run 'unixlinkadd' separately for each directory which needs to be added. The variable fileListAdd should contain an entry with the filename for each binary file required to run the library.
- librarymanager('unixlinkdel', fileListDel)
- Delete symbolic links which were created to run a Unix BCI library. This command is required in the unload.oml (or .omc) file to remove link files created to run a BCI library on a Unix system. The variable fileListDel should contain an entry with the filename for each binary file required to run the library. A single 'unixlinkdel' command can be used to delete all links created to run a BCI library.
- librarymanager('unixlinkdir')
- Return the location of the directory which contains the symbolic links. This action is used internally by both 'unixlinkadd' and 'unixlinkdel' to obtain the location of the directory. Library creators and users may find this action useful to review the links created to launch BCI libraries.