2008-03-21 23:10:23 +03:00
|
|
|
--------------------------------------------------------------------------------
|
2009-07-24 03:25:51 +04:00
|
|
|
Build Instructions for GTK NetSurf 24 July 2009
|
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
|
2009-08-10 17:51:37 +04:00
|
|
|
================================
|
2008-03-30 03:26:37 +04:00
|
|
|
|
2009-03-27 14:23:25 +03:00
|
|
|
First of all, you should examine the contents of Makefile.defaults
|
|
|
|
and enable and disable relevant features as you see fit by creating
|
|
|
|
a Makefile.config file. Some of these options can be automatically
|
|
|
|
detected and used, and where this is the case they are set to such.
|
|
|
|
Others cannot be automatically detected from the Makefile, so you
|
|
|
|
will either need to install the dependencies, or set them to NO.
|
2008-07-29 01:02:20 +04:00
|
|
|
|
2008-11-13 12:22:30 +03:00
|
|
|
You should then obtain NetSurf's dependencies, keeping in mind which options
|
2008-08-12 23:02:20 +04:00
|
|
|
you have enabled in the configuration file. See the next section for
|
|
|
|
specifics.
|
|
|
|
|
2008-07-29 01:02:20 +04:00
|
|
|
Once done, to build GTK NetSurf on a UNIX-like platform, simply run:
|
2008-03-21 23:10:23 +03:00
|
|
|
|
|
|
|
$ make
|
|
|
|
|
2009-03-27 14:23:25 +03:00
|
|
|
If that produces errors, you probably don't have some of NetSurf's
|
|
|
|
build dependencies installed. See "Obtaining NetSurf's dependencies"
|
|
|
|
below. Or turn off the complaining features in a Makefile.config
|
|
|
|
file. 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
|
|
|
|
|
|
|
|
2008-11-13 12:22:30 +03:00
|
|
|
Obtaining NetSurf's build dependencies
|
|
|
|
========================================
|
2008-03-21 23:10:23 +03:00
|
|
|
|
2008-03-30 03:26:37 +04:00
|
|
|
Many of NetSurf's dependencies are packaged on various operating systems.
|
2008-11-13 12:22:30 +03:00
|
|
|
The remainder must be installed manually. Currently, some of the libraries
|
|
|
|
developed as part of the NetSurf project have not had official releases.
|
|
|
|
Hopefully they will soon be released with downloadable tarballs and packaged
|
|
|
|
in common distros. For now, you'll have to make do with svn checkouts.
|
2008-03-30 03:26:37 +04:00
|
|
|
|
2009-03-31 18:15:47 +04:00
|
|
|
Some of NetSurf's own libraries will be installed in /usr/local/ by default.
|
|
|
|
Fedora, and perhaps some other distributions of Linux, do not ship a
|
|
|
|
pkg-config that will search here, so you will either need to change where
|
|
|
|
these libraries install, or do the following before building NetSurf itself;
|
|
|
|
|
2009-03-31 18:19:13 +04:00
|
|
|
$ PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
|
2009-03-31 18:15:47 +04:00
|
|
|
$ export PKG_CONFIG_PATH
|
2008-03-30 03:26:37 +04:00
|
|
|
|
|
|
|
Package installation
|
|
|
|
----------------------
|
2008-03-21 23:10:23 +03:00
|
|
|
|
|
|
|
Debian-like OS:
|
|
|
|
|
|
|
|
$ apt-get install libglade2-dev libcurl3-dev libxml2-dev libmng-dev
|
2009-07-24 03:25:51 +04:00
|
|
|
$ apt-get install librsvg2-dev
|
2008-03-21 23:10:23 +03:00
|
|
|
|
2009-02-22 17:51:44 +03:00
|
|
|
Recent OS versions might need libcurl4-dev instead of libcurl3-dev but
|
|
|
|
note that when it has not been built with OpenSSL, the SSL_CTX is not
|
|
|
|
available and results that certification details won't be presented in case
|
|
|
|
they are invalid. But as this is currently unimplemented in the GTK
|
|
|
|
flavour of NetSurf, this won't make a difference at all.
|
2009-02-02 01:05:56 +03:00
|
|
|
|
2008-03-21 23:10:23 +03:00
|
|
|
Fedora:
|
|
|
|
|
|
|
|
$ yum install libglade2-devel curl-devel libxml2-devel libmng-devel
|
2009-07-24 03:25:51 +04:00
|
|
|
$ yum install librsvg2-devel lcms-devel
|
2008-03-21 23:10:23 +03:00
|
|
|
|
2008-11-13 12:22:30 +03:00
|
|
|
Other:
|
|
|
|
|
2009-07-24 03:25:51 +04:00
|
|
|
You'll need to install the development resources for libglade2, libcurl3,
|
|
|
|
libxml2, libmng and librsvg.
|
2008-11-13 12:22:30 +03:00
|
|
|
|
|
|
|
Note that if you don't require MNG or JNG image support, NetSurf can be
|
|
|
|
configured to use libpng instead of libmng. If you wish to do this, install
|
|
|
|
the libpng development package instead.
|
|
|
|
|
2008-08-12 23:02:20 +04:00
|
|
|
Libnsbmp
|
|
|
|
----------
|
|
|
|
|
|
|
|
NetSurf has its own library for decoding and rendering BMPs, ICOs, etc.
|
|
|
|
You can check it out from svn://svn.netsurf-browser.org/trunk/libnsbmp
|
|
|
|
|
|
|
|
To build and install it:
|
|
|
|
|
|
|
|
$ sudo make install
|
|
|
|
|
|
|
|
Libnsgif
|
|
|
|
----------
|
|
|
|
|
|
|
|
NetSurf has its own library for decoding and rendering GIFs. You can check
|
|
|
|
it out from svn://svn.netsurf-browser.org/trunk/libnsgif
|
|
|
|
|
|
|
|
To build and install it:
|
|
|
|
|
|
|
|
$ sudo make install
|
|
|
|
|
|
|
|
Hubbub
|
|
|
|
--------
|
|
|
|
|
2009-05-15 12:16:00 +04:00
|
|
|
NetSurf requires Hubbub, the project's HTML parser. To build this, you will
|
|
|
|
also require libparserutils. Firstly, check out libparserutils from;
|
2008-08-12 23:02:20 +04:00
|
|
|
|
|
|
|
svn://svn.netsurf-browser.org/trunk/libparserutils
|
|
|
|
|
2009-07-25 01:47:31 +04:00
|
|
|
and do "sudo make install". Once this is built and installed, you can check
|
|
|
|
out and build Hubbub. Check out hubbub from;
|
2008-08-12 23:02:20 +04:00
|
|
|
|
|
|
|
svn://svn.netsurf-browser.org/trunk/hubbub
|
|
|
|
|
2009-07-25 01:47:31 +04:00
|
|
|
and again do "sudo make install".
|
|
|
|
|
|
|
|
LibCSS
|
|
|
|
--------
|
|
|
|
|
|
|
|
NetSurf requires LibCSS, the project's CSS parser and selection engine. To
|
|
|
|
build this, you will also require libwapcaplet. Firstly, check out
|
|
|
|
libwapcaplet from;
|
|
|
|
|
|
|
|
svn://svn.netsurf-browser.org/trunk/libwapcaplet
|
|
|
|
|
|
|
|
and do "sudo make install". Once this is built and installed, you can check
|
|
|
|
out and build LibCSS. Check out LibCSS from;
|
|
|
|
|
|
|
|
svn://svn.netsurf-browser.org/trunk/libcss
|
|
|
|
|
|
|
|
and again do "sudo make install".
|
2008-03-30 03:26:37 +04:00
|
|
|
|
|
|
|
Librosprite
|
|
|
|
-------------
|
|
|
|
|
2009-03-27 14:23:25 +03:00
|
|
|
NetSurf uses James Shaw's librosprite for rendering RISC OS Sprite
|
|
|
|
files on non-RISC OS platforms. The Makefile will automatically use
|
|
|
|
librosprite if it is installed. You can disable it entirely by
|
|
|
|
creating a Makefile.config file.
|
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.
|
2009-03-27 14:23:25 +03:00
|
|
|
If you wish to disable it, do so by creating a Makefile.config file.
|
2008-07-26 22:12:04 +04:00
|
|
|
|
2009-02-02 01:05:56 +03:00
|
|
|
Haru PDF can be obtained from http://libharu.org/, although we currently
|
|
|
|
depend on features that none of the official released versions does have.
|
|
|
|
The current development versions of libharu are fine and we anticipate
|
|
|
|
the libharu 2.2 release will be fine for NetSurf usage.
|
|
|
|
A recently taken snapshot of one of those libharu development versions can
|
|
|
|
be found at:
|
2008-07-30 16:02:10 +04:00
|
|
|
|
2009-02-01 23:18:39 +03:00
|
|
|
svn://svn.netsurf-browser.org/trunk/libharu
|
2008-03-30 03:26:37 +04:00
|
|
|
|
|
|
|
|
|
|
|
General requirements
|
|
|
|
----------------------
|
|
|
|
|
2008-10-13 19:03:19 +04:00
|
|
|
NetSurf requires at minimum GTK 2.12. 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-10-13 19:03:19 +04:00
|
|
|
versions of GTK 2.12 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.
|
2008-07-29 01:02:20 +04:00
|
|
|
|