NetSurf Source
The NetSurf_Web_Browser is Open Source and licensed under the GPL. Of course, the source code is available. Get it here.
Compilation instructions
- setup environment (install a cross compiler)
- The easiest way is to use the OpenEmbedded toolchain. Some information about that is available at the SamyGO OpenEmbedded page. The toolchain is built with the
make Toolchaincommand. - If you don't want to use OpenEmbedded, you will need to compile a cross compiler manually, instructions can be found at Setting up a cross-compilation toolchain.
- The easiest way is to use the OpenEmbedded toolchain. Some information about that is available at the SamyGO OpenEmbedded page. The toolchain is built with the
- compile (in the cross compile environment) and
make installthe required dependency libraries:- libiconv
- zlib
- libjpeg
- libpng
- libxml2
- libidn
- (openssl)
- curl
- SamyGO libSDL
- setup environment for netsurf compilation
#!/bin/sh#export PATH=/usr/local/arm-linux-gnueabi/bin:$PATHexport PKGCONFIG=arm-linux-gnueabi-pkg-configexport PKG_CONFIG=arm-linux-gnueabi-pkg-configexport XML2_CONFIG=/usr/local/arm-linux-gnueabi/bin/xml2-configexport CC=arm-linux-gnueabi-gccexport CXX=arm-linux-gnueabi-g++export LD=arm-linux-gnueabi-ldexport STRIP=arm-linux-gnueabi-stripexport AR=arm-linux-gnueabi-arexport HOST_CC=/usr/bin/gccexport CFLAGS="-fPIC -O2 -D_REENTRANT"export CXXFLAGS="-fPIC -O2 -D_REENTRANT"export PREFIX=/usr/local/arm-linux-gnueabi# turns off silencing of compiler commands in netsurf compilationexport Q=
- compile and
make installnetsurf member libraries- (each time:
make HOST=SamsungDTV; make HOST=SamsungDTV install)
- libparserutils
- libwapcaplet
- libnsbmp
- libnsgif
- libnsfb
- libcss
- hubbub
- (each time:
- compile netsurf
make HOST=SamsungDTV TARGET=framebuffer
Hacking guide
The browser core is in the 'content', 'css,' 'desktop', 'render', and 'image' subdirectories of the project. I have avoided touching it (if possible) while porting the browser for SamyGO.
The GUI and frontend code is in the framebuffer subdirectory. Unfortunately, compared to the other NetSurf ports (see the 'gtk', 'amiga' or 'riscos' subdirs, for example) it's quite incomplete and missing lots of useful features.
I have worked on implementing some of them, but a lot remains to be done (e.g. file downloads and bookmarks).
A good starting point would be the empty functions at the bottom of fb_gui.c.
If you have anything useful, please make a patch towards the latest released source code version (see top of page) and send it to florianfischer at gmx.de.