-
Notifications
You must be signed in to change notification settings - Fork 487
How to build NBFC
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.
If you want to build the latest version of NBFC, you don't have to clone the whole repository, but only the latest revision:
git clone --depth 1 https://github.com/hirschmann/nbfc.git
If you want to build a specific version of NBFC, first clone the whole repository:
git clone https://github.com/hirschmann/nbfc.git
Then check out the version you want to build:
- To build the latest stable version:
git checkout stable
- To build the latest beta version:
git checkout beta
If you aren't familiar with git you can download the latest revision of the source code as .zip file on github.
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\
.
Make sure the Mono runtime + development tools are installed on your machine (Debian based distros: mono-complete, Arch based distros: mono).
NB: on Ubuntu 18.04, the standard package mono-complete is too old to build NBFC; you need to install the package from the 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
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/
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
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
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:
- First, you need to install docker on your computer (see the official documentation)
- Clone the nbfc repository (as described here):
git clone --depth 1 https://github.com/hirschmann/nbfc.git nbfc
- 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/