OWB SDK Environment

Console compilation

You need to install MacPorts and the following packages:

  • cmake
  • cppunit
  • curl+gnutls
  • curl-ca-bundle
  • fontconfig
  • freetype
  • gconf
  • gnutls
  • gtk2+x11
  • icu
  • libpng
  • libpng
  • libsdl
  • libsdl_gfx
  • libxml2
  • libxslt
  • openssl
  • pkgconfig

In case you want to enable some HTML5 features, you might need:

  • sqlite3
  • gstreamer
  • gnome-vfs

And of course, X11 (get it from your MacOS Install DVD).

Run ccmake .. and activate MACPORT.

Set to whatever you want (GTK or SDL or create your own). In case you're running GTK, you'll need X11

In order to handle GTK+-2.0 deps, you need to add this to your ~/.profile :

export PKG_CONFIG_PATH=/opt/local/lib/pkgconfig:/usr/X11/lib/pkgconfig

XCode project

To compile on OSX, make a build folder in you source folder

cd ~/owb/trunk (this is an example of path, you can choose the path you want)
mkdir buildXcode
cd buildXcode

run ccmake using

ccmake -GXcode ..

When you are in the ccmake menu, you have to activate the MacPort option named : OWBAL_PLATFORM_MACPORT

If this option isn't visible when you run ccmake, you have to hit the 'c' key to configure the build, then press the 'e' key to come back to the options. The MacPort option should now be visible : you have to activate it, press 'c' again, 'e' and at last 'g' to generate the files.

Use now your Finder to go to your build folder, ccmake should have created a file named : WebKit.xcodeproj (you can then rename it if you want) This file is a standard Apple XCode project file.

When you open this project on XCode you have to set the Active Executable to owb (in the project menu). You can run the unit tests by choosing testBAL as the Active Executable.

XCode has en embedded subversion handler, you can activate it Project Settings by enabling SCM and choosing Subversion as SCM System. Note that if you prefer to use svn on the command line to keep your version up to date, you'll have to regenerate the XCode file with ccmake each time the update involves a file adding or removing.

You can then use Xcode to debug, run, enhance OWB.


Known Bugs :

  • You may encounter a pretty consequent number of warnings/errors when you build your project for the first time on XCode. Build it again, now XCode knows all the files and should dramatically reduce the number of warnings/errors.
  • XCode tries to build some .rule and .inl files and raise warnings. These warnings can be removed by removing theses files from the project Targets (on the left of the Project Main Window). Theses files are generated by ccmake when choosing the XCode option but they dont seem to be usefull, as you can remove them from the project with no apparent consequences.
  • There are some problems with the use of the XCode debugger with this generated file. Some of theses bugs are fixed by restarting XCode or regenerating the WebKit.xcodeproj file.