#!/usr/bin/env bash # ScummVM 2.9.1, commit 9d9b9e93108a276c551aeffa390169ccc5148e15. # Requires Emscripten 3.1.74, GNU Make, CMake and Python 3 on PATH. # Extract scummvm-2.9.1-source.tar.gz beside this script, then run this script. set -euo pipefail cd "$(dirname "$0")/scummvm-2.9.1" emconfigure ./configure --host=wasm32-unknown-emscripten --build=wasm32-unknown-emscripten --disable-all-engines --enable-engine=scumm --disable-detection-full --disable-debug --disable-seq-midi printf '%s\n' 'LDFLAGS += -lidbfs.js -sEXPORTED_RUNTIME_METHODS=FS,IDBFS,callMain,addRunDependency,removeRunDependency' >> config.mk emmake make -j2 emmake make dist-emscripten