User:Pjohnsen/MozillaQtBuild: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
Line 9: Line 9:
Note Qt 4.4 is now available for ubuntu 8.04 '''if you enable backports''' in software sources.
Note Qt 4.4 is now available for ubuntu 8.04 '''if you enable backports''' in software sources.
<pre>
<pre>
sudo apt-get install build-essential autoconf2.13
sudo apt-get install libqt4-core libqt4-gui libqt4-dev
sudo apt-get install libqt4-core libqt4-gui libqt4-dev
</pre>
</pre>

Revision as of 22:21, 9 March 2009

Checkout from hg

Qt support is now available from mozilla-central

hg clone http://hg.mozilla.org/mozilla-central

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 build-essential autoconf2.13
sudo apt-get install libqt4-core libqt4-gui libqt4-dev

Install Qt 4.4 (maemo device/scratchbox)

echo "deb http://repository.maemo.org/extras-devel diablo free non-free" >> /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

Install additional headers (desktop Ubuntu)

You might need some more development packages installed for configure to succeed.

sudo apt-get install libasound-dev libglib1.2-dev libidl-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
ac_add_options --disable-elf-dynstr-gc

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