User:Pjohnsen/MozillaQtBuild

Checkout from hg

hg clone http://hg.mozilla.org/users/vladimir_mozilla.com/mozilla-qt mozilla-qt
python client.py checkout

Install Qt 4 (desktop Ubuntu)

Note Qt 4.4 is now available for ubuntu 8.04 if you enable backports in software sources.

sudo apt-get install libqt4-core libqt4-gui libqt4-dev

Install Qt 4.4 (maemo device/scratchbox)

echo "deb http://qt4.garage.maemo.org/ chinook user" >> /etc/apt/sources.list
apt-get update
apt-get install libqtcore4 libqtgui4 libqt4-network

For building in scratchbox you also need

apt-get install libqt4-dev

mozconfig

Here is a sample mozconfig

mk_add_options MOZ_CO_PROJECT=browser,xulrunner

ac_add_options --enable-application=browser

ac_add_options --enable-default-toolkit=cairo-qt
ac_add_options --enable-debug="-g3"
ac_add_options --disable-optimize
ac_add_options --enable-tests

ac_add_options --disable-installer
ac_add_options --disable-crashreporter
ac_add_options --disable-javaxpcom
ac_add_options --disable-printing
ac_add_options --disable-embedding-tests

mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../obj-qt
mk_add_options MOZ_MAKE_FLAGS=-j4

For arm you may need to disable jemalloc as the compiler doesn't seem to like it

ac_add_options --disable-jemalloc

Build

Build as normal with

make -f client.mk build

Custom Qt build

If your are using your own build of Qt you will need to add a line like this to our mozconfig:

ac_add_options --with-qtdir="/usr/local/Trollteh/Qt-4.4.0-rc1"

and set environment vars like this:

export PKG_CONFIG_PATH=/usr/local/Trolltech/Qt-4.4.0-rc1/lib/pkgconfig/
export LD_LIBRARY_PATH=/usr/local/Trolltech/Qt-4.4.0-rc1/lib/
export PATH=/usr/local/Trolltech/Qt-4.4.0-rc1/bin:$PATH