Difference between revisions of "Environment Variables"
m |
m (→Auxiliary Variables) |
||
Line 47: | Line 47: | ||
'''ISE_USER_FILES''': Points to the location of Eiffel environment user files like the default projects location, user [[Code Templates|code templates]] and Eiffel environment [[Installation Replacement Files|installation replacement files]]. | '''ISE_USER_FILES''': Points to the location of Eiffel environment user files like the default projects location, user [[Code Templates|code templates]] and Eiffel environment [[Installation Replacement Files|installation replacement files]]. | ||
− | === | + | === Auxiliary Variables === |
The following environment variables are defined when working with Eiffel environment sources. There is no internal knowledge of the following environment variables, they are used for configuration and compilation only. | The following environment variables are defined when working with Eiffel environment sources. There is no internal knowledge of the following environment variables, they are used for configuration and compilation only. | ||
Revision as of 11:26, 23 July 2008
EiffelStudio/Eiffel compiler utilizes a number of environment and other localized variables. This page is dedicated to those variables, how they are defined and what they mean.
Note: There is a special notion called "Unix Layout" in regards to special builds of EiffelStudio. When using a Unix layout no environment variables are utilized because of the fragmented distribution of installed files. For such layouts this page provides no contribution to understanding EiffelStudio.
Unix layouts are utilized by package managers, see here for supported package managers.
Unless otherwise stated, all the following environment variables are known by the Eiffel environment at run time.
Contents
Core Variables
The core variables are the Eiffel compiler variables that absolutely must be defined for the EiffelStudio/Eiffel compiler to function. Without them the Eiffel environment has no 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 deprecated and should not be used.
Optional Variables
In addition to the core variables, there are a number of optional variables that can be defined to replace predefined locations set by the Eiffel environments.
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.
ISE_LIBRARY: Points to an alternative location for library source files. By default this is set by the Eiffel environment as the same location as ISE_EIFFEL. This is normally set explicitly when using the checked out sources, which pointing to the live library sources.
ISE_PRECOMP: The location of the Eiffel environment precompile configuration files.
ISE_APP_DATA: Location of the Eiffel environment configuration data, such as project settings data and session configuration data. This configuration data is managed by the EiffelStudio and should not be manipulated manually.
ISE_USER_FILES: Points to the location of Eiffel environment user files like the default projects location, user code templates and Eiffel environment installation replacement files.
Auxiliary Variables
The following environment variables are defined when working with Eiffel environment sources. There is no internal knowledge of the following environment variables, they are used for configuration and compilation only.
EIFFEL_SRC: When working with the live Eiffel sources, EIFFEL_SRC points to the checked out /trunk/Src location.
ISE_SRC: This environment variable is used to point to the ISE internal repository containing non-GPL code. The variable points to /trunk/Src of the internal repository.
Windows Localization
If you are running EiffelStudio/Eiffel compiler on a Microsoft Windows-based platform environment variable may be localized to a specific version of the Eiffel compiler used to build the Eiffel application. 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.
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 the Eiffel environment, such as ISE_EIFFEL or ISE_PLATFORM will have seen an installer warning indicating the danger in defining those variables at that level.
So, onto 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 varying 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, built with a 6.3 Eiffel compiler, 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:
- User environment variable table
- Machine environment variable table
- Current user registry hive under the Eiffel application specific key
- Current user registry hive under the Eiffel compiled version key
- Local machine registry hive under the Eiffel application specific key
- Local machine registry hive under the Eiffel compiled version key