-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathdockerfile
69 lines (61 loc) · 1.98 KB
/
dockerfile
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
FROM devkitpro/devkitppc:20241116
ENV PATH=$DEVKITPPC/bin:$PATH
ENV BUILD_TYPE=randomizer
ENV CMAKE_ARGS=
WORKDIR /
# Install python for ASM patches
COPY ./asm/requirements.txt /scripts/requirements.txt
RUN apt-get update && apt-get install python3 python3-pip -y && pip3 install -r /scripts/requirements.txt
# Install wut
RUN git clone https://github.com/devkitPro/wut wut --single-branch && \
cd wut && \
git checkout 958936de47c8765a770eeaee6d10e460cc02c28e && \
make -j$(nproc) && \
make install && \
cd .. && \
rm -rf wut
# Install libmocha
RUN git clone --recursive https://github.com/wiiu-env/libmocha libmocha --single-branch && \
cd libmocha && \
git checkout 630d9681bc0f29cc03a373cad94b76f17cfae763 && \
make -j$(nproc) && \
make install && \
cd .. && \
rm -rf libmocha
# Install librpxloader
RUN git clone --recursive https://github.com/wiiu-env/librpxloader librpxloader --single-branch && \
cd librpxloader && \
git checkout 64787ea63d5d8a8e693e1a37bd837a93b3edd005 && \
make -j$(nproc) && \
make install && \
cd .. && \
rm -rf librpxloader
# Things for building
VOLUME /src
WORKDIR /src
CMD if [ "$BUILD_TYPE" = "randomizer" ]; then \
mkdir -p build && \
cd build && \
rm -rf * && \
$DEVKITPRO/portlibs/wiiu/bin/powerpc-eabi-cmake ../ $CMAKE_ARGS && \
make -j$(nproc); \
else \
if [ "$BUILD_TYPE" = "asm" ]; then \
cd asm && \
python3 ./assemble.py; \
else \
if [ "$BUILD_TYPE" = "full" ]; then \
cd asm && \
python3 ./assemble.py && \
cd ../ && \
\
mkdir -p build && \
cd build && \
rm -rf * && \
$DEVKITPRO/portlibs/wiiu/bin/powerpc-eabi-cmake ../ $CMAKE_ARGS && \
make -j$(nproc); \
else \
echo "Invalid build type"; \
fi; \
fi; \
fi