From bade958849dfead83f925b695d05b959499e0592 Mon Sep 17 00:00:00 2001 From: DanS Date: Thu, 1 Oct 2026 09:02:37 -0500 Subject: [PATCH] fix(tools): make run-gui-with-fake.sh refuse a Lite build dir A Lite-configured tree builds ObsidianDragonLite and has no embedded daemon, so any bin/ObsidianDragon left in it is a stale full-node binary that the harness would otherwise run silently. Point --build-dir at a full-node tree instead. Co-Authored-By: Claude Opus 5.5 --- tools/fake_dragonxd/README.md | 4 +++- tools/fake_dragonxd/run-gui-with-fake.sh | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/fake_dragonxd/README.md b/tools/fake_dragonxd/README.md index d1511ab..ccdd202 100644 --- a/tools/fake_dragonxd/README.md +++ b/tools/fake_dragonxd/README.md @@ -70,7 +70,7 @@ The output goes to its own `fake_dragonxd/` directory so it never replaces the r ## Run the GUI against it (Linux) ```bash -FAKE_REBUILD_SECS=300 tools/fake_dragonxd/run-gui-with-fake.sh [--scratch DIR] +FAKE_REBUILD_SECS=300 tools/fake_dragonxd/run-gui-with-fake.sh [--build-dir build/linux] [--scratch DIR] ``` The script builds a throwaway `HOME` with: @@ -81,6 +81,8 @@ The script builds a throwaway `HOME` with: It then starts the GUI and prints the events file when the GUI exits. It refuses to run if something already listens on 21769, because the GUI would adopt that process as an external node. +It also refuses a Lite-configured `--build-dir`: Lite has no embedded daemon, and any +`bin/ObsidianDragon` in such a tree is stale. To "close the window" from a script, send SIGTERM to the GUI (`kill -TERM `); SDL turns it into a normal quit. diff --git a/tools/fake_dragonxd/run-gui-with-fake.sh b/tools/fake_dragonxd/run-gui-with-fake.sh index 1815d50..4c24dca 100755 --- a/tools/fake_dragonxd/run-gui-with-fake.sh +++ b/tools/fake_dragonxd/run-gui-with-fake.sh @@ -27,6 +27,11 @@ done gui="$build_dir/bin/ObsidianDragon" stub="$build_dir/fake_dragonxd/dragonxd" +# A Lite tree has no embedded daemon and builds ObsidianDragonLite; any bin/ObsidianDragon in it is stale. +if grep -q '^DRAGONX_BUILD_LITE:BOOL=ON' "$build_dir/CMakeCache.txt" 2>/dev/null; then + echo "$build_dir is configured as the Lite variant; pass --build-dir of a full-node tree" >&2 + exit 1 +fi if [[ ! -x "$gui" ]]; then echo "missing $gui; build the app first (./build.sh)" >&2 exit 1