Environment Variables


Back to Main Index

Many of the environment variables will only be usable if the applications use the high level initialization API, via :

  1. Using the CBasicAppObject class as the base application class.
  2. Without using the above class, but initializing using these functions :
    1. CAudioEnv::AutoDetect() and CAudioEnv::DoQuickInit()
    2. CMidiPlayer::AutoDetect() and CMidiPlayer::DoQuickInit()
    3. CVideoEnv::DoQuickInit()
It is recommended that VortexGE applications always use the high level initialization API instead of using the low level counterparts. See the topic "The High Level Way" at the tutorial page for some examples.

Configuring the Video System

  1. Set the environment variable VGE_VIDEO_CUSTOM_8BPP_PALETTE to use custom color palette for 8 bpp display mode. Valid values are (not case sensitive) : It is recommended to just use the system default palette (colormap) tough.

  2. Under X Window system, set the environment variable DISPLAY to select the display name to be used when VortexGE tries to connect to the X server. Note that unless the application is not working well, it is recommended not to change the default value of the environment variable in the system.

Configuring the Audio System

  1. Set the environment variable VGE_AUDIO_SYSTEM to select the preferred audio system. Valid values are (not case sensitive) : It is recommended to just use the system default palette (colormap) tough.

  2. Set the environment variable VGE_AUDIO_DEVICE to select the preferred audio device to be used. Valid values are depend on the audio system used, for examples (case sensitive) :

Configuring the MIDI System

  1. Set the environment variable VGE_MIDI_SYSTEM to select the preferred MIDI system. Valid values are (not case sensitive) :

  2. If using libTiMidity, set the environment variable VGE_TIMIDITY_CFG_FILE to tell VortexGE about the location of the "timidity.cfg" file (if the file is located in a non standard place). Remember that directory and file names are case sensitive.

Configuring the Message Catalog

  1. Set the environment variable VGE_MESSAGE_CATALOG_PATH to tell VortexGE where the location of the library's internal message catalog files (*.cat) are located. The internal message catalog is used for internationalizing some of the library's internal messages (currently only some dialog messages can be internationalized). If the environment variable is not set, the library will search its internal catalog files from :
    (hardcoded by the configuration script).

    It is not recommended to use the environment variable unless you have installed VortexGE to a different directory than was specified in the configuration process.

    User applications should use different directories and environment variables for their message catalog files (rather than adding new entries in the library's internal message catalog files). However, users can append the contents of their message catalog files to the CBasicAppObjects's message catalog class instance (see the API documentation for more details).

  2. These environment variables will tell VortexGE what catalog file to be loaded from a catalog directory :
    1. VGE_LOCALE
    2. LC_MESSAGES
    3. LC_ALL
    4. LANGUAGE
    5. LANG

    Note that those variables are used based on priority, for example :
    So it is clear that VGE_LOCALE has the highest priority and LANG has the lowest priority. Also the settings in those environment variables can be overridden by explicitly telling VortexGE what locale to be used when loading catalog :

Other Environment Variables



Example (using bash) :
# export VGE_VIDEO_CUSTOM_8BPP_PALETTE="yes"
# export VGE_AUDIO_SYSTEM="alsa"
# export VGE_AUDIO_DEVICE="plughw:1,2"
# export VGE_MIDI_SYSTEM="timidity"
# export VGE_TIMIDITY_CFG_FILE="/opt/timidity/timidity.cfg"
# export VGE_LOCALE="id_ID"


Back to Main Index