Difference between revisions of "LLQtWebKit"

From Second Life Wiki
Jump to navigation Jump to search
m (Text replacement - "hg.secondlife.com" to "bitbucket.org/lindenlab")
 
(13 intermediate revisions by 3 users not shown)
Line 1: Line 1:
__NOTOC__
== Introduction ==
== Introduction ==
LLQtWebKit is a static library that renders Web content into a memory buffer using code from a patched version of the Qt/WebKit project. It is currently used by the most recent version of the [https://wiki.secondlife.com/wiki/Media_Rendering_Plugin_Framework Media Plugin API] to render Web content in Second Life.
LLQtWebKit is a static library that renders Web content into a memory buffer using an off-the-shelf version of the [http://qt.nokia.com/ Qt application and UI framework]. It is currently used by the most recent version of the [[Media Rendering Plugin Framework|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 [http://www.gnu.org/licenses/gpl-2.0.html GPL V2] license.


== Browse the code ==
== Browse the code ==
The code for LLQtWebKit is stored in a Mercurial code repository. You can browse the code [http://hg.secondlife.com/llqtwebkit/src/ here] using a Web browser.  
The code for LLQtWebKit is stored in a Mercurial code repository. You can browse the code [http://bitbucket.org/lindenlab/llqtwebkit/src/ here] using a Web browser.  


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


== Build instructions ==
== Build instructions ==
==== Windows ====
==== Windows ====
The Windows version of the build instructions can be found [https://wiki.secondlife.com/wiki/LLQtWebKit_Win32_Build_Instructions here].
The Windows version of the build instructions can be found [[LLQtWebKit Win32 Build Instructions|here]].


==== Mac OSX ====
==== Mac OSX ====
The Mac OSX version of the build instructions can be found [https://wiki.secondlife.com/wiki/LLQtWebKit_Mac_OSX_Build_Instructions here].
The Mac OSX version of the build instructions can be found [[LLQtWebKit Mac OSX Build Instructions|here]].


==== Linux ====
==== Linux ====
The Linux version of the build instructions (in the form of a README file) can be found [http://hg.secondlife.com/llqtwebkit/src/tip/README-linux.txt here].
The Linux version of the build instructions (in the form of a README file) can be found [http://bitbucket.org/lindenlab/llqtwebkit/src/tip/README-linux.txt 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 <em>first</em> 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):
<pre>
export QTDIR=/usr/local/Trolltech/Qt-4.6.0
export PATH=$QTDIR/bin:$PATH
export QMAKESPEC=$QTDIR/mkspecs/default
</pre>
And then continue as instructed (<code>which qmake</code> and <code>which uic</code> now should show a binary in your QTDIR).


== Test applications ==
== Test applications ==
As well as the source code and patch files required to build the library there are a number of test applications included in the package that are useful for testing. You can browse the code [http://hg.secondlife.com/llqtwebkit/src/tip/tests/ here]. Details of how to build them are included in the build instructions above.
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 [http://bitbucket.org/lindenlab/llqtwebkit/src/tip/tests/ here]. Details of how to build them are included in the platform specific build instructions above.


* '''qttestapp''' - A simple Qt based application that implements a simple Web browser using LLQtWebKit
* '''qttestapp''' - A simple Qt based, cross platform application that implements a simple Web browser
* '''testgl''' - A simple GLUT based application that renders a single Web page using OpenGL
* '''win32gl''' - A simple Win32 specific application that implements a simple Web browser
* '''ubrowser''' - A more complex application GLUT/GLUI based application that renders multiple Web pages on the surface of 3D geometry
* '''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 ==
== Version numbers ==
* The version of Qt/WebKit used is: 4.5.2
* The version of Qt/WebKit used is: <code>4.7.1</code>
* The version of LLQtWebKit is 2.1
* The version of LLQtWebKit is <code>2.2</code>
* The user agent string reported by LLQtWebKit is "<code>Mozilla/5.0 (Windows;U; Windows NT 5.1; en-US) AppleWebKit/527+ (KHTML, like Gecko, Safari/419.3)</code>"
* The user agent string reported by LLQtWebKit can be modified using the API but is of the form: "<code>Mozilla/5.0 (Windows;U; Windows NT 6.1; en-US) AppleWebKit/533.3 (KHTML, like Gecko, Safari/533.3)</code>"
 


== Previous Incarnations ==
== Previous Incarnations ==
* [https://wiki.secondlife.com/wiki/LLMozLib2 LLMozLib2] - the initial version of a Web content rendering library for Second Life that used the Mozilla/Gecko rendering engine. This is now deprecated.
* [[LLMozLib2]] - the initial version of a Web content rendering library for Second Life that used the Mozilla/Gecko rendering engine. This is now deprecated.


* [https://wiki.secondlife.com/wiki/Qt_Webkit_Win32_Build_Instructions 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.
* [[Qt Webkit Win32 Build Instructions|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.

Latest revision as of 10:12, 1 May 2015

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.