Difference between revisions of "Appendix"

From HemeraBook
Jump to: navigation, search
(Created page with '=Variables= ==HEMERA_ROOT_PATH== The root directory where Hemera projects are installed.<br /> <br/> '''''N.B.''''': in v0.1, it has refer…')
 
(Notion)
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
=Notion=
 +
==Configuration file==
 +
There is:
 +
* a global configuration file '''/etc/hemera.conf''' (setup and updated by System administrator) containing usually the most of global and third-party tools configuration elements
 +
* a user configuration file '''$HOME/.hemera/hemera.conf''' allowing each Hemera user to adapt configuration to his needs (whatever the reason, if there is no global configuration file, any user can define a complete configuration file)
 +
 +
These pages use the notion of '''configuration elements''' which refers to elements which can be defined in either one of these configuration files.<br />
 +
<br />
 +
You can see [[Hemera:Install#Configure |Configuring Hemera]].
 +
<br />
 +
==Binary and Library paths configuration==
 +
If you are not familiar with '''PATH''' and '''LD_LIBRARY_PATH''' environment variables, see [http://en.wikipedia.org/wiki/Environment_variable#Examples_of_Unix_environment_variables *nix environment variables].<br /><br />
 +
For better ease of use, Hemera configuration file provides two [[Appendix#Configuration_file |configuration elements]] to define some directory paths to add automatically to '''PATH''' or '''LD_LIBRARY_PATH''' environment variables
 +
'''hemera.path.bin'''
 +
'''hemera.path.lib'''
 +
<br />
 +
The syntax is a colon-separated list of directories.<br />
 +
You can use the '*' wildcard if path can vary according to situation (like it is the case with [[Third-party:SpeechRecognition#From_source|SphinxTrain]] ''bin-XX'' sub-directory). Hemera scripts will dynamically complete paths when starting.<br />
 +
<br />
 +
In [[Appendix#Configuration_file |configuration file]], there is various configuration elements named '''hemera.*.path''' allowing to define third-party tools to use.<br />
 +
For each, you can choose one of these ways to define it:
 +
* specify the full path of the tool
 +
* specify a path relative to [[Appendix#HEMERA_TP_PATH |HEMERA_TP_PATH]]
 +
* specify simply the name of the tool if:
 +
** it is available in the PATH environment variable (outside of Hemera)
 +
** you have added its parent directory in '''hemera.path.bin'''
 +
<br />
 +
'''IMPORTANT''': ensure to add library directory to '''hemera.path.lib''' for each third-party tools for which you have compiled source code (but if you have then installed them on your system). It is the case, for instance, if you have compiled [[Third-party:SpeechRecognition#From_source|sphinx3 source code]].
 +
 +
<br />
 +
==Hemera scripts availability==
 +
In this documentation, command lines are usually given assuming Hemera scripts are available, which means parent directories are specified in '''[http://en.wikipedia.org/wiki/PATH_(variable) $PATH]''', which is the case if you have [[Hemera:Install#Setup |setup Hemera]].<br /><br />
 +
After a '''global setup''', Hemera scripts will be automatically available since next reboot. If you don't want to reboot, you can use:
 +
source /etc/profile.d/hemera.sh
 +
<br />
 +
After a '''user setup''', you only have to open a new shell, or you can use:
 +
source ~/.bashrc
 +
 +
<br />
 +
 
=Variables=
 
=Variables=
 
==HEMERA_ROOT_PATH==
 
==HEMERA_ROOT_PATH==
The root directory where [[Install_Hemera#Prepare_a_Workspace |Hemera projects]] are installed.<br />
+
The root directory where Hemera main project (and optional tools) is installed.<br />
<br/>
+
By default, it corresponds to '''/usr/share/hemera'''.
'''''N.B.''''': in v0.1, it has referenced temporarily the Hemera main project root directory.
+
 
 +
==HEMERA_TP_PATH==
 +
The root directory of third-party project in which tools are installed (or symbolic links are created).<br />
 +
It is defined with [[Appendix#Configuration_file |configuration element]] '''hemera.thirdParty.path'''.<br />
 +
By default, it corresponds to '''/usr/share/hemera/ThirdParty'''.
 +
 
 +
[[Category:HemeraBook/en]]
 +
[[Category:admin/en]]
 +
[[Category:user/en]]

Latest revision as of 18:37, 8 December 2011

Notion

Configuration file

There is:

  • a global configuration file /etc/hemera.conf (setup and updated by System administrator) containing usually the most of global and third-party tools configuration elements
  • a user configuration file $HOME/.hemera/hemera.conf allowing each Hemera user to adapt configuration to his needs (whatever the reason, if there is no global configuration file, any user can define a complete configuration file)

These pages use the notion of configuration elements which refers to elements which can be defined in either one of these configuration files.

You can see Configuring Hemera.

Binary and Library paths configuration

If you are not familiar with PATH and LD_LIBRARY_PATH environment variables, see *nix environment variables.

For better ease of use, Hemera configuration file provides two configuration elements to define some directory paths to add automatically to PATH or LD_LIBRARY_PATH environment variables

hemera.path.bin
hemera.path.lib


The syntax is a colon-separated list of directories.
You can use the '*' wildcard if path can vary according to situation (like it is the case with SphinxTrain bin-XX sub-directory). Hemera scripts will dynamically complete paths when starting.

In configuration file, there is various configuration elements named hemera.*.path allowing to define third-party tools to use.
For each, you can choose one of these ways to define it:

  • specify the full path of the tool
  • specify a path relative to HEMERA_TP_PATH
  • specify simply the name of the tool if:
    • it is available in the PATH environment variable (outside of Hemera)
    • you have added its parent directory in hemera.path.bin


IMPORTANT: ensure to add library directory to hemera.path.lib for each third-party tools for which you have compiled source code (but if you have then installed them on your system). It is the case, for instance, if you have compiled sphinx3 source code.


Hemera scripts availability

In this documentation, command lines are usually given assuming Hemera scripts are available, which means parent directories are specified in $PATH, which is the case if you have setup Hemera.

After a global setup, Hemera scripts will be automatically available since next reboot. If you don't want to reboot, you can use:

source /etc/profile.d/hemera.sh


After a user setup, you only have to open a new shell, or you can use:

source ~/.bashrc


Variables

HEMERA_ROOT_PATH

The root directory where Hemera main project (and optional tools) is installed.
By default, it corresponds to /usr/share/hemera.

HEMERA_TP_PATH

The root directory of third-party project in which tools are installed (or symbolic links are created).
It is defined with configuration element hemera.thirdParty.path.
By default, it corresponds to /usr/share/hemera/ThirdParty.