2017-06-09 19:28:55 +03:00
|
|
|
Quick Build Steps for NetSurf
|
|
|
|
=============================
|
|
|
|
|
2020-01-21 23:55:34 +03:00
|
|
|
Last Updated: 21st January 2020
|
2017-06-09 19:28:55 +03:00
|
|
|
|
|
|
|
This document provides steps for building NetSurf.
|
|
|
|
|
2020-01-21 23:55:34 +03:00
|
|
|
These instructions use a shell script to perform several operations.
|
2020-01-26 18:52:27 +03:00
|
|
|
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.
|
2020-01-21 23:55:34 +03:00
|
|
|
|
|
|
|
This shell script is used by the NetSurf Developers but you should
|
2020-01-26 18:52:27 +03:00
|
|
|
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.
|
2020-01-21 23:55:34 +03:00
|
|
|
|
|
|
|
|
2018-05-10 15:34:33 +03:00
|
|
|
Native build
|
|
|
|
============
|
2017-06-09 19:28:55 +03:00
|
|
|
|
|
|
|
Grab a temporary env.sh
|
|
|
|
-----------------------
|
|
|
|
|
2018-07-17 22:46:11 +03:00
|
|
|
$ wget https://git.netsurf-browser.org/netsurf.git/plain/docs/env.sh
|
2018-05-10 15:34:33 +03:00
|
|
|
$ unset HOST
|
2017-06-09 19:28:55 +03:00
|
|
|
$ 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
|
|
|
|
--------------------------------------------
|
|
|
|
|
2018-05-10 15:34:33 +03:00
|
|
|
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.
|
|
|
|
|
2017-06-09 19:28:55 +03:00
|
|
|
$ 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
|
|
|
|
-------------------------------
|
|
|
|
|
2018-05-10 15:34:33 +03:00
|
|
|
Remove the bootstrap script and use the newly installed one
|
2017-06-09 19:28:55 +03:00
|
|
|
|
|
|
|
$ rm env.sh
|
|
|
|
$ cd ~/dev-netsurf/workspace
|
|
|
|
$ source env.sh
|
|
|
|
|
|
|
|
|
|
|
|
Build and run NetSurf
|
|
|
|
---------------------
|
|
|
|
|
|
|
|
$ cd netsurf
|
|
|
|
|
2018-05-10 15:34:33 +03:00
|
|
|
To build the native front end (the GTK front end on Linux, BSDs, etc)
|
|
|
|
you could do:
|
2017-06-09 19:28:55 +03:00
|
|
|
|
|
|
|
$ make
|
|
|
|
$ ./nsgtk
|
|
|
|
|
|
|
|
To build the framebuffer front end, you could do:
|
|
|
|
|
|
|
|
$ make TARGET=framebuffer
|
|
|
|
$ ./nsfb
|
|
|
|
|
|
|
|
|
|
|
|
Cross Compiling
|
|
|
|
===============
|
|
|
|
|
|
|
|
If you are cross compiling, you can follow the above steps, but when
|
2018-05-10 15:34:33 +03:00
|
|
|
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:
|
2017-06-09 19:28:55 +03:00
|
|
|
|
|
|
|
$ HOST=arm-unknown-riscos source env.sh
|
|
|
|
|
|
|
|
After that, the commands such as `ns-package-install` and
|
2018-05-10 15:34:33 +03:00
|
|
|
`ns-pull-install` will do what is appropriate for the platform you are
|
|
|
|
building for.
|
2017-06-09 19:28:55 +03:00
|
|
|
|
2018-05-10 15:34:33 +03:00
|
|
|
To do the final build of NetSurf, pass the appropriate TARGET to
|
|
|
|
make. For example, to cross compile for RISC OS:
|
2017-06-09 19:28:55 +03:00
|
|
|
|
|
|
|
$ make TARGET=riscos
|
|
|
|
|
|
|
|
Finally, you can package up your build to transfer to the system you
|
2018-05-10 15:34:33 +03:00
|
|
|
are developing for. For example, to produce a package for RISC OS:
|
2017-06-09 19:28:55 +03:00
|
|
|
|
|
|
|
$ make TARGET=riscos package
|
|
|
|
|
|
|
|
Getting a cross compiler set up
|
|
|
|
-------------------------------
|
|
|
|
|
|
|
|
We maintain cross compilation environments and an SDK for a number of
|
2018-05-10 15:34:33 +03:00
|
|
|
platforms. These may be found in our toolchains repository.
|
2017-06-09 19:28:55 +03:00
|
|
|
|
|
|
|
$ git clone git://git.netsurf-browser.org/toolchains
|
|
|
|
|
2018-05-10 15:34:33 +03:00
|
|
|
Pre-built versions of the toolchains for 64bit x86 Debian systems are
|
|
|
|
available via our [automated build and test
|
2018-07-17 22:46:11 +03:00
|
|
|
infrastructure](https://ci.netsurf-browser.org/builds/toolchains/)
|
2017-06-09 19:28:55 +03:00
|
|
|
|
|
|
|
|
|
|
|
Not working?
|
|
|
|
============
|
|
|
|
|
2018-05-10 15:34:33 +03:00
|
|
|
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.
|
2017-06-09 19:28:55 +03:00
|
|
|
|