fix(web): repair Emscripten build after module split + font move

The web build had bit-rotted since the last successful build (Apr 12):

- build_web.sh only compiled spectrogram.c + platform_web.c, but commit
  3a8f20b split the code into 9 modules — link failed with undefined
  symbols. Now compiles all app modules (kept in sync with rspektrum.make,
  swapping platform_linux -> platform_web).
- Dropped -DPLATFORM_WEB from the app-module compile/link: the platform
  refactor (b6942d8) added a `Platform` enum whose PLATFORM_WEB enumerator
  collides with the macro. Web behavior is selected by linking
  platform_web.c, not the macro, so the define was never needed by our code
  (raylib still gets it in its own build).
- Removed the stale `fonts/DejaVuSansMono.ttf` preload (font moved to
  resources/fonts/); resources@resources already bundles it and the runtime
  loads it relative to the resources dir.
- platform_web.c: include <errno.h> for ENOSYS (this stub had never compiled).
- build_web.sh: skip the slow raylib rebuild when libraylib.a already exists.

Verified: `./build_web.sh release` exits 0 and produces html/js/wasm/data;
font is packaged; all artifacts serve 200 via python http.server and the
wasm has valid magic bytes.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-25 11:15:31 -07:00
parent e8ed19d338
commit 6347eb172e
2 changed files with 46 additions and 27 deletions
+1
View File
@@ -10,6 +10,7 @@
#include <string.h>
#include <stdarg.h>
#include <stdio.h>
#include <errno.h> /* ENOSYS */
/* ── Helpers ─────────────────────────────────────────────────────────── */