LLQtWebKit

From Second Life Wiki
Jump to navigation Jump to search

Introduction

LLQtWebKit is a static library that renders Web content into a memory buffer using an off-the-shelf version of the Qt application and UI framework. It is currently used by the most recent version of the Media Plugin API to render Web content in the Second Life viewer.

The biggest change in this version of LLQtWebKit is that is can be built against an un-patched version of Qt. The patches that were present before have either been rolled into the main Qt codebase or we have found way to work around them.

License

LLQtWebKit is released under the GPL V2 license.

Browse the code

The code for LLQtWebKit is stored in a Mercurial code repository. You can browse the code here using a Web browser.

Versions built with earlier editions of Qt can be found via appropriate Mercurial tags.

Build instructions

Windows

The Windows version of the build instructions can be found here.

Mac OSX

The Mac OSX version of the build instructions can be found here.

Linux

The Linux version of the build instructions (in the form of a README file) can be found here.

However, that README-linux.txt is incorrect. Since Qt 4, qmake has the Qt location hardcoded and ignores QTDIR. It is necessary to run the correct qmake (and uic) and therefore to make sure that the correct ones are found first in the PATH. Also, some webpages instruct one that you must set QMAKESPEC to $QTDIR/mkspecs/default.

Hence, correct instructions are (change '4.6.0' as appropriate for your Qt version):

export QTDIR=/usr/local/Trolltech/Qt-4.6.0
export PATH=$QTDIR/bin:$PATH
export QMAKESPEC=$QTDIR/mkspecs/default

And then continue as instructed (which qmake and which uic now should show a binary in your QTDIR).

Test applications

As well as the source code and other files required to build LLQtWebKit, there are a number of applications included in the package that are useful for testing. You can browse the code here. Details of how to build them are included in the platform specific build instructions above.

  • qttestapp - A simple Qt based, cross platform application that implements a simple Web browser
  • win32gl - A simple Win32 specific application that implements a simple Web browser
  • testgl - A simple GLUT based, cross platform application that implements a simple Web browser
  • ubrowser - A more complex application GLUT/GLUI based, cross platform application that renders multiple Web pages on the surface of 3D geometry

Version numbers

  • The version of Qt/WebKit used is: 4.7.1
  • The version of LLQtWebKit is 2.2
  • The user agent string reported by LLQtWebKit can be modified using the API but is of the form: "Mozilla/5.0 (Windows;U; Windows NT 6.1; en-US) AppleWebKit/533.3 (KHTML, like Gecko, Safari/533.3)"

Previous Incarnations

  • LLMozLib2 - the initial version of a Web content rendering library for Second Life that used the Mozilla/Gecko rendering engine. This is now deprecated.
  • Qt WebKit - a poorly named version of the Web content rendering engine for Second Life that uses Qt/WebKit to render but retained the same method/class names from LLMozLib2. This is now deprecated.