https://gitlab.synchro.net/main/sbbs/-/commit/3dcb4df5994e19e9935a80ff
Added Files:
src/doors/syncdoom/COMPILING.md vcpkg.json
Modified Files:
src/doors/syncdoom/.gitignore CMakeLists.txt README.md mp_server.c render_text.c syncdoom.c
Log Message:
syncdoom: add Windows/MSVC build support (incl. JPEG-XL via vcpkg)
Port the door to build with Visual Studio 2022 / MSVC via CMake. The
engine (Chocolate Doom) was already _WIN32-aware and all socket I/O
already went through xpdev's sockwrap; this fills the remaining gaps:
- syncdoom.c: guard <unistd.h>, add the Windows include block; now_ms()
via timeGetTime(), DG_SleepMs() via Sleep(), abscopy() via _fullpath;
WSAStartup() at startup (sockwrap doesn't self-init Winsock); guard
SIGPIPE out; PATH_MAX fallback.
- mp_server.c: implement mp_spawn_server() with CreateProcess
(DETACHED_PROCESS) -- the Windows analogue of the fork/setsid detach.
- render_text.c: mempcpy/stpcpy fallbacks for MSVC (glibc-only).
- CMakeLists.txt: MSVC branch (CRT deprecation defs, winmm, C11);
Winsock/winmm come transitively from xpdev. JPEG-XL: locate an
MSVC-built static libjxl + deps (highway/brotli/lcms2), with a
release/debug split so multi-config (VS) builds link the right CRT.
- vcpkg.json: manifest pinning libjxl for the MSVC JPEG-XL tier.
- COMPILING.md: build instructions for *nix and Windows; README trimmed
to a quickstart that points to it.
Verified on Win32: Release + Debug both link and run (mode=jxl), with a self-contained exe (libjxl statically linked, no JXL DLLs). The *nix
build is unchanged -- all Windows code paths are behind _WIN32 guards.
Co-Authored-By: Claude Opus 4.8 (1M context) <
noreply@anthropic.com>
---
þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net