| | 1 | |
| | 2 | See Also: |
| | 3 | * [BuildingQtOnLinux Building Qt Port on Linux] |
| | 4 | * [BuildingQtOnWindows Building on Qt Port Windows] |
| | 5 | |
| | 6 | These instructions assume you are building on an OSX system with Mac Ports installed having the qt4-mac (4.5.2) port installed. |
| | 7 | |
| | 8 | == Checkout the Code == |
| | 9 | You'll need to check out WebKit from SVN or Qt WebKit from Git |
| | 10 | {{{ |
| | 11 | svn checkout http://svn.webkit.org/repository/webkit/trunk WebKit # WebKit SVN Trunk |
| | 12 | }}} |
| | 13 | '''OR''' |
| | 14 | {{{ |
| | 15 | git clone git://gitorious.org/qtwebkit/qtwebkit.git # Qt WebKit Git Branch |
| | 16 | }}} |
| | 17 | |
| | 18 | == Building == |
| | 19 | |
| | 20 | === Workaround #1 === |
| | 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): |
| | 22 | {{{ |
| | 23 | export QTDIR=/opt/local/libexec/qt4-mac # mac ports Qt |
| | 24 | cd /usr/include |
| | 25 | for q in $QTDIR/include/*; do if [ ! -e "`basename $q`" ]; then sudo ln -s "$q"; fi ; done # create a symlink |
| | 26 | }}} |
| | 27 | |
| | 28 | === Workaround #2 === |
| | 29 | Next start the build: |
| | 30 | {{{ |
| | 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 |
| | 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 | }}} |
| | 43 | |
| | 44 | === Finish Up and Run === |
| | 45 | Rerunning the build should recompile CSSParser.cpp and link correctly. |
| | 46 | {{{ |
| | 47 | ${WEBKITSRCDIR}/WebKitTools/Scripts/build-webkit --qt --qmake=qmake-4.5 --makeargs="-j2" -spec macx-g++ --no-video --debug |
| | 48 | }}} |
| | 49 | |
| | 50 | Finally start the demo Qt browser: |
| | 51 | {{{ |
| | 52 | ${WEBKITSRCDIR}/WebKitTools/Scripts/run-launcher --qt --debug # After this, check the dock and you'll see Qt icon ... |
| | 53 | }}} |
| | 54 | |
| | 55 | |