Compiling Berkelium
Berkelium is a library to use Chromium as an HTML renderer and embed it in your application. It’s very nice, but I had trouble with their binaries, and compiling everything is a pain. So here are some simple instructions on how to compile Berkelium (Linux, focusing on Ubuntu):
- git clone https://github.com/sirikata/berkelium.git
- cd berkelium
- EDIT: git submodule update —init —recursive
- apt-get install libnss libnss-dev
- apt-get install gconf gnome-keyring libgconf2-4 libgconf2-dev gconf2 libgnome-keyring-dev libgnome-keyring1.0-cil-dev
- apt-get install libdbus-glib-1-dev
- apt-get install cmake gperf libpam0g-dev libxtst-dev
- util/build-chromium.sh —deps [this should install all deps, but it does not]
- cmake .
- make
This seems to have done the trick. http://code.google.com/p/chromium/wiki/LinuxBuildInstructionsPrerequisites has a more thorough list of dependencies.
If you get something like internal error, aborting at elf64-x86-64.c line 3396 in elf_x86_64_relocate_section, use ld.gold instead of ld.bfd. In Ubuntu that can be done with ‘apt-get install binutils-gold’, in Slackware change the link to ld from ‘ld.bfd’ to ‘ld.gold’.
A simple lib
Amazing how eventually I have some “simple task” that I expect to solve with a library and a couple of calls and it turns out to be amazingly difficult. Last two examples? Converting HTML and PDF to textures.
It turns out that the only still developed library for rendering HTML into an image is Berkelium. I suppose very few people must need something like that, because there are no binary packages for any Linux distribution. The binaries didn’t work here (possible compiler incompatibility). And compiling from source is somewhat of a pain (my other window is a compiler).
As for PDFs, I just gave up for now. The best solution I found was to use ghostview to convert to images. It was easier to read powerpoint files.