Wiki Diff RaspberryPi, revision #1 to tip

===Installing Euphoria on the Raspberry Pi
The current [[Euphoria 4.1.0 Beta2 ->]] can run on the Raspberry Pi.

See step-by-step **Installation** instructions below.

===Wrappers for GPIO interfacing



===Building Euphoria for the Raspberry Pi



===Example programs


Installing Euphoria and EuGTK on Raspberry Pi 3 with Raspbian:\\
Note that both the archive program and the file manager which come \\
with Raspbian are horribly counter-intuitive. The file manager doesn't \\
automatically update when folders/files are added, you have to hit F5 \\
to manually update. The archiver will take some experimenting to get it to work right, also. \\
I don't know why they decided to saddle kids (the main users of Raspberry Pi) with this awkward software.\\
**Follow** the links on the [[Euphoria 4.1.0 Beta2 ->]] page to download Euphoria 4.1 beta 2 arm binary for manual installation

**Download** the editor: [[ ->]].\\
Use archiver to extract to /home/pi. You should have a /home/pi/WEE-master folder.

**Download** the latest [[EuGTK ->]],and extract the demos folder to /home/pi. You should have a /home/pi/demos folder.

Go to your home folder, and open a terminal to copy some files:\\
cd euphoria-4.1.0-ARMv6-hardfloat/bin \\
sudo cp * /usr/local/bin \\
cd .. \\
sudo mkdir /usr/share/euphoria \\
cd euphoria-4.1.0-ARMv6-hardfloat/include \\
cp -r * /usr/share/euphoria \\

**Confirm that eui is installed**\\
Type //eui// at the command line:
pi@raspberrypi:~ $ eui \\
Euphoria Interpreter v4.1.0 development \\
32-bit Linux, Using System Memory\\
Revision Date: 2015-02-02 14:18:53, Id: 5861:57179171dbed \\
ERROR: Must specify the file to be interpreted on the command line

(So far, so good!)

**Replace /usr/local/bin/eu.cfg** with the following: (will probably have to use sudo nano to do this)
%([all] \\
-eudir /usr/share/euphoria \\
-i /usr/share/euphoria \\
[translate] \\
-arch ARM \\
-gcc \\
-con \\
-com /usr/share/euphoria \\
-lib-pic /usr/local/bin/euso.a\\
-lib /usr/local/bin/eu.a \\
[bind] \\
-eub /usr/local/bin/eub \\
**Check that it works**
In a terminal, type:

%(cd /home/pi/demos \\
eui test0 \\

Should take a few seconds, and then show a nice window with info about GTK, EuGTK, current platform, etc.

**Associate .ex files**
* Use file manager to navigate to ~/demos
* Right-click on test0.ex or one of the other test*.ex files
* Select Properties from the popup window
* Select Open With -> Customize
* Click on Custom Command Line
* Enter eui as Command line to execute:
* Enter Euphoria as the Application name
* Click OK

Double click on an .ex program to see if it works.

When using the {{{GtkWebKit}}} or {{{GtkSourceView}}} plugins on Pi with Raspbian, you'll need to edit the tops of those files to indicate the location of the libraries:

*For {{{GtkSourceView}}}.plugin:\\
object sourceviews = dir("/usr/lib/arm-linux-gnueabihf/libgtksourceview-3*")

*For {{{GtkWebKit}}}.plugin:\\
object webkits = dir("/usr/lib/arm-linux-gnueabihf/libwebkit2gtk-3*"

If any program which uses either or both of these "plugin" libraries doesn't work, try starting the program with eui -d WK -d SV <prog>.

(You can use version -4 of these two libraries if you have them available.)


If you are going to write your own GUI programs with EuGTK, you **will** need the [[GTK3 Docs ->]].

I have found it works best to extract the folder to my home folder (/home/pi) and rename the folder to just plain gtk3. That makes the docs easier to find.

You may also want to edit /demos/bear/bear.ex line 10 to point to your Euphoria docs.\\
//eu_help_path = "/usr/share/euphoria/docs/html"// should work, if Euphoria was installed using the directions above.\\

Doing these two things should enable pop-up help for the BEAR editor for both Euphoria and GTK keywords.
The Raspberry Pi 3 is a bit slow, so binding your Euphoria programs is helpful. Especially WEE and other programs you will use frequently.

Translating and compiling large EuGTK programs on the Pi is also rather slow, so you may prefer to cross-compile on a full-size PC, and then copy the executable to the Pi.

* Check this forum message: [[Cross Compile -> ]]
* Or this wiki page: [[Cross Compile ->]]



Quick Links

User menu

Not signed in.

Misc Menu