LeoZ BloG

QtWebKit building cheat sheet

This cheat sheet explains how to build Qt and QtWebKit from source code on Ubuntu Linux. It assumes x86 machine and Ubuntu 13.04. The instructions based on the following article: http://qt-project.org/wiki/Building_Qt_5_from_Git

Get dependencies

sudo apt-get install build-essential perl python git
sudo apt-get install "^libxcb.*" libx11-xcb-dev libglu1-mesa-dev libxrender-dev
sudo apt-get install flex bison gperf libicu-dev libxslt-dev ruby
sudo apt-get install libsqlite3-dev
sudo apt-get install libxrender-dev gperf libfontconfig1-dev libpng12-dev

Get sources

cd ~/Projects/
mkdir qt_build
cd qt_build/
git clone git://gitorious.org/qt/qt5.git qt5
cd qt5/
git checkout stable
perl init-repository

Build

./configure -opensource -confirm-license -nomake examples -nomake tests
make -j 4
sudo make install
  • Check where Qt is installed.
ls /usr/local/Qt-5.1.2/

Change env.

cd ~
vi .bashrc
  • Add QTDIR environment variable to your .bashrc file.
  • Change PATH variable to include QTDIR/bin.
export QTDIR=/usr/local/Qt-5.1.2
export PATH=$QTDIR/bin:$PATH

Test WebKit

cd ~/Projects/qt_build/qt5/qtwebkit/Tools/MiniBrowser/qt
qmake
make
cd ~/Projects/qt_build/qt5/qtwebkit/bin
./MiniBrowser
Leonid Zolotarev 30 August 2013
blog comments powered by Disqus