summaryrefslogtreecommitdiff
path: root/documentation/buildingforriscosquickstart.mdwn
blob: 5a4d53a7dea2e7a6428669f7f8fe55be6fd8001d (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
[[!meta title="Documentation/BuildingForRISCOSQuickStart"]]
[[!meta author="Sprow"]]
[[!meta date="2015-08-11T21:40:32Z"]]


[[!toc]]

<strong>Note:</strong>  
<span style="text-indent:2em; display: inline-block;">Commands proceeded
by \# should be done as root</span>  
<span style="text-indent:2em; display: inline-block;">Commands proceeded
by \$ should be done as your normal user</span>  
Depending on how your system is configured you may need to log in as
root, or you may be able to use sudo.

Building for the first time
---------------------------

### Install Debian or Ubuntu in a Virtual Machine, such as Virtual Box or kvm.

Follow the rest of these instructions inside it.

An example [guide for installing Debian in virtualbox on
windows](http://www.brianlinkletter.com/installing-debian-linux-in-a-virtualbox-virtual-machine/)
is linked here, however this is for Debian 6 but if followed current
Debian (version 8) should be installed.

### Get a copy of env.sh, which manages a build environment for you, and have it install the dependencies.

`$ wget `[`http://git.netsurf-browser.org/netsurf.git/plain/Docs/env.sh`](http://git.netsurf-browser.org/netsurf.git/plain/Docs/env.sh)  
`# source env.sh`  
`# ns-package-install`

### Download and install the latest arm-unknown-riscos toolchain from <http://ci.netsurf-browser.org/builds/toolchains/>

<strong>Note :</strong>  
The pre-compiled toolchains are for x86\_64 (64 bit x86 processors) and
therefore require the Virtual Machine be installed 64Bit

`$ wget `[`http://ci.netsurf-browser.org/builds/toolchains/arm-unknown-riscos-2015-03-19_14-33-21.tar.xz`](http://ci.netsurf-browser.org/builds/toolchains/arm-unknown-riscos-2015-03-19_14-33-21.tar.xz)  
`# tar xvf arm-unknown-riscos-2015-01-15_13-14-02.tar.xz -C /`

### Clone all the NetSurf repositories. This creates a workspace for you to work in, /home/yourname/dev-netsurf/workspace

`$ TARGET_ABI=arm-unknown-riscos source env.sh`  
`$ ns-clone`

### Build and install the libraries

`$ ns-pull-install`

### Switch to your newly created NetSurf workspace

`$ rm env.sh`  
`$ cd ~/dev-netsurf/workspace`  
`$ TARGET_ABI=arm-unknown-riscos source env.sh`

### Build NetSurf

`$ cd netsurf`  
`$ make TARGET=riscos`

### Zip up the build for transfer to your RISC OS machine

`$ make TARGET=riscos package`

You can alternatively use Sunfish to access your VM via NFS and run your
build directly, but that is outside the scope of this document.

To confirm you're running what you just build, you can visit
<about:testament> in NetSurf to view information about the build.

Updating and building again
---------------------------

Next time you come to build NetSurf, remember to execute this before
working with the workspace:

`$ TARGET_ABI=arm-unknown-riscos source env.sh`

You can re-pull and re-install the libraries (to get the latest
versions) by simply reexecuting this:

` $ ns-pull-install`