agb/website/mgba-wasm/BuildMgbaWasm

26 lines
678 B
Plaintext
Raw Normal View History

2024-04-04 08:58:10 +11:00
FROM docker.io/emscripten/emsdk:3.1.46 as builder
RUN apt-get update && \
apt-get install -y --no-install-recommends make cmake git && \
apt-get autoremove -y && apt-get clean
RUN userdel emscripten -r
USER root
ENV BUILD_DIR=build-wasm
WORKDIR /
RUN git clone https://github.com/corwinkuiper/mgba.git --filter=tree:0 -b wasm
2024-04-04 08:58:10 +11:00
RUN mkdir /mgba/build-wasm
WORKDIR /mgba/build-wasm
RUN git checkout 26a2701cef6fcad47c67559fcb7892004f8d489c
2024-04-04 08:58:10 +11:00
RUN emcmake cmake .. && make install DESTDIR=install
FROM scratch
COPY --from=builder /mgba/build-wasm/wasm/mgba.js .
COPY --from=builder /mgba/build-wasm/wasm/mgba.wasm .
COPY --from=builder /mgba/build-wasm/wasm/mgba.d.ts .