https://gitlab.synchro.net/main/sbbs/-/commit/6897131ec6e61a33dc7c0551
Added Files:
src/doors/syncconquer/COMPILING.md build.bat src/doors/syncconquer/cmake/BuildIcons.cmake src/doors/syncconquer/deploy.bat vcpkg.json
Modified Files:
src/doors/syncconquer/.gitignore CMakeLists.txt DEFERRED.md DESIGN.md PROVENANCE.md src/doors/syncconquer/door/door_io.c xtrn/syncalert/install-xtrn.ini
Log Message:
syncconquer: build and deploy the syncalert door on Windows (MSVC)
Add the Windows half of the house build pattern, mirroring
src/doors/syncdoom/ and src/doors/syncduke/: build.bat configures +
builds Win32/Release into build-msvc\, deploy.bat then installs
syncalert.exe into xtrn\syncalert\ (and, on a copy-style install, the
live install via %SBBSCTRL% or SYNCALERT_DEST). Building still does not
deploy. vcpkg.json + COMPILING.md document the optional tiers; both are
found here, so the door builds with JPEG-XL graphics and libsndfile
OGG music.
door_io.c installed a SIGTERM handler and declared a volatile
sig_atomic_t on both platforms, but only included <signal.h> in the
POSIX arm of its #ifdef -- so the Windows build failed with "syntax
error: identifier 'g_shutdown_req'" / "'SIGTERM': undeclared
identifier". <signal.h> is ISO C; hoist it to the common includes. Windows-only, present since f5578ea57f (foam-43-clip).
Two more blockers live in the vendored engine, and both are worked
around WITHOUT touching vanilla/ -- keeping PROVENANCE.md's local-patch
list short is worth more than reusing upstream's module. Recorded there
under a new "Deliberate non-patches" section so a re-vendor does not
"fix" them by patching upstream:
- redalert/CMakeLists.txt calls make_icon() on
"${CMAKE_SOURCE_DIR}/resources/vanillara_icon.svg", and upstream's
make_icon() FATAL_ERRORs when its INPUT does not exist. resources/
is a git symlink to vanilla/resources, which a Windows checkout
materializes as a plain text file unless core.symlinks is on with
Developer Mode -- so configure died before compiling a single TU.
cmake/BuildIcons.cmake (ours, prepended to CMAKE_MODULE_PATH) now
shadows the vendored module with a no-op make_icon(). A console door
has no window, and upstream already treats the icon as optional.
- The engine links VanillaRA /subsystem:windows. With no console the
CRT hands main() invalid std handles, so all stdio -- including the
fatal startup diagnostics a sysop needs when the door won't run --
is silently discarded. Re-link /subsystem:console after
add_subdirectory(vanilla) returns; the last /subsystem wins.
Win32 (x86) only: build.bat refuses x64 up front rather than failing
deep into the build. The engine's Windows-without-SDL path -- the one
the headless door selects, and which upstream never compiles because its Windows build always defines SDL_BUILD -- carries Win16-era 32-bit
assumptions. common/wwmouse.cpp hands timeSetEvent() a DWORD-argument
callback where LPTIMECALLBACK wants DWORD_PTR; redalert/winstub.cpp
assigns a long(HWND,UINT,UINT,LONG) to a WNDPROC. Both are hard MSVC
errors at x64 and harmless at x86, where DWORD/LONG are pointer-width,
and fixing the first only uncovers the next. These are upstream bugs,
best fixed upstream; DEFERRED.md records the limitation.
Unlike the siblings' deploy.bat, an auto-detected live dir that does not
exist is skipped rather than created -- %SBBSCTRL% pointing at a BBS
with no syncalert installed should not get a stray xtrn\syncalert\
conjured into it. An explicit %SYNCALERT_DEST% is still created on
demand. This matches this door's own deploy.sh.
install-xtrn.ini no longer claims a Windows build isn't packaged.
Verified under MSVC only (VS2022, Win32/Release, clean build via
build.bat; deploy.bat exercised against the in-tree bundle): the
door_io.c change is an ISO C header move, but it has not been compiled
by GCC/Clang.
Co-Authored-By: Claude Opus 4.8 (1M context) <
noreply@anthropic.com>
---
þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net