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 <noreply@anthropic.com>
This commit is contained in:
@@ -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 <gui pid>`); SDL turns it
|
||||
into a normal quit.
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user