summaryrefslogtreecommitdiff
path: root/docs/quick-start.md
blob: 449b956a3583e8219f177762600a17222c0b8299 (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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
Quick Build Steps for NetSurf
=============================

Last Updated: 21st January 2020

This document provides steps for building NetSurf.

These instructions use a shell script to perform several operations.
  This script has only been tested with the bash and zsh bourne style
  shell interpreters. The latest version of this script should be
  retrieved from the official NetSurf source repository.

This shell script is used by the NetSurf Developers but you should
  satisfy yourself that the script is not malicious. It should be noted
  that building the browser will also be executing shell code and
  requires a similar level of trust.


Native build
============

Grab a temporary env.sh
-----------------------

     $ wget https://git.netsurf-browser.org/netsurf.git/plain/docs/env.sh
     $ unset HOST
     $ source env.sh


Install any packages you need
-----------------------------

Installs all packages required to build NetSurf and the NetSurf project
libraries.

     $ ns-package-install

If your package manager is not supported, you will have to install third
  party packages manually.


Get the NetSurf project source code from Git
--------------------------------------------

All the sources for the browser and support libraries is available
  from the public git server.

Local copies may be easily obtained with the ns-clone command.

     $ ns-clone


Build and install our project libraries
---------------------------------------

Updates NetSurf project library sources to latest, builds and installs them.

      $ ns-pull-install


Switch to new NetSurf workspace
-------------------------------

Remove the bootstrap script and use the newly installed one

      $ rm env.sh
      $ cd ~/dev-netsurf/workspace
      $ source env.sh


Build and run NetSurf
---------------------

      $ cd netsurf

To build the native front end (the GTK front end on Linux, BSDs, etc)
  you could do:

      $ make
      $ ./nsgtk3

To build the framebuffer front end, you could do:

      $ make TARGET=framebuffer
      $ ./nsfb

More detailed documentation on using the [framebuffer](docs/using-framebuffer.md)
  frontend are available.

Cross Compiling
===============

If you are cross compiling, you can follow the above steps, but when
  sourcing env.sh, you should set HOST environment variable to the
  appropriate triplet for your cross compiler. For example, to cross
  compile for RISC OS:

      $ HOST=arm-unknown-riscos source env.sh

After that, the commands such as `ns-package-install` and
  `ns-pull-install` will do what is appropriate for the platform you are
  building for.

To do the final build of NetSurf, pass the appropriate TARGET to
  make. For example, to cross compile for RISC OS:

      $ make TARGET=riscos

Finally, you can package up your build to transfer to the system you
  are developing for.  For example, to produce a package for RISC OS:

      $ make TARGET=riscos package

Getting a cross compiler set up
-------------------------------

We maintain cross compilation environments and an SDK for a number of
  platforms.  These may be found in our toolchains repository.

      $ git clone git://git.netsurf-browser.org/toolchains

Pre-built versions of the toolchains for 64bit x86 Debian systems are
  available via our [automated build and test
  infrastructure](https://ci.netsurf-browser.org/builds/toolchains/)


Not working?
============

If the above steps are inapplicable, or don't work, you can build
  manually. Follow the instructions in the BUILDING-* documents in the
  docs/ directory the NetSurf browser source tree.