This is

as days pass by, by Stuart Langridge

. Here I write about many things. In the past I wrote about other things but the past is past. I write code for people to play with, I write about my life on Twitter, and I write here.

On I wrote WebKit browser on Linux, on the subject of Web, Howtos, and Linux.

Update: the trivial WebKit browser is now included in Ubuntu. Simply install libwebkitgdk0d on Ubuntu gutsy (just click the package name there to install it if you're running gutsy now) and then run /usr/lib/WebKit/GdkLauncher to get a simple WebKit browser for testing your code. You too can test WebKit, Apple's web rendering engine and the thing that makes Safari work, on Linux. The KDE teams have been working hard on making it work inside Qt, the KDE widget set, and indeed it does work! A few simple steps are required. First, check out the WebKit source code. There is loads of it, so this will take a while. You'll need Subversion for this. svn checkout http://svn.webkit.org/repository/webkit/trunk WebKit That will give you a folder called WebKit. You'll now need a few requirements; the key one is Qt4. On Ubuntu 6.10 (edgy), get this like so: sudo aptitude install libqt4-dev Now build your Qt-based WebKit browser: QTDIR=/usr/share/qt4/ WebKit/WebKitTools/Scripts/build-webkit Finally, run it: WebKit/WebKitBuild/Release/WebKitQt/QtLauncher/QtLauncher about:blank I created a menu entry to run it (right-click on the Applications menu, say "Edit Menus"). Now I can test stuff in WebKit! Note that the Subversion version of WebKit is miiiiiiiiles ahead of what Safari is using in released versions of Mac OS X, so don't think that just because something works in your little WebKit browser it'll work in Safari. Nonetheless, cool.
Binny V A

Is the javascript handling code included in the WebKit? Or, Can I test my JavaScript apps using this?

sil

Binny V A: yep. I used it to test the recent sorttable release.

Anonymous Coward

The javascript engine in WebKit is afaik not the same that's in safari, at least not when you build against Qt for some reason. Or so a trolltech guy told me, at least... :/

Probar un navegador WebKit en Linux | La brujula verde

[...] Concretamente, Kryogenix da instrucciones de como instalarlo (por medio de virtualización me temo) en Ubuntu 6.10. [...]

meneame.net

Navegador Webkit en Linux...

Parece que ya es posible correr un navegador Webkit en Linux. Instrucciones para Ubuntu 6.10. Vía: www.labrujulaverde.com/2007/04/10/probar-un-navegador-webkit-en-linux/...

Jon

Thanks for posting your findings! svn checkout went fine, but I've run into an error after running

QTDIR=/usr/share/qt4/ WebKit/WebKitTools/Scripts/build-webkit

I'll get an error:

---------------------------------

***Unknown option -r

Usage: qmake [mode] [options] [files]

Failed to setup build environment using qmake!

---------------------------------

Do you have any suggestions? Thanks in advance!

sil

Jon: I had that problem. I suspect that you have the qmake from Qt 3, and you need the one from Qt 4.

Jon

That was it, thank you very much. As I went to build the browser, however, I ran into another problem. Maybe you can help?

--

../../../WebCore/html/HTMLDocument.cpp: In member function ‘virtual void WebCore::HTMLDocument::determineParseMode(const WebCore::String&)’:

../../../WebCore/html/HTMLDocument.cpp:389: error: expected initializer before ‘*’ token

../../../WebCore/html/HTMLDocument.cpp:390: error: ‘doctypeEntry’ was not declared in this scope

../../../WebCore/html/HTMLDocument.cpp:398: error: ‘doctypeEntry’ was not declared in this scope

../../../WebCore/html/HTMLDocument.cpp:401: error: ‘PubIDInfo’ has not been declared

../../../WebCore/html/HTMLDocument.cpp:405: error: ‘PubIDInfo’ has not been declared

../../../WebCore/html/HTMLDocument.cpp:409: error: ‘PubIDInfo’ has not been declared

make[1]: *** [tmp/HTMLDocument.o] Error 1

make[1]: Leaving directory `/home/jon/WebKit/WebKitBuild/Release/WebCore'

make: *** [sub-WebCore-make_default-ordered] Error 2

--

I'm really not sure what step to take next.

sil

Jon: don't know about that, I'm afraid. I'd suggest asking on IRC, on #webkit on irc.freenode.net.

Jon

Okay thanks a lot anyways -- I'll check into it.

nulleando.com.ar » El engine de safari en linux

[...] Via: link [...]

martin langhoff

I am getting the same XX has not been declared error. What commit id were things at when you built it successfully? I'll be happy to rewind my SVN checkout to that revision number to get things to build.

(In other words, the tree seems to be broken currently :-( -- is the webkit team using something like tinderbox to check their builds? )

sil

martin: 

aquarius@giles:~/code/webkit/WebKit$ svn info

Path: .

URL: http://svn.webkit.org/repository/webkit/trunk

Repository Root: http://svn.webkit.org/repository/webkit

Repository UUID: 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Revision: 20788

Node Kind: directory

Schedule: normal

Last Changed Author: bdash

Last Changed Rev: 20788

Last Changed Date: 2007-04-08 11:15:16 +0100 (Sun, 08 Apr 2007)

Properties Last Updated: 2007-04-08 03:59:28 +0100 (Sun, 08 Apr 2007)

bsittler

i found i had to add the gperf table into HTMLDocument.cpp

gperf -CEot -L ANSI-C -k "*" -N findDoctypeEntry -F ,PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards > WebCore/html/HTMLDocument.cpp

end then edit the file by hand to move the gperf-generated table to a point prior to the first reference to it.

i also applied this patch to fix a problem with the wrong qmake being called:

Index: WebKitTools/Scripts/webkitdirs.pm

===================================================================

--- WebKitTools/Scripts/webkitdirs.pm (revision 23560)

+++ WebKitTools/Scripts/webkitdirs.pm (working copy)

@@ -487,7 +487,8 @@

system "mkdir -p " . baseProductDir() . "/$config";

chdir baseProductDir() . "/$config" or die "Failed to cd into " . baseProductDir() . "/$config \n";

- my $result = system "qmake", @buildArgs;

+ my $result = system "qmake-qt4", @buildArgs;

+ $result = system "qmake", @buildArgs if ($result ne 0);

if($result ne 0) {

die "Failed to setup build environment using qmake!\n";

}

movil

When I tried to do this I got: ERROR: flex, bison, gperf missing but required to build WebKit.

So I searched and installed the required libraries and then executed again the build line:

sudo apt-get install flex gperf bison

» Safari y otros navegadores en Linux

[...] Los pasos para crearlo (via kryogenix y no traduzco esta parte a menos que alguien lo pida expresamente) [...]

frasten

If you have the problem of qmake v3 called instead of qmake v4 (***Unknown option -r), you can add this option to the command line:

--qmake=qmake-qt4

for example:

QTDIR=/usr/share/qt4/ WebKit/WebKitTools/Scripts/build-webkit --qmake=qmake-qt4

Message in a bottle…. » Navegador Webkit en linux

[...] Font: WebKit browser on Linux [...]

Benjamin Meyer

I recently started a project called Arora which is a browser using QtWebKit. It provides a lot more then the QtLauncher does and can build against WebKit trunk or the already released Qt 4.4 packages. It is already good enough for most of my daily browsing and even writing this comment.

Benjamin Meyer

Hmm, looks like the link didn't work. http://arora-browser.org/

Denilson

Hey, thanks for this post! I've followed it and it worked perfectly in my Gentoo/Linux.

Leon

Or just search for and install Midori with Synaptic Package Manager.

* Full integration with GTK+2.

* Fast rendering with WebKit.

* Tabs, windows and session management.

* Bookmarks are stored with XBEL.

* Searchbox based on OpenSearch.

* User scripts and user styles support.

sil

Leon: absolutely Midori is the way to go now. It wasn't available two years ago when I wrote this :-)

Jaffar

Hi All,

I am very new to webkit . When try to build the webkit from trunk

and I am getting the following error.

"bash-3.2$ WebKitTools/Scripts/build-webkit --cairo-win32 --debug

ERROR: flex missing but required to build WebKit."

I have followed the steps as in documentation and other post.

perhaps It's in windows platform, please can body help me to

come out this issue.

Thanx in Advance...

Regards,

Jaffar

sil

Jaffar: if you're using Ubuntu, you can just install the package these days; you don't need to build WebKit any more :)

Jaffar

Hi,

I am using the webkit in windows platform. I know it is Linux based community, perhaps still anybody can assist me on the issue.

Regards,

Jaffar

Rajesh

Hello,

I couldn’t build webkit. It is throwing me error, which i have given below.

Can u please help me to build webkit.

In Cygwin prompt

=================

vrajesh@pcch-vrajesh /cygdrive/c/cygwin/home/vrajesh/WebKit

$ WebkitTools/Scripts/build-webkit –cairo -win32 –debug

0 byte sized file removed from build directory: /cygdrive/c/WebKit/webkitdist/De

bug

Generating derived sources

Calling ‘qmake -r –cairo -win32 OUTPUT_DIR=/cygdrive/c/WebKit/webkitdist/Debug

-r /cygdrive/c/cygwin/home/vrajesh/WebKit/DerivedSources.pro -o Makefile.Derived

Sources’ in /cygdrive/c/WebKit/webkitdist/Debug

***Unknown option –cairo

Usage: D:\SVN\qmake.exe [mode] [options] [files]

=================

Can anyone please help me.. i am totally tired by spending lots of hours to build webkit, but i couldn't make the build successful.

This website belongs to Stuart Langridge. Contact details are available. Don't eat yellow snow. Valid HTML5, at least in theory, except for the bits that aren't because I'm that futuristic that I'm ahead of the spec, oh yes. HTML5 help from Bruce Lawson, among others. Fonts from the superb FontSquirrel. End.