NymphCast Server (NCS) forms the core of the NymphCast project. It provides the software that is installed on the receiver system that is connected to the speakers, television or similar. See the NymphCast README for detailed instructions on installing and running NCS.
This document covers building NCS from source. See the main README for precompiled binary files.
Note: the setup.sh
script in the project root automates this process.
A C++17-capable GCC, Clang or MSVC toolchain is required in addition to the below dependencies:
- NymphRPC
- LibNymphCast
- Ffmpeg (LibAV) (v5.1+)
- LibSDL2
- LibSDL2_Image
- LibPOCO (1.5+)
- libFreeType
- libFreeImage
- RapidJson
- Pkg-config
- libCurl
All of these dependencies can be automatically installed on many platforms with the dependencies.sh
script. The script runs the following commands, per platform:
On Debian & derivatives:
sudo apt -y install git g++ libsdl2-image-dev libsdl2-dev libpoco-dev libswscale-dev libavcodec-dev libavdevice-dev libavformat-dev libavutil-dev libpostproc-dev libswresample-dev pkg-config libfreetype6-dev libfreeimage-dev rapidjson-dev libcurl4-gnutls-dev
On Arch & derivatives:
sudo pacman -S --noconfirm --needed git sdl2 sdl2_image poco ffmpeg freetype2 freeimage rapidjson pkgconf curl
On Alpine & derivatives:
sudo apk add poco-dev sdl2-dev sdl2_image-dev ffmpeg-dev openssl-dev freetype-dev freeimage-dev rapidjson-dev alsa-lib-dev glew-dev nymphrpc-dev curl-dev pkg-config
On FreeBSD:
pkg install -y gmake gcc git poco sdl2 sdl2_image ffmpeg openssl freetype2 freeimage rapidjson curl
On Haiku:
pkgman install git poco poco_devel libsdl2 libsdl2_devel sdl2_image sdl2_image_devel ffmpeg ffmpeg6_devel freetype freetype_devel freeimage freeimage_devel rapidjson curl curl_devel
On MSYS2:
pacman -S --noconfirm --needed git mingw-w64-x86_64-SDL2 mingw-w64-x86_64-SDL2_image mingw-w64-x86_64-poco mingw-w64-x86_64-ffmpeg mingw-w64-x86_64-freetype mingw-w64-x86_64-freeimage mingw-w64-x86_64-rapidjson pkgconf curl
If using a compatible OS (Debian, Alpine or Arch Linux based, or FreeBSD, MSYS2 or Haiku), one can use the setup script:
- Run the
setup.sh
script in the project root to perform the below tasks automatically. - Run the
install_linux.sh
script in the project root to compile & install the binaries and set up a systemd/OpenRC service on Linux systems, or install a.desktop
file for audio-video configurations.
Else use the manual procedure:
- Check-out NymphRPC elsewhere and build the library with
make lib
. - Install NymphRPC with
sudo make install
. - Check-out LibNymphCast elsewhere and build the library with
make
. - Install LibNymphCast with
sudo make install
. - Change to
NymphCast/src/server
and executemake
command. - Use
sudo make install
to install the server and associated files. - Use
sudo make install-systemd
(SystemD) orsudo make install-openrc
(OpenRC) to install the relevant service file. A.desktop
file is also provided in theautostart
subfolder.
Note:For FreeBSD make sure to use gmake
instead of make
. Pay note to compile with Clang as well (see below), for NCS and dependencies like NymphRPC and libnymphcast.
In order to use Clang instead of GCC/MinGW, call make
as follows:
make TOOLCHAIN=clang
To compile the server with MSVC (2017, 2019 or 2022), ensure vcpkg is installed with the VCPKG_ROOT
environment variable defined, and call the provided .bat file from a native x64 MSVC shell:
Setup-NMake-vcpkg.bat
To remove intermediate build files:
Setup-NMake-vcpkg.bat clean
And to create an InnoSetup-based installer (with IS binaries on the system path):
Setup-NMake-vcpkg.bat package
Note: Visual Studio 2022 installs its own version of vcpkg which is incompatible with 'classic mode' vcpkg. Make sure that VCPKG_ROOT
is set to the normal vcpkg (from GitHub).
An (experimental) uninstall script is provided in the project root called uninstall_linux.sh
, which should work on all supported Linux distributions.