Use QT to compile WebKit in Linux (Ubuntu9.10)

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.