Build scripts, CMake/source patches, npm packaging, and a Gitea CI workflow to compile the real Visual Pinball engine (SDL3 + WebGL2 + libwinevbs for real VBScript) to WebAssembly. The patches are validated end-to-end: the patched engine boots in a real browser, loads a real .vpx table, compiles its real GLSL shaders, computes environment map radiance, initializes physics, and starts the VBScript engine, before hanging on the one deliberately-deferred piece of work (game loop rewrite around emscripten_set_main_loop), documented in the README's roadmap.
17 lines
555 B
Bash
Executable File
17 lines
555 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Serves dist/ locally for manual browser testing. No COOP/COEP headers are
|
|
# needed since this build is single-threaded (no pthreads/SharedArrayBuffer).
|
|
set -euo pipefail
|
|
|
|
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
DIST_DIR="$ROOT_DIR/dist"
|
|
PORT="${1:-8080}"
|
|
|
|
if [ ! -f "$DIST_DIR/index.html" ] && [ ! -f "$DIST_DIR/vpinball.js" ]; then
|
|
echo "ERROR: dist/ is empty. Run scripts/build.sh first." >&2
|
|
exit 1
|
|
fi
|
|
|
|
echo "Serving $DIST_DIR at http://localhost:$PORT/"
|
|
cd "$DIST_DIR" && python3 -m http.server "$PORT"
|