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 **

1
2
3
4
5
6
7

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 **

1
2
3
4
5

cd ~/Projects/
mkdir qt_build
cd qt_build/

1
2
3
4
5
6

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

** Build **

1
2
3
4
5

./configure -opensource -confirm-license -nomake examples -nomake tests
make -j 4
sudo make install

  • Check where Qt is installed.
1
2
3

ls /usr/local/Qt-5.1.2/

** Change env. **

1
2
3
4

cd ~
vi .bashrc

  • Add QTDIR environment variable to your .bashrc file.
  • Change PATH variable to include QTDIR/bin.
1
2
3
4

export QTDIR=/usr/local/Qt-5.1.2
export PATH=$QTDIR/bin:$PATH

** Test WebKit **

1
2
3
4
5
6
7

cd ~/Projects/qt_build/qt5/qtwebkit/Tools/MiniBrowser/qt
qmake
make
cd ~/Projects/qt_build/qt5/qtwebkit/bin
./MiniBrowser

Comments

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×