WebKit .NET

Building WebKit

The guide below details the process for building the Cairo port of WebKit and is based on this guide on the WebKit project wiki, with a few changes.

0. Setting up a Build Environment

Follow the instructions at http://webkit.org/building/tools.html to install either Visual Studio 2005 or Visual C++ 2005 express, various service packs and updates, and Cygwin.

1. Obtaining the WebKit Source

From within Cygwin, run the following command to download the WebKit source tree. It is advised to build WebKit in your cygwin home directory.

svn checkout http://svn.webkit.org/repository/webkit/trunk WebKit

Next, download the WebKit Support Libraries to the root of the WebKit source tree. Make sure it is named WebKitSupportLibrary.zip. Do not extract it's contents.

Finally, in Windows, set the following environment variables by right-clicking My Computer -> Properties -> Advanced Settings -> Advanced -> Environment Variables:

WEBKITOUTPUTDIR - (e.g. <webkitroot>\WebKitBuild)
WEBKITLIBRARIESDIR - (path to <webkitroot>\WebKitLibraries\win)

2. Build Requirements

Download the build requirements from here. Extract the contents to a directory, e.g. <webkitroot>\WebKitLibraries\win\requirements, and add the underlying 'include' and 'lib' directories to the Visual C++ 2005 directory list.

3. Update and Build

In Cygwin, from your home directory, run the following command to update the WebKit source tree and install the support libraries:


Finally, to build WebKit, run the following command (optionally use the --debug switch instead of --release):

WebKit/WebKitTools/Scripts/build-webkit --release --cairo-win32

If successful, the build process will likely take a few hours. The output will be found in the directory specified in the WEBKITOUTPUTDIR environment variable.

4. Dependencies

Binary dependencies for the build can be found in the 'bin' subdirectory of the requirements downloaded in step 2. These requirements may change from time to time - you might need to experiment to find out exactly what is and isn't needed.

5. Common Problems

See Common Build Errors on the WebKit wiki for solutions to some commonly faced problems.