Version 16 (modified by 17 years ago) ( diff ) | ,
---|
Building the Gtk port
The Gtk port of WebKit is intended to provide a browser component primarily for users of the portable Gtk+ UI toolkit on platforms like Linux.
Status of the port
The port is actively maintained, and its build state is continuously tested by the WebKit build-bot.
Developers interested in using or contributing to the Gtk port should be willing to get their hands dirty at this stage. Patches are welcomed on the bug tracker and help is readily available on the IRC channel and mailing list for developers who want to learn the ropes.
It is worth noting that this project is being developed directly in WebKit SVN and is entirely unrelated to the classic Gtk+ WebCore.
Distributions
The WebKit/GTK+ API isn't stable and little thought has yet been given to packaging issues, so distributions should package this with caution as a kind of "preview" rather than a stable platform library.
Debian
Debian Unstable provides experimental WebKit/GTK+ packages by Mike Hommey.
Debian has organised a packaging team for WebKit:
- pkg-webkit-maintainers: General WebKit packaging discussion
- pkg-webkit-commits: Commits list
Gentoo
Gentoo is working on an ebuild (though it seems to pull in some unnecessary dependencies on the way): http://bugs.gentoo.org/show_bug.cgi?id=190347
Dependencies
The code should be easily built on any Linux distribution which has development packages for Gtk+ installed. Packages you might need to install (in addition to an "ordinary build environment"):
- libicu-dev
- libxslt-dev
- libcurl-dev
- libsqlite3-dev
- libjpeg62-dev
- libpng12-dev
- gperf
- bison
- flex version 2.5.33 or later
If you forgot to install one of the build dependencies, your build tree might be in a bad state and might fail to compile even after you've installed the missing dependency. In this case, you should ensure your SVN checkout is entirely clean with eg. make -C WebKitBuild/Release/WebCore clean
On Debian
To satify WebKit build dependencies simply:
apt-get build-dep webkit
Using Qmake4
The Gtk port has made a compromise on its build system by incurring a dependency on qmake 4, the Qt toolkit build system. This is only a build-time dependency -- the compiled executables will of course continue to have no requirement of Qt. The decision was made to share resources with the Qt porting team and has been largely successful -- the Gtk port is more likely now than ever to be in a building state straight out of SVN while the port developers have more free time to write code instead of maintaining the old Bakefile build system.
To start the build, ensure that you have qmake4 installed and run:
WebKit/WebKitTools/Scripts$ ./build-webkit --gtk
The above command will try to execute "qmake". If your qmake4 binary is named differently, e.g. on Debian, use the --qmake= option.
WebKit/WebKitTools/Scripts$ ./build-webkit --gtk --qmake=qmake-qt4
This will build both the library and the GtkLauncher demo in WebKit/WebKitBuild
Note: your system might have both qmake and qmake-qt4 (Debian). You must use qmake-qt4. Using qmake
fails to compile WebCore/platform/gtk/gtk2drawing.c (missing header gtk/gtk.h)
Building qmake if your distribution doesn't ship it in a package
wget ftp://ftp.trolltech.com/qt/source/qtopia-core-opensource-src-4.3.2.tar.gz tar -xvzf qtopia-core-opensource-src-4.3.2.tar.gz cd qtopia-core-opensource-src-4.3.2 echo yes | ./configure -fast
Et voila the bin/ directory holds a qmake binary you can use for the Gtk+ port. You might want to set the QMAKESPEC to $PWD/mkspecs/ANY-SPEC-YOU-WANT but the default should just work.
To install the library and the header files:
$ cd WebKitBuild/Release
# make install
Change tracking issues with qmake4
Currently the build system's of Gtk, Qt and Wx do not detect source changes very well. So unfortunately you should build from scratch every time. :( A work around is to use ccache
.
Further links
Building
- Missing dependencies are not reported and force a user to take a closer look at the screen.