Skip to content

Commit 47164a3

Browse files
committed
fix: dockerfile
1 parent 9f6c496 commit 47164a3

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

Dockerfile

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,22 @@ ENV PATH=/root/.cargo/bin:$PATH
4242
COPY --from=godot-build /src/godot/bin/godot.linuxbsd.editor.double.x86_64 /usr/local/bin/godot
4343
ENV GODOT4_BIN="/usr/local/bin/godot"
4444

45+
WORKDIR /tmp
46+
47+
RUN git clone https://github.com/valerino/rv6502emu
48+
WORKDIR /tmp/rv6502emu
49+
RUN git checkout b5ecd2ce8382a7a891bb0d1c1ce14a17549ef73a
50+
# have to do it this ugly way because for some reason submodules dont work
51+
RUN cd tests && git clone https://github.com/valerino/6502_65C02_functional_tests.git
52+
53+
WORKDIR /src
4554
COPY godot-6502 /src/godot-6502
4655
WORKDIR /src/godot-6502
4756

57+
# Patch Cargo.toml to use local rv6502emu source
58+
RUN sed -i 's|rv6502emu = { git = "https://github.com/valerino/rv6502emu", version = "0.1.0" }|rv6502emu = { path = "/tmp/rv6502emu" }|' Cargo.toml
4859

60+
# build the extension into /src/godot-6502/target/wasm32-unknown-emscripten/release/godot_6502.wasm
4961
RUN bash -lc '. /emsdk/emsdk_env.sh && \
5062
SYSROOT=/emsdk/upstream/emscripten/cache/sysroot && \
5163
mkdir -p "$SYSROOT" && \
@@ -59,8 +71,6 @@ export BINDGEN_EXTRA_CLANG_ARGS_wasm32_unknown_emscripten="--target=wasm32-unkno
5971
export BINDGEN_EXTRA_CLANG_ARGS="--target=wasm32-unknown-emscripten --sysroot=$SYSROOT -D__EMSCRIPTEN__ -isystem$SYSROOT/include -isystem$SYSROOT/system/include" && \
6072
cargo +nightly build -Zbuild-std --target wasm32-unknown-emscripten --release && cargo build'
6173

62-
# build the extension into /src/godot-6502/target/wasm32-unknown-emscripten/release/godot_6502.wasm
63-
# RUN cargo +nightly build -Zbuild-std --target wasm32-unknown-emscripten --release && cargo build
6474

6575
COPY scripts/setup_editor_settings_version.sh /src/scripts/setup_editor_settings_version.sh
6676
COPY scripts/setup_blender_editor_path.sh /src/scripts/setup_blender_editor_path.sh
@@ -80,7 +90,6 @@ RUN chmod +x /src/scripts/setup_editor_settings_version.sh && \
8090

8191
RUN godot -v -e --quit --headless
8292

83-
# ENTRYPOINT ["/bin/bash"]
8493

8594
ENV PATH="/opt/blender:${PATH}"
8695

@@ -95,7 +104,7 @@ RUN apt-get update && apt-get install -y python3-pip python3-numpy && rm -rf /va
95104

96105

97106
RUN $GODOT4_BIN --headless --path . --import
98-
RUN $GODOT4_BIN --headless --path . --export-release "Web" /web/SpessComputer.html --verbose
107+
RUN $GODOT4_BIN --headless --path . --export-release "Web" /web/SpessComputer.html
99108

100109
# final stage, builds the svelte app with the wasm dependencies
101110
FROM node:22-alpine AS web-build

0 commit comments

Comments
 (0)