• src/doors/syncconquer/COM

    From Rob Swindell (on Windows@VERT to Git commit to main/sbbs/m on Friday, July 10, 2026 03:28:00
    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
  • From Rob Swindell (on Windows@VERT to Git commit to main/sbbs/m on Sunday, July 12, 2026 15:06:00
    https://gitlab.synchro.net/main/sbbs/-/commit/d49b5d0ec112048e7c541f2b
    Modified Files:
    src/doors/syncconquer/COMPILING.md PROVENANCE.md build.bat src/doors/syncconquer/vanilla/tiberiandawn/winstub.cpp
    Log Message:
    syncconquer: build syncdawn.exe on Windows (MSVC/Win32)

    Tiberian Dawn could not be built on Windows at all. Two things were in the
    way, and the second only showed up once the first was fixed and the compiler actually got to the TD sources.

    build.bat never enabled the title. It didn't pass -DBUILD_VANILLATD=ON, and
    the CMake cache default is OFF, so the if(TARGET VanillaTD) block was a no-op and the Win32 build silently produced syncalert.exe alone. It now mirrors build.sh: both titles by default, "ra" to build Red Alert alone, and it verifies (and reports) each binary it was asked to produce.

    With TD enabled, the engine failed to compile under MSVC:

    tiberiandawn/winstub.cpp(223): error C2065: 'Winsock': undeclared identifier

    commonv defines WINSOCK_IPX publicly on Windows, and redalert/winstub.cpp fences every legacy Winsock call behind #ifndef WINSOCK_IPX. TD's WM_DESTROY emergency-shutdown path does not, so it referenced a TcpipManagerClass Winsock that exists only in the #ifndef _WIN32 half of common/fakesock.h. Upstream never trips over this because its Windows build always defines SDL_BUILD and skips that whole non-SDL WndProc -- the same never-compiled path whose Win16-era 32-bit assumptions already pin this door to Win32. Guarded TD's two Winsock lines the way RA guards its own (vendored patch, PROVENANCE #32).

    COMPILING.md now describes the family as it actually is -- one tree, two
    titles -- with the binary/engine table, the per-title asset bundles, the BUILD_VANILLATD option, and -DBUILD_VANILLATD=ON added to every manual cmake example. It had also listed BUILD_VANILLATD among the switches "pinned by CMakeLists.txt -- don't set them by hand", which is backwards: it is deliberately the one non-FORCE cache variable a build dir is meant to set.

    Both binaries link clean at Win32/Release, with and without the vcpkg tiers. Verified build.bat, build.bat ra, and a hand-run cmake.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net