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