搭建QTWebKit开发环境(未完成)

WebKit是跨平台的,可以在各种平台上运行,所以WebKit的开发环境也有很多的情况。官方网站为:

http://www.webkit.org/building/tools.html。主要分为以下几个平台:WebKit on MacOS、WebKit on MacOS、WebKit on GTK、WebKit on QT、WebKit on EFL。

这里介绍一下QTWebKit的环境搭建,详情可见:

http://trac.webkit.org/wiki/BuildingQtOnLinux#DependenciesforspecificLinuxdistributions

1.Dependencies依赖库等:

The code should be easily built on any Linux distribution which has development packages for Qt installed. Below is the list of dependencies:

  • Qt version 4.8.0 or later
  • gperf (v3.0 or later)
  • bison (v2.4.1 or later)
  • flex (v2.5.33 or later)
  • sqlite (development files)
  • fontconfig (development files)
  • xrender (development files)
  • phonon (development files)

可以用命令完成:

sudo apt-get install bison flex libqt4-dev libqt4-opengl-dev libphonon-dev libicu-dev libsqlite3-dev libxext-dev libxrender-dev gperf libfontconfig1-dev libphonon-dev g++

2.Building WebKit

First follow the instructions there to get the sources. The Qt port is part of the WebKit source tree, so you don't need anything extra.

获得源码,建议使用Git和GitHub托管自己的代码。

Finally, set the QTDIR environment variable to Qt 4.x's installation path and make sure Qt 4.x's qmake is the first qmake in your PATH (typically by running export PATH=$QTDIR/bin:$PATH).

If you are planning to compile it with  Qt 5, QTDIR should point to PathToRepository/qt5/qtbase/. You should also use this script  build-qt5.sh to build Qt5 (this is what the buildbots are using). Usually once a week we update the current Qt5 hash, so keep checking out this script.

If your qmake binary has a different name, e.g. when using Debian, use the --qmake= option to specify the name.

Build WebKit and the Qt test browser with

WebKit/Tools/Scripts/build-webkit --qt

You can also build using Intel® compilers with the following command.

WebKit/Tools/Scripts/build-webkit --qt --qmakearg="CONFIG+=icc -spec linux-icc"

build-webkit (see above) also supports special variable for specifying the OBJDIR directory, as well as some configure and build arguments

WEBKITOUTPUTDIR=`pwd`/qtbuild  WebKit/Tools/Scripts/build-webkit --qt --makeargs="-j20 -s" --no-video --debug

If you are planning to compile webkit2, Qt5 is required ( build instructions) and it'll be compiling both webkit1 and webkit2 by default.


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值