Don't take it personally

Posts Tagged ‘Ubuntu

Running Elev8 – a JavaScript bindings for EFL

with 8 comments

JavaScript is an ubiquitous language with a large number of developers. Thinking of bringing EFL to the JavaScript ecosystem, a JavaScript bindings framework named Elev8 has been made. It’s still under development but there are a lot of widgets and modules that are ready for use.

The key feature of Elev8 is the declarative way to build a graphical interface. The declarations of widgets are like a recipe. Those declarations are passed to methods that realize the declared widgets and return a reference to them.

Under the hood, Elev8 uses the Google V8 JavaScript Engine to run its scripts. A module named ‘elm’ does all the GUI stuff and modules like ‘timer’ and ‘http’ bring in the functionalities of traditional JavaScript modules.

Elev8 is new on Enlightenment and it is on PROTO repository, this means that it isn’t installed by default. So it should be installed by hand the old fashioned way, autogen, make and make install. As it’s hard to create a tutorial to cover all Linux distros in the universe and its package systems, I’ll show here how to install the needed libraries on Ubuntu and ArchLinux.

Installing EFL and V8 on ArchLinux

sudo pacman -S elementary-svn v8

Installing EFL and V8 on Ubuntu

The EFL is outdated on Ubuntu, so here we need to do all the work without apt-get.

mkdir efl
cd efl

To avoid downloading all of Enlightenment, we’ll use a given script to download just the needed modules.

svn export -r71465

There are a few changes to do on this script so everything works well. We’ll use sed to do it.

# use the actual directory to download sources
sed -i "s%^SRCDIR=.*$%SRCDIR=\"${PWD}\"%"

# remove the enlightenment from compilation
sed -i 's/\(PKGS=".*\) e\("\)/\1\2/'

This script identifies which distro it is running and downloads all dependencies of EFL. Then it downloads, compiles and installs all EFL modules. The EFL modules will be installed on /opt/e17-71465 and a script named will be created. This created script points the environment variables to the EFL installed.

The script, should be ran as root. So, please, review the script to make sure your system will be safe.

sudo ./ -r71465
source /opt/
cd -

After that we’ll just install V8 on a debian way.

sudo apt-get install libv8-dev



svn checkout

Compile and install it

cd elev8
sudo make install
cd -


By default, Elev8 is installed on /usr/local, so its scripts are in /usr/local/share/elev8/data/javascript. You can run some of those to test it.

elev8 /usr/local/share/elev8/data/javascript/anim.js

That’s all

Below are some screenshots and on the next post I’ll show a simple application using the ‘elm’ and ‘http’ modules.

Written by mello

May 29, 2012 at 6:41 pm

Posted in Elev8

Tagged with , , ,

%d bloggers like this: