Project Site and Development Blog


04/13/2013: This project is no longer under active development. Those considering embedding a WebKit browser in their wx application should consider embedding Chromium instead.

IMPORTANT: Before getting started, you need to do the following:

  1. Check to make sure you have the Requirements for your platform.
  2. Setup your build Environment

Then, open a terminal, then cd into the directory you want to store the webkit sources, and do the following to checkout the WebKit repo on Gitorious:

git clone git://gitorious.org/+wxwebkit-developers/webkit/wxwebkit.git

After doing a checkout, then build the sources using the following commands:

cd WebKit/Tools/Scripts
./build-webkit --wx

This builds JavaScriptCore, WebCore, the wx API wrappers, and the demo. The wxBrowser demo application can be found in WebKit/WebKitBuild/<Configuration>.<Branch>, where configuration will be Release or Debug, whichever you’ve set. Make sure that needed libraries (such as libwxwebkit, wx libraries, and pre-requisite libs) are on the library’s linker path on Unix/OS X, or copy them into the same directory as the executable on Win. Double-click it or run it from the command line to test.

If you want more options, control, you can pass arguments to the build system using –makeargs=”…”. Some options are:

-jX: build X files at a time, good for multi-core / multi-processor machines

–wxpython: build wxPython bindings

-v: Verbose, see more details

So, to do a 4X parallel build with wxPython bindings, you would run `build-webkit –wx –makeargs=”–wxpython -j4″`.

Running the tests

After you’ve built wxWebKit successfully, you can run tests by running the run-javascriptcore-tests script, in the same directory as build-webkit.


Build Issues:

  • wx-config not found. Make sure wx-config is on your path, and that the wx-config is the one corresponding to your 2.8 build. (For example, wxWidgets 2.5.3 comes with OS X 10.4, so in that case wx-config will always be found, but you can’t use 2.5.3 to build wxWebKit.)
  • (Win) CSSValue multiply-defined errors. This means either that your Cygwin dependencies are not setup properly, or that you did not perform the initial checkout using Cygwin’s svn.
  • Missing header errors. It is likely a dependency was not properly installed. First, in WebKit/WebKitTools/Scripts, try running install-win-extras or install-unix-extras (using sudo or as root). If that doesn’t work, please report the dependency that was not installed on the mailing list or the SF trackers. (See Getting Help for more info.)

Runtime Issues:

  • Unix – “cannot find shared library <shared library>”. Make sure you set LD_LIBRARY_PATH (DYLD_LIBRARY_PATH on OS X) to include the directories containing your wx libraries, your libwxwebkit.(so|dylib) library, and also any non-system directories where you have any dependencies installed.