Qt Webkit OSX Build Instructions

From Second Life Wiki
Revision as of 14:40, 2 July 2009 by Icefox Carrasco (talk | contribs) (Created page with '1) Get Qt and set environment variables. Download Qt from trolltech.com Extract it somewhere such as $HOME/dev/qt-4.5/ Then set the environment variable QTDIR to point to that...')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

1) Get Qt and set environment variables.

Download Qt from trolltech.com

Extract it somewhere such as $HOME/dev/qt-4.5/

Then set the environment variable QTDIR to point to that location. cd $HOME/dev/qt-4.5/ export QTDIR=`pwd` export PATH=$PATH:$QTDIR/bin

2) Get llmozlib and checkout the qtwebkit branch

cd $HOME/dev

  1. note if you hasve write access and want to make changes,
  2. use git+ssh://git@code.staikos.net/srv/git/llmozlib

git clone git://code.staikos.net/llmozlib git checkout -b qtwebkit origin/qtwebkit

3) Apply locally maintained Qt patches

cd $QTDIR

  1. the patch files are numbered in the order they should be applied, so this should do the right thing

for patchfile in /path/to/llmozlib/llmozlib2/qt_patches/[0-9]* /path/to/llmozlib/llmozlib2/qt_patches/qtwebkit-[0-9]* ; do echo applying "$patchfile" patch -p1 <"$patchfile" done

4) Compile Qt

cd $QTDIR ./configure -no-framework -fast -no-qt3support -prefix $PWD -static -release -no-xmlpatterns -no-phonon -universal -sdk /Developer/SDKs/MacOSX10.4u.sdk/ make

If you have a multi-core machine, you can speed the make up substantially by using the '-j' argument. On a 4-core machine, I use 'make -j4'.

For some reason, this doesn't seem to build libJavaScriptCore.a. I also had to do the following:

cd $QTDIR/src/3rdparty/webkit/JavaScriptCore make

5) build llmozlib2.dylib with XCode:

cd $HOME/dev/llmozlib/llmozlib2/

Create a symlink to QTDIR in the same directory as llmozlib2.xcodeproj (this allows the xcode project to find it easily):

ln -s $QTDIR QTDIR

build the "llwebkitlib" configuration of the "llmozlib2" target (note especially: the default configuration is "Release". Be sure to specify "llwebkitlib" as the configuration):

xcodebuild -project llmozlib2.xcodeproj -target llmozlib2 -configuration llwebkitlib

6) build ubrowser with xcode:

Get the GLUI Framework (the one tested to work is at http://lukecyca.com/wp-content/uploads/2008/12/GLUI-Framework-2.35.tgz)

run "update-mac-symbols.sh"

./update-mac-symbols.sh

build the "Release" configuration of the "llmozlib2" target:

xcodebuild -project llmozlib2.xcodeproj -target llmozlib2 -configuration Release

now build ubrowser

cd tests/ubrowser xcodebuild -project ubrowser.xcodeproj -target ubrowser -configuration Release open build/Release/ubrowser.app