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.
This commit is contained in:
1 file changed
+25
@@ -0,0 +1,25 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build FWS-DeskManager and open its GTK4 window in a single step.
|
||||||
|
# Usage: ./run.sh [--cli <command>...]
|
||||||
|
#
|
||||||
|
# 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"
|
||||||
Reference in new issue
Block a user