wiki:BuildingQtOnOSX

Version 9 (modified by vestbo@webkit.org, 14 years ago) ( diff )

--

See Also:

These instructions assume you are building on an OSX system with Mac Ports installed having the qt4-mac-devel (4.6) port installed.

Checkout the Code

You'll need to check out WebKit from SVN or Qt WebKit from Git

svn checkout http://svn.webkit.org/repository/webkit/trunk WebKit # WebKit SVN Trunk

OR

git clone git://gitorious.org/webkit/webkit.git # Git mirror

Build 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.

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 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/WebKitTools/Scripts/build-webkit --qt

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/WebKitTools/Scripts/build-webkit --qt --makeargs="-j20 -s" --no-video --debug

Finish Up and Run

Rerunning the build should recompile CSSParser.cpp and link correctly.

${WEBKITSRCDIR}/WebKitTools/Scripts/build-webkit --qt --qmake=qmake-4.5 --makeargs="-j2" -spec macx-g++ --no-video --debug

Finally start the demo Qt browser:

${WEBKITSRCDIR}/WebKitTools/Scripts/run-launcher --qt --debug # After this, check the dock and you'll see an icon for a Qt console app ...
Note: See TracWiki for help on using the wiki.