Difference between revisions of "Environment Variables"

m
 
 
(23 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{UnderConstruction}}
+
[[:Category:EiffelStudio|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.
  
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.
+
{{Note|There is a special notion called "[[LinuxUnixLayout|Unix Layout]]" in regards to special builds of [[:Category:EiffelStudio|EiffelStudio]]. When using a [[LinuxUnixLayout|Unix layout]] '''no environment variables''' are used because of the fragmented distribution of installed files. For such layouts this page provides no contribution to understanding [[:Category:EiffelStudio|EiffelStudio]].
 +
 
 +
Unix layouts are used by package managers. See [[Linux Packages|here]] for supported package managers.}}
 +
 
 +
Unless otherwise stated, all the following environment variables are known by the Eiffel environment at run time.
  
 
== Core Variables ==
 
== Core Variables ==
 +
The core variables are the Eiffel compiler variables that absolutely must be defined for the [[:Category:EiffelStudio|EiffelStudio]]/Eiffel compiler to function. Without them the Eiffel environment has no idea where it is or what platform binaries to load.
  
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 [[:Category:EiffelStudio|EiffelStudio]]/Eiffel compiler installation.
 +
* '''ISE_PLATFORM''': Represents the named platform on which the Eiffel environment is running. Below is a list of compatible platform names:
 +
** freebsd-x86-64
 +
** freebsd-x86
 +
** irix-mips-64
 +
** irix-mips
 +
** linux-ppc
 +
** linux-sparc
 +
** linux-x86-64
 +
** linux-x86
 +
** macosx-x86
 +
** macosx-x86-64
 +
** openbsd-x86
 +
** solaris-sparc-64
 +
** solaris-sparc
 +
** solaris-x86-64
 +
** solaris-x86
 +
** win64
 +
** windows
  
'''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.
+
=== Windows Variables ===
 +
Under Microsoft's Windows an 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_PLATFORM''': Represents the named platform on which the Eiffel environment is running. Below are a list of compatible platform names:
+
* '''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 is a list of compatible C compiler names:
 +
** ''msc'': Any supported [[Installing Microsoft C compiler|Microsoft Visual C/C++]] compiler prior to Visual Studio C++ 2015.
 +
** ''msc_vc140'': Visual Studio C++ 2015 or later.
 +
** ''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 deprecated and should not be used.
  
* windows
+
== Optional Variables ==
* win64
+
* linux-x86
+
* linux-x86-64
+
* ...
+
  
=== Windows Variables ===
+
In addition to the core variables, there are a number of optional variables that can be defined to replace predefined values set by the Eiffel environments.
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:
+
* '''ISE_LIBRARY''': Points to an alternative location for library source files. By default this is automatically set by EiffelStudio to the same location as [[#Core Variables|ISE_EIFFEL]]. This is usually set explicitly when you are checking out the source code directly.
  
* ''msc'': Any supported [[Installing Microsoft C compiler|Microsoft Visual C/C++]] compiler.
+
* '''ISE_PRECOMP''': The location of the Eiffel environment precompiled libraries. By default, this is automatically set by EiffelStudio to a user specific location which vary depending on the platform.
* ''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.
+
  
== Optional Variables ==
+
* '''ISE_CFLAGS''': C compilation flags that are passed to the C compiler. We recommend not using it but instead set the C compilation flags as part of your Eiffel Configuration File.
 +
 
 +
* '''ISE_SHAREDLIBS''': Some additional C/C++ libraries that are passed to the C/C++ linker. It can also be used to pass linker flags. Like '''ISE_CFLAGS''', we recommend not using it but instead set the C compilation flags as part of your Eiffel Configuration File.
 +
 
 +
* '''ISE_APP_DATA''': Location of the Eiffel environment configuration data, such as project settings data and session configuration data. This configuration data is hidden, managed by [[:Category:EiffelStudio|EiffelStudio]] and should not be manipulated manually.
  
ISE_LIBRARY
+
* '''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 [[Replaceable_User_Files|Replaceable User Files]].
ISE_PRECOMP
+
ISE_APP_DATA
+
ISE_USER_FILES
+
  
=== Unoffical Variables ===
+
=== 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
+
* '''EIFFEL_SRC''': When working with the live Eiffel sources, EIFFEL_SRC points to the checked out /trunk/Src location.
ISE_SRC
+
  
 +
* '''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 ==
 
== 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.
+
If you are running [[:Category:EiffelStudio|EiffelStudio]]/Eiffel compiler on a Microsoft Windows-based platform, environment variables 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 source repositories, or 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}}
+
{{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 <code>ISE_EIFFEL</code> or <code>ISE_PLATFORM</code> will have seen an installer warning indicating the danger in defining those variables at that level.
+
[[:Category:EiffelStudio|EiffelStudio]] and the Eiffel compiler make use of localized variables to define information specific to each version of [[:Category:EiffelStudio|EiffelStudio]] installed. Those of you who have created environment variables used by the Eiffel environment, such as [[#Code Variables|ISE_EIFFEL]] or [[#Code Variables|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.
+
So, on to localization and how it works.
  
 
=== The Windows Registry ===
 
=== 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.
+
People hate it, people love it, the Windows registry. It's nice to have uniform 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:
+
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:
+
User variables, available only to the currently logged on user, are found under the key:
  
  HKCU\Software\ISE\Eiffel''XX''\''app_name''
+
  HKCU\Software\ISE\Eiffel_''YY.MM''\''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:
+
This is the very first place any Eiffel system will look for a local variable. For instance, [[:Category:EiffelStudio|EiffelStudio]] and the Eiffel compiler are bundled in the executable ''ec.exe''. For release YY.MM built with a YY.MM Eiffel compiler, ec.exe will first look for variables under:
  
  HKCU\Software\ISE\Eiffel63\ec
+
  HKCU\Software\ISE\Eiffel_YY.MM\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:
 
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
+
  HKCU\Software\ISE\Eiffel_YY.MM
  
 
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.
 
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\Eiffel''XX''\''app_name''
+
  HKLM\Software\ISE\Eiffel_''YY.MM''\''app_name''
  
 
Using the same example. the application specific key at will be searched next:
 
Using the same example. the application specific key at will be searched next:
  
  HKLM\Software\ISE\Eiffel63\ec
+
  HKLM\Software\ISE\Eiffel_YY.MM\ec
  
 
And failing to find any matching variable the compiled version key will be the last place looked under:
 
And failing to find any matching variable the compiled version key will be the last place looked under:
  
  HKLM\Software\ISE\Eiffel63
+
  HKLM\Software\ISE\Eiffel_YY.MM
  
 
To sum up, here is the list of searched locations. ordered by priority for retrieving, a variable; environment, local or otherwise:
 
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
+
# User environment variable table
#. Machine environment variable table
+
# Machine environment variable table
#. Current user registry hive under the Eiffel application specific key
+
# Current user registry hive under the Eiffel application specific key
#. Current user registry hive under the Eiffel compiled version 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 application specific key
#. Local machine registry hive under the Eiffel compiled version key
+
# Local machine registry hive under the Eiffel compiled version key

Latest revision as of 16:20, 8 July 2016

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.

Information.png 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 used because of the fragmented distribution of installed files. For such layouts this page provides no contribution to understanding EiffelStudio. Unix layouts are used 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.

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 is a list of compatible platform names:
    • freebsd-x86-64
    • freebsd-x86
    • irix-mips-64
    • irix-mips
    • linux-ppc
    • linux-sparc
    • linux-x86-64
    • linux-x86
    • macosx-x86
    • macosx-x86-64
    • openbsd-x86
    • solaris-sparc-64
    • solaris-sparc
    • solaris-x86-64
    • solaris-x86
    • win64
    • windows

Windows Variables

Under Microsoft's Windows an 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 is a list of compatible C compiler names:
    • msc: Any supported Microsoft Visual C/C++ compiler prior to Visual Studio C++ 2015.
    • msc_vc140: Visual Studio C++ 2015 or later.
    • 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 values set by the Eiffel environments.

  • ISE_LIBRARY: Points to an alternative location for library source files. By default this is automatically set by EiffelStudio to the same location as ISE_EIFFEL. This is usually set explicitly when you are checking out the source code directly.
  • ISE_PRECOMP: The location of the Eiffel environment precompiled libraries. By default, this is automatically set by EiffelStudio to a user specific location which vary depending on the platform.
  • ISE_CFLAGS: C compilation flags that are passed to the C compiler. We recommend not using it but instead set the C compilation flags as part of your Eiffel Configuration File.
  • ISE_SHAREDLIBS: Some additional C/C++ libraries that are passed to the C/C++ linker. It can also be used to pass linker flags. Like ISE_CFLAGS, we recommend not using it but instead set the C compilation flags as part of your Eiffel Configuration File.
  • ISE_APP_DATA: Location of the Eiffel environment configuration data, such as project settings data and session configuration data. This configuration data is hidden, managed by EiffelStudio and should not be manipulated manually.

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 variables 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 source repositories, or 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 information specific to each version of EiffelStudio installed. Those of you who have 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, on to localization and how it works.

The Windows Registry

People hate it, people love it, the Windows registry. It's nice to have uniform 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.

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

HKCU\Software\ISE\Eiffel_YY.MM\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 YY.MM built with a YY.MM Eiffel compiler, ec.exe will first look for variables under:

HKCU\Software\ISE\Eiffel_YY.MM\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\Eiffel_YY.MM

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\Eiffel_YY.MM\app_name

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

HKLM\Software\ISE\Eiffel_YY.MM\ec

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

HKLM\Software\ISE\Eiffel_YY.MM

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