-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
89 lines (75 loc) · 3.66 KB
/
Dockerfile
File metadata and controls
89 lines (75 loc) · 3.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# Extended from https://github.com/clementgallet/libTAS/blob/master/Dockerfile
FROM debian:12 AS ruffle-builder
# Dependencies
RUN apt-get update && apt-get install -y \
git \
pkg-config \
libasound2-dev \
libudev-dev \
default-jre-headless \
g++ \
curl
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
# Installs
RUN mkdir /root/src
# pin version
ARG RUFFLE_VERSION=fa9c6627bd86511de1b710dcf42708dc55c44e3e
RUN cd /root/src && git clone https://github.com/ruffle-rs/ruffle.git && cd ruffle && git checkout $RUFFLE_VERSION
WORKDIR /root/src/ruffle
ENV PATH="/root/.cargo/bin:${PATH}"
RUN cargo build --release --package=ruffle_desktop
FROM debian:12 AS libtas-builder
RUN dpkg --add-architecture i386
# Dependencies
RUN apt-get update && apt-get -y install \
# build tools
git wget build-essential automake pkg-config \
# main
libx11-dev libx11-xcb-dev qtbase5-dev libsdl2-dev libxcb1-dev libxcb-keysyms1-dev libxcb-xkb-dev libxcb-cursor-dev libxcb-randr0-dev libudev-dev libasound2-dev libavutil-dev libswresample-dev ffmpeg liblua5.4-dev libcap-dev libxcb-xinput-dev \
# HUD
libfreetype6-dev libfontconfig1-dev \
# fonts
libfreetype6-dev libfontconfig1-dev \
fonts-liberation \
# i386
g++-multilib \
libx11-6:i386 libx11-dev:i386 libx11-xcb1:i386 libx11-xcb-dev:i386 libasound2:i386 libasound2-dev:i386 libavutil57:i386 libswresample4:i386 libfreetype6:i386 libfreetype6-dev:i386 libfontconfig1:i386 libfontconfig1-dev:i386
# Installs
RUN mkdir /root/src
# RUN cd /root/src && git clone https://github.com/clementgallet/libTAS.git
ARG LIBTAS_VERSION=0ccac991578a1b42f7f3238021c9ee258add357f
RUN cd /root/src && git clone https://github.com/Perdu/libTAS.git && cd /root/src/libTAS && git checkout $LIBTAS_VERSION
WORKDIR /root/src/libTAS
# RUN git fetch origin pull/667/head:pr-667 && git checkout pr-667
# RUN git checkout v1.4.7
RUN ./build.sh --with-i386
RUN cd ./build && make install
FROM debian:12-slim
RUN apt-get update && apt-get install -y \
# ruffle
libasound2 \
file \
# libTAS
libqt5widgets5 \
libqt5gui5 \
libqt5core5a \
libqt5network5 \
libqt5x11extras5 \
liblua5.4-0 \
# util
xvfb
COPY --from=ruffle-builder /root/src/ruffle/target/release/ruffle_desktop /usr/local/bin/ruffle_desktop
COPY --from=libtas-builder /root/src/libTAS/build/AppDir/usr/bin/libTAS /usr/local/bin/libTAS
COPY --from=libtas-builder /root/src/libTAS/build/AppDir/usr/bin/libtas.so /usr/local/bin/libtas.so
# n-related commands
COPY external/n_v14.swf /home/
RUN echo "/usr/local/bin/ruffle_desktop -g gl /home/n_v14_patched.swf\nlibTAS -i -n -L -r /home/n_levels/\${LEVEL}_rta.ltm --lua /home/lua/n_dump_ghost.lua /usr/local/bin/ruffle_desktop -g gl --no-gui --width 792 /home/n_v14.swf &\nLEVEL='00-0' ; libTAS -i -r /home/n_levels/\$LEVEL.ltm --lua /home/lua/n_start.lua /usr/local/bin/ruffle_desktop -g gl --no-gui --width 792 /home/n_v14_patched.swf &" > /root/.bash_history
COPY docker/ruffle_desktop.ini /root/.config/libTAS/
COPY docker/libTAS.ini /root/.config/libTAS/
# Fixing the determinism bug: by adding the libopenh264 file manually, we avoid having to open ruffle manually every time
COPY external/libopenh264-2.4.1-linux64.7.so /root/.cache/ruffle/video/
# Use the .sol file. Remove for encoding
COPY volume/n_tas_lowscores.sol /root/.local/share/ruffle/SharedObjects/localhost/n_v14b_userdata.sol
# run
WORKDIR /home
CMD bash