diff --git a/README.md b/README.md index 4645e27..ff82ef3 100644 --- a/README.md +++ b/README.md @@ -57,20 +57,34 @@ https://github.com/user-attachments/assets/9a9fd0c6-78fc-4284-8b44-6a1929c00cc6 ### [Command-Line Configuration of PiPedal](https://rerdavies.github.io/pipedal/CommandLine.html) ### [Changing the Web Server Port](https://rerdavies.github.io/pipedal/ChangingTheWebServerPort.html) -%nbsp; +  ### [Using LV2 Audio Plugins](https://rerdavies.github.io/pipedal/UsingLv2Plugins.md) ### [Which LV2 Plugins does PiPedal support?](https://rerdavies.github.io/pipedal/WhichLv2PluginsAreSupported.html) ### [Support for LV2 Plugins with MOD User Interfaces](https://rerdavies.github.io/pipedal/ModUiSupport.html) -   +  ### [Building PiPedal from Source](https://rerdavies.github.io/pipedal/BuildingPiPedalFromSource.html) ### [Build Prerequisites](https://rerdavies.github.io/pipedal/BuildPrerequisites.html) ### [The Build System](https://rerdavies.github.io/pipedal/TheBuildSystem.html) +### Setup + +Fetch the project's submodules before building: + +```sh +git submodule update --init --recursive +``` + +After running this command the following directories should be populated: + +- `modules/SQLiteCpp` +- `modules/websocketpp` +- `submodules/pipedal_p2pd` + ### [How to Debug PiPedal](https://rerdavies.github.io/pipedal/Debugging.html) -   +  #### [PiPedal Architecture](https://rerdavies.github.io/pipedal/Architecture.html) diff --git a/docs/BuildPrerequisites.md b/docs/BuildPrerequisites.md index cd8e741..cbc120e 100644 --- a/docs/BuildPrerequisites.md +++ b/docs/BuildPrerequisites.md @@ -21,13 +21,21 @@ Run the following commands to install dependent libraries required by the PiPeda sudo apt update sudo apt upgrade + sudo apt install -y liblilv-dev libboost-dev \ libsystemd-dev catch libasound2-dev uuid-dev \ authbind libavahi-client-dev libnm-dev libicu-dev \ libsdbus-c++-dev libzip-dev google-perftools \ libgoogle-perftools-dev \ - libpipewire-0.3-dev - + libpipewire-0.3-dev libwebsocketpp-dev libsdl2-dev + +After installing these packages, run the dependency checker to verify that +everything required is present: + +```bash +cd ~/src/pipedal +./scripts/check_deps.sh +``` ### Installing Sources diff --git a/docs/TheBuildSystem.md b/docs/TheBuildSystem.md index 7f69410..9b16433 100644 --- a/docs/TheBuildSystem.md +++ b/docs/TheBuildSystem.md @@ -13,7 +13,9 @@ available through the Code plugins store) has configured itself, build commands If you are not using Visual Studio Code, you can configure, build and install PiPedal using CMake build tools. For your convenience, the following shell scripts have been provided in the root of the project. - ./init.sh # Configure the CMake build for the first time, or if you + ./scripts/check_deps.sh # Verify required system packages + + ./init.sh # Configure the CMake build for the first time, or if you # have changed one of the CMakeList.txt files. (release build) ./mk.sh # Build all targets (release build) diff --git a/scripts/check_deps.sh b/scripts/check_deps.sh new file mode 100644 index 0000000..85f249f --- /dev/null +++ b/scripts/check_deps.sh @@ -0,0 +1,30 @@ +#!/usr/bin/env bash +# Check for required system packages for building PiPedal. + +set -e + +packages=(\ + liblilv-dev libboost-dev libsystemd-dev catch libasound2-dev uuid-dev \ + authbind libavahi-client-dev libnm-dev libicu-dev \ + libsdbus-c++-dev libzip-dev google-perftools \ + libgoogle-perftools-dev libpipewire-0.3-dev \ + libwebsocketpp-dev libsdl2-dev +) + +missing=() + +for pkg in "${packages[@]}"; do + if ! dpkg -s "$pkg" >/dev/null 2>&1; then + missing+=("$pkg") + fi +done + +if [ ${#missing[@]} -ne 0 ]; then + echo "Missing packages:" >&2 + for pkg in "${missing[@]}"; do + echo " $pkg" >&2 + done + exit 1 +else + echo "All required packages are installed." >&2 +fi \ No newline at end of file