View Single Post
Old 02-16-2009, 02:57 PM   #1
ross
Junior Member
ross began at the beginning.
 
Posts: 8
Karma: 26
Join Date: Oct 2008
Device: none
Vala on the DR1000

I've been experimenting with Vala on the DR1000 and thought it might be of interest to other developers looking for a language other than C on the DR1000.

Vala is a C#-esque language designed around the GObject system which underlies GTK+ and many other gnome libraries, so is quite suitable for use on the DR1000. It also compiles down to C, so there's minimal performance impact and adding bindings to other C libraries is mostly trivial.

The stuff I've written is very bare-bones at the moment, but sufficient to write simple GTK apps and use the DR1000 popup menu. The little demo app I wrote displays a list of ipkgs installed on the device (the output of opkg list_installed). If there's enough interest I may add wrappers for the other iRex libraries (the scribble and metadata ones seem most interesting).

The process to get it up and running is still a little complicated mostly because vala is relatively new, but the steps are as follows:

Prereqs: Working iRex SDK, GTK dev libs (on the host) & Glade 3 (for UI)
  • Download and extract the latest version of Vala (currently 0.5.6):
  • Download and extract the dr1000-vala attached.
  • In the vala source directory, apply small patch:
    ~/vala-0.5.6$ cat ../dr1000-vala/vala-vapi-posix.patch | patch -p 1
  • Build vala:
    ./configure && make && make install
  • Set up SDK environment:
    ~$ source /usr/local/poky/eabi-glibc/arm/environment-setup
  • Build vala test app:
    ~/dr1000-vala$ make
  • Copy to DR1000/QEMU and run (add a .desktop file if you want to launch from the content browser):
    ~/dr1000-vala$ scp test qemu:/media/mmcblk0p1

Cheers,
Ross
Attached Files
File Type: gz dr1000-vala.tar.gz (5.6 KB, 361 views)
ross is offline   Reply With Quote