This file is a WIP set of instructions for building OpenBVE from source.
- Visual Studio 2017 or later
- .NET Framework 4.7.2 or later
- Mono 6.8.0 or later
- NuGet client 2.16 or later
- Mono 6.8.0 or later
- NuGet client 2.16 or later
- OpenAL
- GNU Make
- debhelper (Debian and compatibles only)
NOTE: You need to get Mono from the Mono project repository, not the distribution repository.
sudo apt install build-essential mono-devel libmono-i18n4.0-all nuget libopenal1 debhelper
NOTE: You need to get Mono from the Mono project repository, not the distribution repository.
sudo dnf install @"Development Tools" mono-devel mono-locale-extras nuget openal-soft
You can install the latest NuGet client using the command below.
sudo curl -o /usr/local/lib/nuget.exe https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
echo -e '#!/bin/sh\nexec /usr/bin/mono /usr/local/lib/nuget.exe "$@"' | sudo tee /usr/local/bin/nuget
sudo chmod 755 /usr/local/bin/nuget
NOTE: Depending on the install type you select, Mono will not install all components by default. These are required:
- mono-runtime
- libmono-corlib4.5-cil
- libmono-system-drawing4.0-cil
- libmono-system-windows-forms4.0-cil
- libmono-system4.0-cil
- libmono-system-xml-linq4.0-cil
- libmono-i18n4.0-all
- libmono-microsoft-csharp4.0-cil
- libusb-1.0
- fonts-noto-cjk [Optional- Gives a better Unicode glyph set in menus etc.]
- libsdl2 [Optional- Required if SDL2 backend is to be used]
- Mono 6.8.0 or later
- NuGet client 2.16 or later
- OpenAL
- GNU Make
Note that as NuGet packages are used, the first-time build requires an internet connection.
- Open the main OpenBVE.sln file with Visual Studio.
- Build the required project, allowing NuGet to restore the packages as required.
- Start "Open Mono Command Prompt" from the start menu.
- Open the main openBVE source directory in this terminal.
- Restore the packages as required.
nuget restore OpenBVE.sln
- Build the solution.
msbuild OpenBVE.sln
- Open the main openBVE source directory in the terminal.
- You may either build using the makefile, which supports the following options:
make
- Restores the NuGet packages only.make all-release
- Creates a release build.make all-debug
- Creates a debug build.make clean-all
- Cleans release and debug builds.make openbve-release
- Creates a release build without tools.make openbve-debug
- Creates a debug build without tools.make debian
- On Debian and compatibles, creates an installable deb package.make publish
- On Mac, creates an app package.