Skip to content
Stefan Hirschmann edited this page Aug 17, 2022 · 14 revisions

If you want to build NBFC from source, the first thing you have to do is to download the source code. You can easily clone the NBFC repository via git:
git clone https://github.com/hirschmann/nbfc.git

Then, check out the stable branch if you want to build the latest stable version:
git checkout stable

If you want to build the latest beta, check out the beta branch:
git checkout beta

If you want to build a specific version of NBFC, check out one of the versions listed at the tags page, e.g.:
git checkout 1.6-beta1

If you aren't familiar with git you can download the source code for any version of NBFC from the releases page.

Build on Windows

Make sure these packages are installed on your machine:

To build the solution, run the build.ps1 script (which is included in the cloned repo) via Windows Powershell.
If the build was successful there should be a setup file (NbfcBootstrapper.exe) at nbfc\Windows\Setup\NbfcBootstrapper\bin\Release\.

Build on Linux

Make sure the Mono runtime + development tools are installed on your machine (Debian based distros: mono-complete, Arch based distros: mono). To build the solution, run the build.sh script (which is included in the cloned repo).
The result can be found at nbfc/Linux/bin/Release.

In case you encounter build errors, try to update the Mono runtime, either via your distro's package manager, or following these instructions: http://www.mono-project.com/download/

Ubuntu

The version of the Mono package (mono-complete) shipped with Ubuntu 18.04 is too old (version 4.6.2) to build NBFC. You need to install the latest version from the Mono project page, as follows:

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb https://download.mono-project.com/repo/ubuntu stable-bionic main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
sudo apt update
sudo apt install mono-complete

Fedora / CentOS / RHEL / Scientific Linux

For 2018 and later versions, use:

sudo dnf install mono mono-devel

For older versions, use:

sudo yum install mono mono-devel

IMPORTANT Recent RedHat/Fedora family operating systems have significantly locked down the way signing certificates are managed, and this will break part of the build script if it is run without superuser privileges. Since running an entire build "sudo" is a good way to find hell without a map, you should do this instead, prior to building:

sudo cert-sync /etc/pki/tls/certs/ca-bundle.crt

Build on Linux via Docker

If you cannot build nbfc with your local mono installation for some reason or you don't want to install mono locally, it might be a good option to build it via docker:

  1. First, you need to install docker on your computer (see the official documentation)
  2. Clone the nbfc repository:
git clone https://github.com/hirschmann/nbfc.git nbfc
  1. Start mono docker image:
docker run -it -v $(pwd)/nbfc:/nbfc mono:latest bash

This pulls and runs the latest mono docker image with the current nbfc directory mounted into the container. Then, once the shell of the docker container opens, change to the mounted nbfc directory using cd /nbfc/ and build by executing ./build.sh. After building nbfc finished, exit the shell via exit and check your local directory for content in nbfc/Linux/bin/Release/