<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
        "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>NetSurf | Building NetSurf on RISC OS</title>
<link rel="stylesheet" type="text/css" href="netsurf">
</head>

<body>
<p class="banner"><a href="intro_en"><img src="netsurf_png" alt="NetSurf: Web Browser for RISC OS"></a></p>

<h1>Building NetSurf on RISC OS</h1>

<ul>
<li><a href="#Overview">Overview</a></li>
<li><a href="#Requirements">Requirements</a></li>
<li><a href="#QuickStart">Quick Start</a></li>
<li><a href="#UnpackingTheLibraries">Fetching and Unpacking the Libraries</a></li>
<li><a href="#AcquiringAndCompilingTheSource">Acquiring and Compiling the source</a></li>
</ul>

<p class="updated">Last updated 10th September 2006</p>

<h2 id="Overview">Overview</h2>

<p>This document outlines the process required to get a build system for NetSurf set up on a RISC OS machine.</p>

<h2 id="Requirements">Requirements</h2>

<ul>
<li>A Filing System which supports long filenames</li>
<li>!GCC 3.4.6 release 2 or later (<a href="http://gccsdk.riscos.info/">http://gccsdk.riscos.info/</a>)</li>
<li>OSLib 6.80 or later (<a href="http://ro-oslib.sf.net/">http://ro-oslib.sf.net/</a>)</li>
<li>Perl 5.8.8 or later (<a href="http://www.cp15.org/programming/">http://www.cp15.org/programming/</a>)</li>
<li>RISC OS SVN client (<a href="http://www.cp15.org/versioncontrol/">http://www.cp15.org/versioncontrol/</a>)</li>
</ul>

<h2 id="QuickStart">Quick Start</h2>

<p>This section details quick-start instructions for getting NetSurf compiled under RISC OS. If you want more detail, see the rest of this document.</p>

<ol>
<li>Download and install the <a href="#Requirements">requirements</a> listed above.</li>
<li>Download and install the pre-assembled <a href="nstools.zip">tool and library tree (2.3MB)</a>.</li>
<li>Force the RISC OS SVN client to handle ,xxx extensions correctly by issuing <code>*Set svn$filetypeext &quot;&quot;</code>.</li>
<li>Check out the latest source code from SVN. (<pre>svn co svn://svn.netsurf-browser.org/trunk/netsurf</pre>)</li>
<li>Set the CSD appropriately, set the next slot to 6000k and invoke <code>make</code> from a TaskWindow.</li>
</ol>

<h2 id="UnpackingTheLibraries">Fetching and Unpacking the Libraries</h2>

<ol>
<li>Download and unpack the pre-assembled <a href="nstools.zip">tool and library tree (2.3MB)</a>.</li>
<li>Double-click on !NSTools to open the tree.</li>
<li>Consult the !NSTools.!Help file in conjunction with <a href="http://netsurf.strcprstskrzkrk.co.uk/developer/">http://netsurf.strcprstskrzkrk.co.uk/developer/</a> in order to determine if any libraries need updating.</li>
<li>If necessary, merge any updated libraries into the !NSTools directory structure, renaming files into RISC OS format as appropriate (i.e. <code>foo/h</code> becomes <code>h.foo</code>). This should produce a directory tree like:

<div><object data="webimages/library2.png" type="image_png"><pre>    !NSTools
      |
      | -- include
      |       |
      |       | -- curl
      |       |     |
      |       |     | -- h
      |       |
      |       | -- h
      |       |
      |       | -- libjpeg
      |       |      |
      |       |      | -- h
      |       |
      |       | -- libxml
      |       |      |
      |       |      | -- h
      |       |
      |       | -- openssl
      |       |      |
      |       |      | -- h
      |
      | -- lib</pre></object></div>

with the headers in the &quot;h&quot; directories. [This step may not be required, depending upon the naming format used for the pre-built libraries]
</li>
<li>Remove any filename extensions from the files in the lib directory 
   (e.g. <code>libxml2/a</code> becomes <code>libxml2</code>)</li>
</ol>

<h2 id="AcquiringAndCompilingTheSource">Acquiring and Compiling the source</h2>

<ol>
<li>Force the RISC OS SVN client to handle ,xxx extensions correctly by issuing <code>*Set svn$filetypeext &quot;&quot;</code>. (This may be set permanently by uncommenting the appropriate line in !SVN's !Boot file)</li>
<li>Use the RISC OS SVN client to check the source out from SVN, using the following command:

<pre>svn checkout svn://svn.netsurf-browser.org/trunk/netsurf</pre>

This will check the latest sources out into a subfolder in the currently selected directory (CSD) entitled &quot;netsurf&quot;. This folder is the root of the source tree. Diagrammatically:
   
<div><object data="webimages/netsurftree1.png" type="image_png"><pre>     netsurf
       |
       | -- !NCNetSurf
       | -- !NetSurf
       | -- content
       | -- css
       | -- debug
       | -- desktop
       | -- gtk
       | -- Docs
       | -- image
       | -- render
       | -- riscos
       | -- utils</pre></object></div>
       
<!-- Alternatively, use the RISC OS CVS GUI.  Create a new project and enter the details:
<dl><dt>Transport</dt><dd>pserver</dd>
<dt>Username</dt><dd>anonymous</dd>
<dt>Hostname</dt><dd>semichrome.net</dd>
<dt>Password</dt><dd>(leave blank)</dd>
<dt>Port</dt><dd>2401</dd>
<dt>CVSRoot Dir</dt><dd>/home/netsurf/cvs</dd>
<dt>Repository</dt><dd>netsurf</dd>
<dt>Local Dir</dt><dd>(choose a location on your local disc)</dd>
</dl>
   
In the Options dialog box, ensure <em>Add &quot;,xyz&quot; suffix</em> is not checked, and enter <code>a:c:cc:f:h:i:ii:l:o:p:s:y</code> in the text field.
</li>-->

<li>Set the netsurf directory as your CSD, set the next slot to 6000k and invoke <code>make</code> from a TaskWindow</li>
<li>Go and make a cup of tea whilst the build happens (it takes approximately 30 minutes on a StrongARM RiscPC)</li>
</ol>

<div class="footer">
<p class="breadcrumbs"><a href="intro_en">NetSurf</a>  <a href="develop_en"> Development Information</a>  Building NetSurf on RISC OS</p>
<p class="sourceforge"><a href="http://sourceforge.net/"><img src="http://sourceforge.net/sflogo.php?group_id=51719&amp;type=1" alt="SourceForge.net"></a></p>
</div>

</body>
</html>
