Recently, we are developing a Render similar to a browser. We used to select FLTK. Later, the implementation was not very good and the interface was relatively simple. So we are going to study the Render used by open-source browsers, in actual use, Google Chrome's Render is faster than Firefox, so we finally chose the WebKit (Render is only one part of it) based on Chrome. The copyright is LGPL, which is very good. The following is the process of compiling WebKit with QT on Ubuntu9.10 (refer
Recently, we are developing a Render similar to a browser. We used to select FLTK. Later, the implementation was not very good and the interface was relatively simple. So we are going to study the Render used by open-source browsers, in actual use, Google Chrome's Render is faster than Firefox, so we finally chose Chrome's WebKit (Render is only one part of it). The copyright is LGPL, which is very good.
The following is the process of compiling WebKit with QT on Ubuntu 9.10 (refer to the official http://trac.webkit.org/wiki/BuildingQtOnLinux and http://mondaybynoon.com/2007/04/23/installing-and-running of Jonathan Christopher-webkit-in-linux-using-qt /). It takes a long time.
1. confirm that the following packages are installed:
Sudo aptitude install libqt4-dev gperf bison flex libicu36-dev libphonon-dev libsqlite3-dev
2. obtain the latest WebKit source code release from the WebKit website and use svn. Therefore, sudo apt-get subversion is required if svn is not available. I put the obtained code in my own working directory, that is,/home/rafael/workspace/cpp/. This process takes a long time:
Cd/home/rafael/workspace/cpp
Svn checkout http://svn.webkit.org/repository/webkit/trunk WebKit
3. Set the relevant environment, and then compile WebKit. The following two functions are written as a command for execution. It takes quite a while. You can play basketball and then come back to take a bath:
QTDIR =/usr/share/qt4/WebKit/WebKitTools/Scripts/build-webkit -- qt
After compilation is successful, the following information is displayed:
========================================================== ==============================
WebKit is now built (1 h: 37 m: 09 s ).
To run QtLauncher with this newly-built code, use
"WebKit/WebKitTools/Scripts/run-launcher" script.
========================================================== ==============================
4. Then perform the test:
WebKit/WebKitTools/Scripts/run-launcher -- qt
This shows a simple browser interface, input http://www.google.com, you can see the google search page.
Next we can study the source code and strip the Render part.