Configuration Files

Configuration File Format

A switch_list is a list of all command line switches collected before a Euphoria product (interpreter, compiler, ...) executes. A switch_list is formed from switches introduced in the command line and switches read from configuration files.

See: Command Line Switches.

A configuration file is a text file providing command line switches to the switch_list. Each line contains one item: a comment, a section header, a command line switch, or an include path.

The default file name for a configuration file is eu.cfg . When a user supplied file is read using the -c switch, any file name may be used. The format for these files is the same.

A comment line that begins with a double dash, --, and continues to the end of the line; comment lines are ignored.

A section header is a name delimited by brackets: [name] . The following section headers are permitted: [interpret], [interpret:windows], [interpret:unix], [bind], [bind:windows], [bind:unix], [translate], [translate:windows], [translate:unix], [windows], [unix], or [all] . The first lines of a file, before any section header, are assumed to belong to the [all] section.

A Euphoria mode is the combination of product and operating system. If the mode matches a section header, then command line switches in that section will added to the switch_list. If the mode does not match a section header, then the command line switches in that section are ignored. There can be any number of section headers.

A command line switch is a line beginning with a single dash, -, and includes everything on that line. Valid switches are added to the switch_list.

A path is a line that is not a comment, header, or switch. Each path is appended to the characters -i and then the entire line is added to the switch_list.

On Unix, Euphoria reads every configuration file from these paths, in the following order:

  1. /etc/euphoria/eu.cfg
  2. ${EUDIR}/eu.cfg
  1. ${HOME}/eu.cfg
  2. From where the product is run: <exepath>/eu.cfg
  3. The current working directory: ./eu.cfg
  4. A file specified by the command line switch: -c

On Windows, Euphoria reads every configuration file from these paths, in the following order:

  1. %APPDATA%\euphoria\eu.cfg
  2. %EUDIR%\eu.cfg
  3. %HOMEDRIVE%\%HOMEPATH%\eu.cfg
  4. From where ever the product is run: <exepath>/eu.cfg
  5. The current working directory: ./eu.cfg
  6. A file specified by the command line switch: -c

Each configuration file is read only once; repeated references to the same file are ignored.

Sample Configuration Files

Default eu.cfg

A typical Euphoria installation will have at least one configuration file installed by default. On Unix, the /etc/euphoria directory contains a eu.cfg file. This file has one line:


Euphoria reads this as path switch, so that switch -i /usr/share/euphoria/include is added to the switch_list.

On Windows, the default eu.cfg file is found in c:\Euphoria\bin and contains:

-i c:\Euphoria\include 

Every switch_list contains at least one switch with the path to the Euphoria include directory and standard library.

Wine eu.cfg

Copied from a forum discussion on installing Windows Euphoria so it runs on Linux using Wine:

For something like Wine, the easiest thing to do is to put the eu.cfg in the same directory as your binaries (eui.exe, euiw.exe, euc.exe ).

The most important thing is generally to point to the standard library with an -i switch. Also, you'll probably want to add the path to the translator library. So, a simple example eu.cfg for Wine might look like:

-i z:\home\euphoria\include  
-lib z:\home\euphoria\bin\eu.a  

Sample eu.cfg

Copied from a form discussion showing one user's configuration file:

-d E32   
-eudir /Users/Downloads/euphoria-79c875319629   
-i /Users/Downloads/euphoria-79c875319629/include   
-com /Users/Downloads/euphoria-79c875319629   
-lib-pic /Users/Downloads/euphoria-79c875319629/source/build/euso.a   
-lib /Users/Downloads/euphoria-79c875319629/source/build/eu.a   
-eub /Users/Downloads/euphoria-79c875319629/source/build/eub   


Quick Links

User menu

Not signed in.

Misc Menu