Scopira  20080306
Command line parameter processing

Scopira based applications can take command line options. All options are in the form of option=value

System Options

System options are options that are available to all Scopira based applications. They are:

  • debug=1 show some debug information on startup (like the object registration tree)
  • noui=1 (Lab applications only) disable GUI, and use only paramters supplied via the command line
  • config=filename sepecifies a config file to parse (one key=value per line)
  • lib=filename.so loads a dynamic library (a plug in)
  • libdir=directory process all the .so files in the given directory with lib=
  • mpi=1 (MPI enabled applications only) enable and use MPI

Your application may introduce other options. For example, project based applications may also have:

  • project=file load the given projectfile upon start up

Configuration Files

In addition to the command line, Scopira based applications also search a few additional locations for paramters. These locations are based on your APPNAME. The APPNAME is the name of the binary that was run, sans extension and path. For example, you you run /usr/bin/evident.exe, your APPNAME is simply, evident.

The following locations are searched in the following order:

  • environment variable: SCOPIRA_CONFIG
  • environment variable: APPNAME_CONFIG (in this context, your APPNAME will be converted to upper case)
  • file: ~/.scopira/config
  • file: ~/.scopira/APPNAME.config
  • file: ~/.scopira/APPNAME.config.saved (this file is created and maintained by Scopira programs)
  • command line

Example

./scopira.exe debug=1
echo lib=/path/to/some/libplugin.so >> ~/.scopira/scopira.config
export SCOPIRA_CONFIG=mpi=1