summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Docs/BUILDING-GTK164
1 files changed, 116 insertions, 48 deletions
diff --git a/Docs/BUILDING-GTK b/Docs/BUILDING-GTK
index 4641924f8..3c104a157 100644
--- a/Docs/BUILDING-GTK
+++ b/Docs/BUILDING-GTK
@@ -6,46 +6,27 @@
and provides guidance on obtaining NetSurf's build dependencies.
GTK NetSurf has been tested on Debian, Ubuntu, Fedora 8, FreeBSD, NetBSD and
- Solaris 10.
+ Solaris 10. NetSurf requires at minimum GTK 2.12.
- Building and executing NetSurf
-================================
+ Quick Start
+=============
- 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.
-
- You should then obtain NetSurf's dependencies, keeping in mind which options
- you have enabled in the configuration file. See the next section for
- specifics.
-
- Once done, to build GTK NetSurf on a UNIX-like platform, simply run:
+ See the QUICK-START document, which provides a simple environment with
+ which you can fetch, build and install NetSurf's dependencies.
- $ make
+ Following the QUICK-START is the recommended way to build NetSurf.
- 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.
-
- Run NetSurf by executing the "test-nsgtk" shell script:
-
- $ ./test-nsgtk
- 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.
+ Manual building
+=================
- If you are packaging NetSurf, see the PACKAGING-GTK document.
+ If you can't follow the quick start instructions, you will have to build
+ NetSurf manually. The instructions for doing this are given below.
- Obtaining NetSurf's build dependencies
-========================================
+ Obtaining the build dependencies
+----------------------------------
Many of NetSurf's dependencies are packaged on various operating systems.
The remainder must be installed manually. Currently, some of the libraries
@@ -62,7 +43,7 @@
$ export PKG_CONFIG_PATH
Package installation
-----------------------
+ --------------------
Debian-like OS:
@@ -92,6 +73,59 @@
You'll need to install the development resources for libglade2, libcurl3,
libpng and librsvg.
+ Libharu
+ -------
+
+ NetSurf can use Haru PDF to enable PDF export. Haru PDF can be obtained
+ from http://libharu.org/. We require libharu 2.2 or later.
+
+ | Note: libharu cannot be auto-detected by the Makefile. If you wish to
+ | enable it, do so by creating a Makefile.config file.
+
+
+ Preparing your workspace
+--------------------------
+
+ NetSurf has a number of libraries which must be built in-order and
+ installed into your workspace. Each library depends on a core build
+ system which NetSurf projects use. This build system relies on the
+ presence of things like pkg-config to find libraries and also certain
+ environment variables in order to work correctly.
+
+ Assuming you are preparing a workspace in /home/netsurf/workspace then
+ the following steps will set you up:
+
+ Make the workspace directory and change to it
+ ---------------------------------------------
+
+ $ mkdir -p ${HOME}/netsurf/workspace
+ $ cd ${HOME}/netsurf/workspace
+
+ Make the temporary install space
+ --------------------------------
+
+ $ mkdir inst
+
+ Make an environment script
+ --------------------------
+ $ cat > env.sh <<'EOF'
+ export PKG_CONFIG_PATH=${HOME}/netsurf/workspace/inst/lib/pkgconfig::
+ export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${HOME}/netsurf/workspace/inst/lib
+ export PREFIX=${HOME}/netsurf/workspace/inst
+ EOF
+
+ Change to workspace and source the environment
+ ----------------------------------------------
+
+ Whenever you wish to start development in a new shell, run the following:
+
+ $ cd ${HOME}/netsurf/workspace
+ $ source env.sh
+
+ From here on, any commands in this document assume you have sourced your
+ shell environment.
+
+
The NetSurf project's libraries
---------------------------------
@@ -107,12 +141,12 @@
LibROSprite -- RISC OS Sprite format image decoder
To fetch each of these libraries, run the appropriate commands from the
- Docs/LIBRARIES file.
+ Docs/LIBRARIES file, from within your workspace directory.
To build and install these libraries, simply enter each of their directories
and run:
- $ sudo make install
+ $ make install
| Note: We advise enabling iconv() support in libparserutils, which vastly
| increases the number of supported character sets. To do this,
@@ -123,22 +157,56 @@
|
| For more information, consult the libparserutils README file.
- Libharu
----------
+ Now you should have all the NetSurf project libraries built and installed.
- NetSurf can use Haru PDF to enable PDF export. Haru PDF can be obtained
- from http://libharu.org/. We require libharu 2.2 or later.
- | Note: libharu cannot be auto-detected by the Makefile. If you wish to
- | enable it, do so by creating a Makefile.config file.
+ Getting the NetSurf source
+----------------------------
+
+ From your workspace directory, run the following command to get the NetSurf
+ source:
- General requirements
-----------------------
+ $ git clone git://git.netsurf-browser.org/netsurf.git
- NetSurf requires at minimum GTK 2.12. Earlier versions will not work. It also
- depends on Cairo for rendering, but you should have this already with
- versions of GTK 2.12 or later.
+ And change to the 'netsurf' directory:
+
+ $ cd netsurf
+
+ Building and executing NetSurf
+--------------------------------
+
+ 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.
+
+ You should then obtain NetSurf's dependencies, keeping in mind which options
+ you have enabled in the configuration file. See the next section for
+ specifics.
+
+ Once done, to build GTK NetSurf on a UNIX-like platform, 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. 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.
+
+ Run NetSurf by executing the "test-nsgtk" shell script:
+
+ $ ./test-nsgtk
+
+ 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.
+
+
+ Note for packagers
+====================
+
+ If you are packaging NetSurf, see the PACKAGING-GTK document.
- 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.