2008-03-21 23:10:23 +03:00
|
|
|
--------------------------------------------------------------------------------
|
2008-07-26 22:12:04 +04:00
|
|
|
Build Instructions for GTK NetSurf 26 July 2008
|
2008-03-21 23:10:23 +03:00
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
2008-03-30 03:26:37 +04:00
|
|
|
This document provides instructions for building the GTK version of NetSurf
|
|
|
|
and provides guidance on obtaining NetSurf's build dependencies.
|
|
|
|
|
|
|
|
GTK NetSurf has been tested on Debian, Ubuntu, Fedora 8, FreeBSD, NetBSD and
|
|
|
|
Solaris 10.
|
|
|
|
|
|
|
|
|
|
|
|
Building and executing NetSurf
|
|
|
|
=================================
|
|
|
|
|
2008-03-21 23:10:23 +03:00
|
|
|
To build GTK NetSurf on a UNIX-like platform, provided you have the relevant
|
|
|
|
build dependencies installed, simply run:
|
|
|
|
|
|
|
|
$ make
|
|
|
|
|
2008-03-22 02:47:23 +03:00
|
|
|
If that produces errors, you probably don't have some of NetSurf's build
|
2008-03-25 07:48:46 +03:00
|
|
|
dependencies installed. See "Obtaining NetSurf's dependencies" below. You
|
|
|
|
may need to "make clean" before attempting to build after installing the
|
|
|
|
dependencies.
|
2008-03-22 02:47:23 +03:00
|
|
|
|
2008-03-30 03:26:37 +04:00
|
|
|
Run NetSurf by executing the "netsurf" shell script:
|
2008-03-21 23:10:23 +03:00
|
|
|
|
|
|
|
$ ./netsurf
|
|
|
|
|
|
|
|
This script makes it easy to run the nsgtk binary from the build tree. It
|
2008-03-21 23:27:39 +03:00
|
|
|
sets up some environment variables which enable NetSurf to find its
|
|
|
|
resources.
|
2008-03-21 23:10:23 +03:00
|
|
|
|
2008-03-30 03:26:37 +04:00
|
|
|
If you are packaging NetSurf, see the PACKAGING-GTK document.
|
2008-03-21 23:10:23 +03:00
|
|
|
|
|
|
|
|
|
|
|
Obtaining NetSurf's dependencies
|
|
|
|
==================================
|
|
|
|
|
2008-03-30 03:26:37 +04:00
|
|
|
Many of NetSurf's dependencies are packaged on various operating systems.
|
|
|
|
The remainder must be installed manually.
|
|
|
|
|
|
|
|
|
|
|
|
Package installation
|
|
|
|
----------------------
|
2008-03-21 23:10:23 +03:00
|
|
|
|
|
|
|
Debian-like OS:
|
|
|
|
|
|
|
|
$ apt-get install libglade2-dev libcurl3-dev libxml2-dev libmng-dev
|
|
|
|
$ apt-get install librsvg2-dev lemon re2c
|
|
|
|
|
|
|
|
Fedora:
|
|
|
|
|
|
|
|
$ yum install libglade2-devel curl-devel libxml2-devel libmng-devel
|
|
|
|
$ yum install librsvg2-devel lcms-devel re2c
|
|
|
|
|
2008-03-30 03:26:37 +04:00
|
|
|
|
|
|
|
Librosprite
|
|
|
|
-------------
|
|
|
|
|
2008-07-26 22:12:04 +04:00
|
|
|
NetSurf uses James Shaw's librosprite for rendering RISC OS Sprite files on
|
|
|
|
non-RISC OS platforms. The Makefile will automatically use it if it can find
|
|
|
|
it. You can disable it entirely by editing Makefile.config.
|
2008-03-30 03:26:37 +04:00
|
|
|
|
|
|
|
To build librosprite, check out from svn://svn.rjek.com/jshaw/libsprite/trunk
|
|
|
|
Build and install it:
|
|
|
|
|
|
|
|
$ sudo make install
|
|
|
|
|
|
|
|
Optionally, specify an install prefix:
|
|
|
|
|
|
|
|
$ PREFIX=/path/to/install make install
|
|
|
|
|
2008-07-26 22:12:04 +04:00
|
|
|
Libhpdf
|
|
|
|
---------
|
|
|
|
|
|
|
|
NetSurf can use Haru PDF to enable PDF export and printing in GTK. This
|
|
|
|
is currently enabled by default, and cannot be auto-detected by the Makefile.
|
|
|
|
If you wish to disable it, do so by editing Makefile.config.
|
|
|
|
|
|
|
|
Haru PDF can be obtained from http://libharu.sourceforge.net/
|
2008-03-30 03:26:37 +04:00
|
|
|
|
|
|
|
Lemon
|
|
|
|
-------
|
|
|
|
|
2008-03-21 23:27:39 +03:00
|
|
|
If your distribution does not package 'lemon' (Fedora doesn't) then you'll
|
|
|
|
need to download it and build it yourself. You may find it comes with the
|
|
|
|
SQLite packages (SQLite's parser is built with lemon). If not, try this:
|
2008-03-21 23:10:23 +03:00
|
|
|
|
|
|
|
$ mkdir -p /usr/local/share/lemon
|
|
|
|
$ wget http://www.sqlite.org/cvstrac/getfile/sqlite/tool/lemon.c
|
|
|
|
$ wget -O /usr/local/share/lemon/lempar.c http://www.sqlite.org/cvstrac/getfile/sqlite/tool/lempar.c
|
|
|
|
$ sed -e's!lempar.c!/usr/local/share/lemon/lempar.c!' lemon.c > lem.c
|
|
|
|
$ gcc -o /usr/local/bin/lemon lem.c
|
|
|
|
|
2008-03-30 03:26:37 +04:00
|
|
|
|
|
|
|
General requirements
|
|
|
|
----------------------
|
|
|
|
|
2008-07-26 22:12:04 +04:00
|
|
|
NetSurf requires at minimum GTK 2.10. Earlier versions will not work. It also
|
2008-03-21 23:10:23 +03:00
|
|
|
depends on Cairo for rendering, but you should have this already with
|
2008-07-26 22:12:04 +04:00
|
|
|
versions of GTK 2.10 or later.
|
2008-03-21 23:10:23 +03:00
|
|
|
|
|
|
|
This will pull in loads of things, like all the GTK dev libraries, the PNG
|
|
|
|
and JPEG libraries, colour management libraries, zlib, OpenSSL etc that
|
|
|
|
NetSurf also depends on.
|