https://gitlab.synchro.net/main/sbbs/-/commit/ffe97f619b7eb324f2fde889
Modified Files:
exec/load/door_deploy.js src/doors/syncconquer/deploy.js
Log Message:
door_deploy: look for the binary where build.bat actually leaves it
Deploy was broken on Windows for every door that uses the shared helper -- syncconquer, syncdoom, syncduke and syncmoo1. door_deploy() resolved the built binary as build/<name>, which is right for build.sh and wrong for build.bat: that configures a Visual Studio (multi-config) generator into build-msvc/, so the binary lands in build-msvc/Release/. A Windows sysop therefore got
[deploy] ERROR: ...\build\syncduke.exe not found -- run build.bat first
immediately after a build.bat that had just succeeded.
Probe instead of assuming. door_find_built() walks the locations a build can actually leave a binary -- build-msvc/<Config>/ (build.bat), build/<Config>/
(a hand-run VS generator, which COMPILING.md documents), and build/ (build.sh, or a single-config generator) -- and reports where it looked when it finds nothing, so the next person doesn't have to read the source. spec.built still pins the location and skips the probe.
When several builds exist -- a stale build/Debug beside a fresh build-msvc/Release -- take the newest and say so. Silently preferring a fixed order would deploy a binary the sysop did not just build, which surfaces later as a change that "didn't take": a miserable thing to chase.
The convention itself is not new. syncretro's deploy.js does not use the
shared helper and already had build-msvc/Release right; only the shared path never learned it.
syncconquer's own deploy.js repeated the assumption in its SyncDawn gate (file_exists("build/syncdawn")), so it would have gone on silently skipping SyncDawn on Windows even after the helper was fixed. It asks door_find_built() now.
Verified under jsexec on Win32: both syncalert.exe and syncdawn.exe resolve to build-msvc/Release (previously: not found), a missing build still yields null rather than throwing, spec.built bypasses the probe, and the newest of two builds wins with the notice printed.
---
þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net