20 | | === Workaround #1 - for missing Qt Headers === |
21 | | This works around the problem with Qt headers being reference directly from /usr/include regardless of where the QTDIR is (Fixes "''../../../WebKit/JavaScriptCore/wtf/unicode/qt4/UnicodeQt4.h:26:17: error: QChar: No such file or directory''" errors): |
| 19 | == Build WebKit == |
| 20 | First follow the instructions [QtWebKitContrib there to get the sources]. The Qt port is part of the WebKit source tree, so you don't need anything extra. |
| 21 | |
| 22 | 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. |
| 23 | |
| 24 | Build WebKit and the Qt test browser with |
| 25 | |
31 | | export WEBKITSRCDIR=qtwebkit # change this to 'WebKit' to build WebKit SVN Trunk |
32 | | export WEBKITOUTPUTDIR=`pwd`/${WEBKITSRCDIR}-build |
33 | | ${WEBKITSRCDIR}/WebKitTools/Scripts/build-webkit --qt --qmake=qmake-4.5 --makeargs="-j2" -spec macx-g++ --no-video --debug # change 'qmake-4.5' to '/opt/local/libexec/qt4-mac-devel/bin/qmake' if installed from Mac Ports |
34 | | }}} |
35 | | |
36 | | The build will ultimately fail with an error message "''Undefined symbols: "WebCore::CSSParser::lex()", referenced from: WebCore::CSSParser::lex(void*)in CSSParser.o''" when it attempts to link the binaries, to fix that we run the flex make target by hand and copy the result into the build output drectory: |
37 | | {{{ |
38 | | cd ${WEBKITSRCDIR}/WebCore |
39 | | rm tokenizer.cpp |
40 | | WebCore=. make -f DerivedSources.make tokenizer.cpp |
41 | | mv tokenizer.cpp ${WEBKITOUTPUTDIR}/Debug/WebCore/generated/debug/tokenizer.cpp |
42 | | cd ${WEBKITSRCDIR}/.. |
| 33 | WEBKITOUTPUTDIR=`pwd`/qtbuild WebKit/WebKitTools/Scripts/build-webkit --qt --makeargs="-j20 -s" --no-video --debug |