makall

Don't take it personally

Posts Tagged ‘Device

Running Elev8, a JavaScript bindings for EFL, on Tizen Developer Device

with 4 comments

Elev8 is the next gen JavaScript runtime for EFL. It is based on Google’s V8 engine (hence the name), and includes a module that allows creating Elementary apps in a declarative way, greatly reducing the amount of code necessary to build the UI for your application. – acidx

Here we’ll use Tizen’s SBS (Scratchbox Build System) to compile libv8 and elev8. To make the process of installing and uninstalling packages to the device easier, we’ll use alien to convert a tarball to a debian package.

Pre-requisites

  1. Scratchbox Build System installed and its targets created:
  2. Alien (http://joeyh.name/code/alien/):
    • # apt-get install alien

The Recipe

Git clone V8 as in https://developers.google.com/v8/build

Compile v8 on SBS arm target

cd v8
make dependencies
sbs -e make arm.release library=shared

Create libv8 deb file

mkdir -p tmp/usr/lib
cp out/arm.release/obj.target/tools/gyp/libv8.so tmp/usr/lib/
cp -r include tmp/usr
cd tmp/
tar -czf ../libv8.tar.gz .
cd -
fakeroot alien libv8.tar.gz

Install libv8 on SBS arm target

sbs -et dpkg -i libv8_1-2_all.deb

Send libv8 to and install it on Tizen device

sdb push libv8_1-2_all.deb root/
sdb shell dpkg -i root/libv8_1-2_all.deb
cd ..

Install efl-dev and elementary packages on SBS arm target

sbs -et apt-get -y install efl-dev libelm-dev

Get Elev8 from enlightenment svn repository:

svn checkout http://svn.enlightenment.org/svn/e/trunk/PROTO/elev8
cd elev8
sbs -e ./autogen.sh --prefix=/usr
sbs -e make
sbs -e make install DESTDIR=$(pwd)/tmp

Create elev8 deb file

cd tmp
tar -czf ../elev8.tar.gz .
cd -
fakeroot alien elev8.tar.gz

Send elev8 to and install it on Tizen device

sdb push elev8_1-2_all.deb root/
sdb shell dpkg -i root/elev8_1-2_all.deb
cd ..

Running

sdb shell elev8 /usr/share/elev8/data/javascript/anim.js

Elev8 anim.js example

Under the /usr/shar/elev8/data/javascript folder are a lot of examples that you can use as reference. As Elev8 was first made to run on the desktop, some examples may look weird on the device for now, but they give you some idea of how easy writing EFL JavaScripts applications for Tizen will be.

And of course you can run you own code, to do it just send the file to the device and call it from sdb.

sdb push infinigag.js /root/
sdb shell elev8 /root/infinigag.js

Elev8 infinigag.js example

To uninstall

sdb shell apt-get remove elev8 libv8

Written by mello

June 20, 2012 at 6:28 pm

Posted in Elev8, Tizen

Tagged with , , , ,

%d bloggers like this: