summaryrefslogtreecommitdiff
path: root/Docs/BUILDING-GTK
blob: 3e940b00a4fbac5032aa2f3eadc145e0cf3cecb2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
--------------------------------------------------------------------------------
  Build Instructions for GTK NetSurf                             29 March 2008
--------------------------------------------------------------------------------

  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
=================================

  To build GTK NetSurf on a UNIX-like platform, provided you have the relevant
  build dependencies installed, simply run:

      $ make

  If that produces errors, you probably don't have some of NetSurf's build
  dependencies installed. See "Obtaining NetSurf's dependencies" below. You
  may need to "make clean" before attempting to build after installing the 
  dependencies.

  Run NetSurf by executing the "netsurf" shell script:

      $ ./netsurf

  This script makes it easy to run the nsgtk binary from the build tree. It
  sets up some environment variables which enable NetSurf to find its
  resources.

  If you are packaging NetSurf, see the PACKAGING-GTK document.


  Obtaining NetSurf's dependencies
==================================

  Many of NetSurf's dependencies are packaged on various operating systems.
  The remainder must be installed manually.


  Package installation
----------------------

  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


  Librosprite
-------------

  Sprite file support is enabled by default. This requires librosprite to be
  built and installed. If you don't want to do this, remove all references to
  librosprite in the Makefile and remove the following line from utils/config.h:

      #define WITH_NSSPRITE

  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


  Lemon
-------

  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:

      $ 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


  General requirements
----------------------

  NetSurf requires at minimum GTK 2.8. Earlier versions will not work. It also
  depends on Cairo for rendering, but you should have this already with
  versions of GTK 2.8 or later.

  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.