Euphoria - Environment


Advertisements


This chapter describes about the installation of Euphoria on various platforms. You can follow the steps to install Euphoria on Linux, FreeBSD, and 32-bit Windows. So you can choose the steps based on your working environment.

Linux, Free BSD Installation

Official website provides .tar.gz file to install Euphoria on your Linux or BSD OS. You can download your latest version of Euphoria from its official website − Download Euphoria.

Once you have .tar.gz file, here are three simple steps to be performed to install Euphoria on your Linux or Free BSD machine −

Step 1 − Installing Files

Untar the downloaded file euphoria-4.0b2.tar.gz in a directory where you want to install Euphoria. If you want to install it in /home directory as follows, then −

$cp euphoria-4.0b2.tar.gz /home
$cd /home
$gunzip euphoria-4.0b2.tar.gz
$tar -xvf euphoria-4.0b2.tar

This creates a directory hierarchy inside /home/euphoria-4.0b2 directory as follows −

$ls -l
-rw-r--r-- 1 1001 1001 2485 Aug 17 06:15 Jamfile
-rw-r--r-- 1 1001 1001 5172 Aug 20 12:37 Jamrules
-rw-r--r-- 1 1001 1001 1185 Aug 13 06:21 License.txt
drwxr-xr-x 2 1001 1001 4096 Aug 31 10:07 bin
drwxr-xr-x 7 1001 1001 4096 Aug 31 10:07 demo
-rw-r--r-- 1 1001 1001 366 Mar 18 09:02 file_id.diz
drwxr-xr-x 4 1001 1001 4096 Aug 31 10:07 include
-rw-r--r-- 1 1001 1001 1161 Mar 18 09:02 installu.doc
drwxr-xr-x 4 1001 1001 4096 Aug 31 10:07 source
drwxr-xr-x 19 1001 1001 4096 Sep 7 12:09 tests
drwxr-xr-x 2 1001 1001 4096 Aug 31 10:07 tutorial

NOTE − File name euphoria-4.0b2.tar.gz depends on latest version available. We are using 4.0b2 version of the language for this tutorial.

Step 2 − Setting Up the Path

After installing Euphoria, you need to set proper paths so that your shell can find required Euphoria binaries and utilities. Before proceeding, there are following three important environment variables you need to set up −

  • Set PATH environment variable to point /home/euphoria-4.0b2/bin directory.

  • Set EUDIR environment variable to point to /home/euphoria-4.0b2.

  • Set EUINC environment variable to point to /home/euphoria-4.0b2/include.

These variables can be set as follows −

$export PATH=$PATH:/home/euphoria-4.0b2/bin
$export EUDIR=/home/euphoria-4.0b2
$export EUINC=/home/euphoria-4.0b2/include

NOTE − The above commands used to set environment variables may differ depending on your Shell. We used bash shell for executing these commands to set the variables.

Step 3 − Confirmation Installation

Confirm if you installed Euphoria successfully or not.

Execute the following command −

$eui -version

If you get following result, then it means you have installed Euphoria successfully; otherwise you have to go back and check all the steps again.

$eui -version
Euphoria Interpreter 4.0.0 beta 2 (r2670) for Linux
Using System Memory
$

That is it, Euphoria Programming Environment is ready on your UNIX machine, and you can start writing complex programs in easy steps.

WIN32, and DOS Installation

Official website provides .exe file to install Euphoria on your WIN32 or DOS OS. You can download your latest version of Euphoria from its official website − Download Euphoria.

Once you have .exe file, here are three simple steps to follow for installing Euphoria Programming language on your WIN32 or DOS machine −

Step 1 − Installing Files

Double click on the downloaded .exe setup program to install all the files. We downloaded euphoria-40b2.exe file for installation.

The filename euphoria-40b2.exe depends on latest version available. We use version 4 beta 2 of the language.

By default Euphoria would be installed in C:\euphoria-40b2 directory but you can also select a desired location.

Step 2 − Rebooting the Machine

Re-boot your machine to complete the installation.

Step 3 − Confirmation Installation

Confirm if you installed Euphoria successfully or not.

Execute the following command −

c:\>eui -version

If you get following result, then it means you have installed Euphoria successfully; otherwise you have to go back and check all the steps again.

c:\>eui -version
Euphoria Interpreter 4.0.0 beta 2 (r2670) for Windows
Using Managed Memory

c:\>

That is it, Euphoria Programming Environment is ready on your WIN32 machine, and you can start writing complex programs in easy steps.

Euphoria Interpreters

Depending on the platform you are using, Euphoria has multiple interpreters −

  • The main interpreter is eui.

  • On windows platforms, you have two choices. If you run eui then a console window is created. If you run euiw then no console is created, making it suitable for GUI applications.

  • Euphoria does not care about your choice of file extensions. By convention however; the console-based applications come with .ex extension.

  • GUI-based applications have .exw extension and the include files have .e extension.



Advertisements