|
|
Forward from crafterm.
GTK-DFB
Update (2006-02-07)! Both cairo-dfb and GTKDFB have made it into the main development trees of their respective projects. Thanks go to the DFB Developer Mike Emmel for this excellent effort!
The GTK Port of DFB has been updated to support GTK 2.8 and later. These are the install instructions, valid as of 7. Feb 2006. The older information has been left at the bottom of this page for reference purposes, or for people who want to get the older 2.0.9 GTK Port running.
For the current version, follow these instructions.
[edit]Basic Prerequisites
In order to get GTK-DFB working you will need the following:
Working System
Working Framebuffer
Working DirectFB
If you cannot run the dfbinfo command or other simple (non-GTK) DFB applications, do not even bother trying with GTK-DFB. Get DFB up and running well first.
[edit]GTK-DFB Requirements
Other than DirectFB, the GTK-DFB Port will need the following files/packages:
cairo - from Cairo CVS, dated 7 Feb 2006
GTK - from GTK CVS, dated 7 Feb 2006
glib-2.9.5 (ftp://ftp.gtk.org/pub/gtk/v2.9/glib-2.9.5.tar.bz2) - from www.gtk.org source downloads
atk-1.10.1 (ftp://ftp.gtk.org/pub/gtk/v2.8/atk-1.10.1.tar.bz2) - from www.gtk.org source downloads
pango-1.10.2 (ftp://ftp.gtk.org/pub/gtk/v2.8/pango-1.10.2.tar.bz2) - from www.gtk.org source downloads
N.B: Using versions newer than specified above may not work.
Download all these files to some convenient location. The ftp-URL for gtk source downloads is: ftp://ftp.gtk.org/pub/gtk/
[edit]Building the Requirements
Start yourself off by opening a new terminal and setting up the following variables:
export LD_LIBRARY_PATH=/usr/local/lib
export LD_RUN_PATH=/usr/local/lib
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
This is because the build instructions below will install to /usr/local, rather than the usual /.
First build glib and atk, as normally. Eg:
cd /usr/local/src
tar -xjvf /home/me/downloads/glib-2.9.5.tar.bz2
cd glib-2.9.5
./configure
make
make install
ldconfig
and the same for atk.
Next, get cairo from cvs and build it:
cd /usr/local/src
cvs -d :pserver:anoncvs@cvs.cairographics.org:/cvs/cairo login
cvs -d :pserver:anoncvs@cvs.cairographics.org:/cvs/cairo -z3 co -P -D "20060207" cairo
cd cairo
./autogen.sh
./configure --enable-directfb --disable-xlib --without-x
make
make install
ldconfig
Finally, you can do Pango:
cd /usr/local/src
tar -xjvf /home/me/downloads/pango-1.10.2.tar.bz2
cd pango-1.10.2
./configure --without-x
make
make install
ldconfig
Note that you need to adjust the paths in the examples above to reflect your download location. You may want to compile in another dir than /usr/local/src, or you might have downloaded the .tar.gz instead of the .tar.bz2 archives of the software. It is assumed that you can cope with these differences.
[edit]Building GTK-DFB
Now we can install GTK-DFB itself!
cd /usr/local/src
cvs -d :pserver:anonymous@anoncvs.gnome.org:/cvs/gnome login
cvs -d :pserver:anonymous@anoncvs.gnome.org:/cvs/gnome -z3 co -P -D "20060207" gtk+
cd gtk+
./autogen.sh
./configure --with-gdktarget=
make
make install
ldconfig
Hey presto! If everything went according to plan, you have compiled GTK-DFB, congratulations.
[edit]Testing
To see if it worked, make sure your framebuffer is set up and try running:
/usr/local/bin/gtk-demo
If all went well you should see a GTK window on a blue background. Don't be worried that the window has no Frame - after all you are not running a Window Manager, right? The following commands are provided by DFB to help you handle the windows:
Meta + Mouse Movement = Move the window
Meta + C = close the window
Meta + X + Mouse Movement = Change Window stacking order
Meta = Windows Key on most desktop Systems. Use the Meta + C command on the main window to quit the demo. |
|