Difference between revisions of "Environment Variables"

m
 
(Windows Variables)
Line 24: Line 24:
 
* ''msc'': Any supported [[Installing Microsoft C compiler|Microsoft Visual C/C++]] compiler.
 
* ''msc'': Any supported [[Installing Microsoft C compiler|Microsoft Visual C/C++]] compiler.
 
* ''mingw'': The open source [http://www.mingw.org MinGW] C/C++ compiler, which at the time of writing is only available as a stable release for x86.
 
* ''mingw'': The open source [http://www.mingw.org MinGW] C/C++ compiler, which at the time of writing is only available as a stable release for x86.
 +
* ''bcb'': The Free Borland 5.5 C++ compiler which is now obsolete
 +
 +
'''ISE_CFLAGS''': C compilation flags that are passed to the C compiler.
 +
'''ISE_SHAREDLIBS''': Some additional C/C++ libraries that are passed to the C/C++ linker. It can also be used to passed linker flags.
  
 
== Optional Variables ==
 
== Optional Variables ==

Revision as of 07:08, 18 July 2008

Construction.png Not Ready for Review: This Page is Under Development!

EiffelStudio utilizes a number of environment and other localized variables. This page is dedicated to those variables, how they are defined and what they mean.

Core Variables

The core variables are the Eiffel compiler variables that absolutely must be defined for the Eiffel compiler/EiffelStudio to function. Without them the Eiffel environment has not idea where it is or what platform binaries to load.

ISE_EIFFEL: The holy grail of everything Eiffel, the only difference being is that this variable can be found! The value should point to the root of the EiffelStudio/Eiffel compiler installation.

ISE_PLATFORM: Represents the named platform on which the Eiffel environment is running. Below are a list of compatible platform names:

  • windows
  • win64
  • linux-x86
  • linux-x86-64
  • ...

Windows Variables

Under Microsoft's Windows and extra variable is required, dictating the external C compiler used by the Eiffel environment. Like the core variables, this variable must be defined in order for an Eiffel environment to run.

ISE_C_COMPILER: The noted and installed C compiler used by the Eiffel compiler to perform C/C++ compilation and to locate the compatible external libraries. Below are a list of compatible C compiler names:

  • msc: Any supported Microsoft Visual C/C++ compiler.
  • mingw: The open source MinGW C/C++ compiler, which at the time of writing is only available as a stable release for x86.
  • bcb: The Free Borland 5.5 C++ compiler which is now obsolete

ISE_CFLAGS: C compilation flags that are passed to the C compiler. ISE_SHAREDLIBS: Some additional C/C++ libraries that are passed to the C/C++ linker. It can also be used to passed linker flags.

Optional Variables

ISE_LIBRARY ISE_PRECOMP ISE_APP_DATA ISE_USER_FILES

Unoffical Variables

EIFFEL_SRC ISE_SRC


Windows Localization

If you are running EiffelStudio on a Microsoft Windows-based platform environment variable may be localized to a specific version of the Eiffel compiler. This is extremely useful when using the Eiffel compiler with multiple sources repositories, when working on multiple branches or research versions. It is also used to allow the x86 and x64 versions of EiffelStudio to be installed side-by-side and even under the same location without bit-compatibility issues with the Eiffel compiler binaries or external C libraries.

Information.png Note: Environment variables defined for the user or system will override any localized variables

EiffelStudio and the Eiffel compiler make use of localized variables to define specific information to each version of EiffelStudio installed. For those of you who created environment variables used by EiffelStudio, such as ISE_EIFFEL or ISE_PLATFORM will have seen an installer warning indicating the danger in defining those variables at that level.

So, to localization and how it works.

The Windows Registry

People hate it, people love it, the Windows registry. It's nice to have uniformed access to a collection of hives containing varing degrees of access. It's also where localized Eiffel variables can be manipulated, added or removed.

There are four places where local variables can be defined, each with their own degree of prioritization:

For user variables, available only to the currently logged on user, are found under the key:

HKCU\Software\ISE\EiffelXX\app_name

This is the very first place any Eiffel system will look for a local variable. For instance, EiffelStudio and the Eiffel compiler are bundled in the executable ec.exe. For release 6.3, ec.exe will first look for variables under:

HKCU\Software\ISE\Eiffel63\ec

Failing to find any variable under this key, the system will default to looking at the compiled version key (the version of the Eiffel compiler the system was compiled with.) Using the same example, the following key will be examined:

HKCU\Software\ISE\Eiffel63

Again failing to locate a matching variable name, the system will proceed to check the local machine hive, using the same rules as used by the current user hive.

HKLM\Software\ISE\EiffelXX\app_name

Using the same example. the application specific key at will be searched next:

HKLM\Software\ISE\Eiffel63\ec

And failing to find any matching variable the compiled version key will be the last place looked under:

HKLM\Software\ISE\Eiffel63

To sum up, here is the list of searched locations. ordered by priority for retrieving, a variable; environment, local or otherwise:

  1. . User environment variable table
  2. . Machine environment variable table
  3. . Current user registry hive under the Eiffel application specific key
  4. . Current user registry hive under the Eiffel compiled version key
  5. . Local machine registry hive under the Eiffel application specific key
  6. . Local machine registry hive under the Eiffel compiled version key