LLQtWebKit

From Second Life Wiki
Revision as of 07:52, 5 October 2010 by Aleric Inglewood (talk | contribs) (Add fix for environment variables.)
Jump to navigation Jump to search

Introduction

LLQtWebKit is a static library that renders Web content into a memory buffer using code from a modified 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.

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.

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 horribly wrong. For a start, Qt 4 doesn't care about QTDIR. qmake has the Qt location hardcoded. So, telling people to do add $QTDIR/bin at the *end* of the PATH isn't going to work. They also forget to mention that you must set QMAKESPEC to $QTDIR/mkspecs/default. Moreover, on some operating systems (debian, ubuntu) 'uic' is a symbolic link to the Qt 3 version.

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 ([code]which qmake[code] and [code]which uic[code] now 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.6.0
  • 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 5.1; en-US) AppleWebKit/532.4+ (KHTML, like Gecko, Safari/532.4)"

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.