makall

Don't take it personally

Posts Tagged ‘Tizen

Running Elev8 on Tizen Emulator

with 4 comments

On my last post I ran Elev8 on the Tizen Developer Device. This device is ARM based, so the entire build was done for ARM. Now we’ll build Elev8 and the V8 lib to run on the Tizen Emulator, that is i386 based. Only a few tricks are needed to do this task and I’ll show them here.

The Tizen Emulator is installed with Tizen SDK, follow the Tizen Emulator Documentation to learn how to create and start a virtual machine. On this same documentation you’ll learn how to open a shell on that.

By default, the EFL and Elementary are not installed on the created virtual machine, and the /etc/apt/source.list points to a machine that isn’t accessible to outsiders. So apt-get commands don’t work. To make the installation of those packages easier I added the same repository used by SBS on /etc/apt/source.list and I installed those with apt-get.

sdb shell
echo "deb http://download.tizen.org/releases/1.0/apt.sbs/i386 \
slp2-target main contrib non-free" > /etc/apt/source.list
apt-get update
apt-get install efl-dev libelm-dev
exit

Now, we’ll take similar steps to those we took on the last post. But replacing arm with ia32 on the libv8 make command and adding -A i386 on SBS command lines to set it to i386 environment.

# Get and compile v8 on SBS i386 target
git clone git://github.com/v8/v8.git
cd v8
make dependencies
sbs -A i386 -e make ia32.release library=shared

# Create libv8 deb file
mkdir -p tmp/usr/lib
cp out/ia32.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 i386 target
sbs -A i386 -et dpkg -i libv8_1-2_all.deb

# Send libv8 to and install on Tizen Emulator
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 -A i386 -et apt-get -y install efl-dev libelm-dev

# Get Elev8 from enlightenment svn repository and compile it
svn checkout http://svn.enlightenment.org/svn/e/trunk/PROTO/elev8
cd elev8
sbs -A i386 -e ./autogen.sh --prefix=/usr
sbs -A i386 -e make
sbs -A i386 -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 on Tizen Emulator
sdb push elev8_1-2_all.deb root/
sdb shell dpkg -i root/elev8_1-2_all.deb
cd ..

# Running a example
sdb shell elev8 /usr/share/elev8/data/javascript/anim.js

That’s all folks!

Written by mello

July 3, 2012 at 12:56 pm

Posted in Elev8, Tizen

Tagged with , , ,

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 , , , ,

Tizen SDK 1.0 on 64-bits Fed.. I mean ArchLinux

with one comment

Recently, motivated by the Ancient Spirits of Evil, I started a quest to install the Tizen SDK on an ArchLinux x64 machine, a.k.a. my work machine.

Tizen Web Simulator

…”Why are you talking so much about x64?”
Well, the Tizen group, before this post being published, has just released packages for Windows (urgh!) and Ubuntu, both on 32-bits.

So to do this I had some choices:

  1. Install Ubuntu 32-bits on my machine;
  2. Install a virtual machine with Ubuntu 32-bits
  3. Install a chrooted 32-bits enviroment
  4. Look for another job; or
  5. Search on the web for someone who had made it and go through that.

With the fifth option in mind, I found an excelent post by Tomi Ollila, who solved this same problem, but on Fedora. I was almost there :(

The great thing is, ArchLinux is great. Not just by itself, but with its community.

Following the instructions from Tomi post, I realized that just a few packages are missing on an usual ArchLinux instalation. So, to keep the Tomi instructions reliable on ArchLinux, I just had to install debootstrap from AUR, it replaces the step 3 of Tomi’s post.

wget http://aur.archlinux.org/packages/de/debootstrap/debootstrap.tar.gz
tar -xvf debootstrap.tar.gz
cd debootstrap
makepkg
sudo pacman -U debootstrap-*-any.pkg.tar.xz
cd -

Between steps 14 and 15, I use the command below to prevent PERL messages about locale:

locale-get en_US.UTF-8

Continue with Tomi instructions and be happy.

Starting Tizen IDE

Tizen IDE

Well, that’s it. It’s possible to have the Tizen SDK running on your ArchLinux x64 machine. And now, to start your Tizen development, you can use Iscaro’s blog as a starter guide.

Tizen Emulator

Good night and good luck.

Written by mello

June 11, 2012 at 4:51 pm

Posted in Arch Linux, Tizen

Tagged with , ,

%d bloggers like this: