Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1. --------------------------------------------------------------------------------
  2.   Build Instructions for RISC OS NetSurf                          16 July 2012
  3. --------------------------------------------------------------------------------
  4.  
  5.   This document provides instructions for building the RISC OS NetSurf
  6.   natively on a RISC OS computer and provides guidance on obtaining NetSurf's
  7.   build dependencies.
  8.  
  9.   RISC OS NetSurf should work on RISC OS 4.02 and above.
  10.  
  11.   | Note: This guide assumes that you have the RISC OS SVN client installed,
  12.   |       and that you have used it to fetch the NetSurf source.  It also
  13.   |       assumes that you have the following requirements installed:
  14.   |
  15.   |           + OSLib 6.80 or later
  16.   |           + Perl 5.8.8 or later
  17.   |           + GCC 3.4.6 release 3 or later
  18.   |           + The latest NSTools
  19.  
  20.   If you want to cross-compile NetSurf for RISC OS, use the BUILDING-ROCross
  21.   document.
  22.  
  23.  
  24.   Building and executing NetSurf
  25. ================================
  26.  
  27.   | Note: The version of make supplied with RISC OS GCC 3 is old and has a bug
  28.   |       that prevents NetSurf from building.  Either ensure that NSTools is
  29.   |       seen before GCC, or replace the make inside "!GCC.bin" with the make
  30.   |       from "!NSTools.bin".
  31.   |       The minimum version of make that works is v3.81.  You can check what
  32.   |       version you have by running, '*make --version'.
  33.  
  34.   | Note: The pre-built libraries currently supplied in NSTools are AOF format,
  35.   |       and will not work with GCC4, which requires them to be in ELF format.
  36.   |       If you want to build NetSurf with GCC4, you will need to build the
  37.   |       libraries yourself.  See "Obtaining NetSurf's dependencies" below for
  38.   |       details.
  39.  
  40.   You can examine the contents of Makefile.defaults and enable and disable
  41.   features as you see fit by creating a Makefile.config file.  The default
  42.   settings will work fine.
  43.  
  44.   You should then obtain NetSurf's dependencies, keeping in mind which options
  45.   you have enabled in the configuration file.  See the next section for
  46.   specifics.
  47.  
  48.   Once done, to build RISC OS NetSurf on a RISC OS system, set the CSD to the
  49.   directory containing the NetSurf sources, set the next slot to at least
  50.   6000K, and in a TaskWindow, simply run:
  51.  
  52.       *make
  53.  
  54.   If that produces errors, you probably don't have some of NetSurf's build
  55.   dependencies installed, or your libraries may be out of date.
  56.  
  57.   See "Obtaining NetSurf's dependencies" below.  Or turn off the complaining
  58.   features in a Makefile.config file.  You may need to "make clean" before
  59.   attempting to build after installing the dependencies.
  60.  
  61.   Once NetSurf is compiled, the !RunImage is put into the !NetSurf
  62.   application directory, so you can simply double click it as normal.
  63.  
  64.   To confirm that you're running your own development NetSurf build, view the
  65.   Info window from the NetSurf iconbar menu.  The Version string should read
  66.  
  67.       #.0 (Development)
  68.  
  69.   where # is the next major release version number.
  70.  
  71.  
  72.   Obtaining NetSurf's build dependencies
  73. ========================================
  74.  
  75.   NSTools contains all of the tools needed to build NetSurf, such as make,
  76.   uname and ccres.  It also contains pre-built libraries.
  77.  
  78.   Currently NSTools contains libraries which are in a format that are in a
  79.   format which is compatible with RISC OS GCC3 but not RISC OS GCC4.  Until
  80.   NSTools is updated with GCC4 compatible libraries, it is recommended that
  81.   you use GCC3 for native builds.
  82.  
  83.   The NSTools on the web site is not auto-built, so it may not always have
  84.   the latest versions of the NetSurf project's own libraries.  In this case
  85.   you will need to build the libraries yourself and update your copy of
  86.   NSTools.
  87.  
  88.   Fetching the sources
  89. ----------------------
  90.  
  91.   Use SVN to obtain the latest versions of each of the libraries.  To do this,
  92.   set the CSD to a directory where you want to keep your copies of the library
  93.   sources, and run the appropriate commands from the Docs/LIBRARIES file.
  94.  
  95.   The above will create a directory for each of the libraries containing their
  96.   sources.
  97.  
  98.   | Note: We advise enabling iconv() support in libparserutils, which vastly
  99.   |       increases the number of supported character sets.  To do this,
  100.   |       create a file called Makefile.config.override in the libparserutils
  101.   |       directory, containing the following line:
  102.   |
  103.   |           CFLAGS += -DWITH_ICONV_FILTER
  104.   |
  105.   |       For more information, consult the libparserutils README file.
  106.  
  107.   Updating NSTools' copies of the libraries
  108. -------------------------------------------
  109.  
  110.   Set the CSD to the directory of the library you want to build, set your next
  111.   slot to at least 6000K and in a TaskWindow, run
  112.  
  113.       *svn update
  114.  
  115.   This updates your local copy of the source to the latest version.  To build
  116.   and install the library into NSTools, run:
  117.  
  118.       *make install
  119.  
  120.   | Note: If you are using GCC3, you may get a warning from AR when you run
  121.   |       make.  This can be ignored.
  122.