From 42ddd28354edd670313fce675455678fd1ba9b40 Mon Sep 17 00:00:00 2001 From: BlackAngelTVdev Date: Fri, 13 Nov 2026 16:27:41 +0100 Subject: [PATCH] chore: add a build and run script Building and then locating the right binary was the first step of every manual test; the script keeps an incremental build tree and opens the GUI, or the CLI with --cli. --- run.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 run.sh diff --git a/run.sh b/run.sh new file mode 100755 index 0000000..2361274 --- /dev/null +++ b/run.sh @@ -0,0 +1,25 @@ +#!/usr/bin/env bash +# Build FWS-DeskManager and open its GTK4 window in a single step. +# Usage: ./run.sh [--cli ...] +# +# BUILD_DIR / BUILD_TYPE override the defaults when a separate build tree is +# needed (for example BUILD_DIR=build-debug BUILD_TYPE=Debug ./run.sh). + +set -euo pipefail + +cd -- "$(dirname -- "${BASH_SOURCE[0]}")" + +build_dir="${BUILD_DIR:-build}" +build_type="${BUILD_TYPE:-Release}" +jobs="$(nproc)" + +# Incremental: cmake keeps the existing cache and only recompiles stale files. +cmake -S . -B "$build_dir" -DCMAKE_BUILD_TYPE="$build_type" +cmake --build "$build_dir" -j"$jobs" + +if [[ "${1:-}" == "--cli" ]]; then + shift + exec "$build_dir/fws-deskmanager" "$@" +fi + +exec "$build_dir/fws-deskmanager-gui"