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"