Compile the QT WebKit in Ubuntu

Source: Internet
Author: User

1. Set the dependency Library to the header file

Sudo apt-Get install libqt4-dev libxslt-dev gperf bison libsqlite3-dev flex build-essential subversion libphonon-Dev

2. Download WebKit source code

SVN checkout http://svn.webkit.org/repository/webkit/trunk WebKit

3. Compile WebKit

./WebKit/webkittools/scripts/build-WebKit -- QT

4. Run WebKit

$ CD WebKit/webkitbuild/release/bin;

$./Qtlauncher

WebKit Structure Analysis (from the Network)

In short, WebKit consists of three modules: javascriptcore, WebCore, and WebKit. WebKit is used as the name of the entire project.

Javascriptcore: a javascript interpreter;

WebCore: is the core of the entire project, used to implement the render engine: parse web pages, generate a DOM tree and a render tree, and ultimately render it with a backend (backend ?), There are already many backend ports, such as WebKit/GTK and webkitqt. In, backend is separated from WebCore, but it is actually part of WebCore.

WebKit: It hides and selects WebCore to the current platform. In WebKit/GTK, WebCore appears in the form of GTK objects, and their signals and APIs are similar to other GTK objects.

WebKit engineering organization and management platform and tools

Currently, WebKit supports four platforms: GTK, QT, Mac OS X, and cygwin.

GTK and QT use qmake

Use xcodebuild for Mac OS X

Cygwin uses Visual Studio

The following is an analysis of the QT WebKit:

First, execute the build-WebKit Perl script under webkittools/scripts. You can use some function modules required for parameter configuration, including some SVG function configurations, as well as XPath, XSLT, and video. During script execution, the corresponding parameters are parsed to determine the compilation options, function modules, platform information, corresponding tools, output paths, and other parameters. Finally, based on different parameters, use the qmake tool by WebKit. pro generates the makefile of the entire project. In the make process, qmake is further called to generate makefiles for each module from the. Pro project file of each sub-module. Make the makefile of each sub-module to obtain the target file.

Engineering Structure

This project can be divided into three sub-modules: javascriptcore, WebCore, and WebKit, which correspond to three sub-directories, as described in the preceding WebKit structure.

Furthermore, the entire project is divided into six sub-projects that can be built, corresponding to the corresponding. Pro file.

WebKit \ WebCore. Pro: Generate libqtwebkit. So or libqtwebkit. A. It is the entire WebKit engine library, and WebKit applications are based on this library.

WebKit \ javascriptcore \ KJS \ testkjs. Pro: generate the testkjs executable file. It is a javascript testing tool to test the function implementation of the javascriptcore module.

WebKit \ javascriptcore \ PCRE \ dftables. Pro: generate the dftables executable file, which is also a tool.

WebKit \ QT \ qtlauncher. Pro: generate the qtlauncher executable file, which is a WebKit-based simple browser application.

WebKit \ QT \ plugins. pro: libqtwebico is generated. so, after install, It will be placed under/usr/lib/qt4/plugins/imageformats/. The role of this library is unknown, because the currently running qtlauncher application has not used it yet and remains to be studied.

WebKit \ webkittools \ dumprendertree \ QT \ dumprendertree. Pro: Generate dumprendertree. It is also an application tool based on WebKit.

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.