Skip to content

Commit fb84bf9

Browse files
authored
Merge pull request #13 from ViRb3/master
Merge Dockerfiles and use build arg instead
2 parents 161ff55 + 6b865d2 commit fb84bf9

4 files changed

Lines changed: 16 additions & 52 deletions

File tree

Dockerfile

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,23 @@ FROM devkitpro/devkita64:20260215
22

33
SHELL ["/bin/bash", "-c"]
44

5+
ARG GIMP_VERSION=2
6+
57
# Build tools + GIMP (for BCn texture conversion)
6-
RUN apt-get update && apt-get install -y --no-install-recommends \
8+
RUN if [ "$GIMP_VERSION" = "3" ]; then \
9+
echo 'deb http://deb.debian.org/debian trixie main' > /etc/apt/sources.list.d/trixie.list \
10+
&& printf 'Package: *\nPin: release n=trixie\nPin-Priority: 100\n' > /etc/apt/preferences.d/trixie; \
11+
fi \
12+
&& apt-get update && apt-get install -y --no-install-recommends \
713
autoconf automake libtool \
814
bison flex \
9-
python3-pip python3-mako ninja-build \
15+
python3-pip ninja-build \
1016
wget ca-certificates \
11-
gimp \
17+
&& if [ "$GIMP_VERSION" = "3" ]; then \
18+
apt-get install -y -t trixie --no-install-recommends gimp python3-mako; \
19+
else \
20+
apt-get install -y --no-install-recommends gimp python3-mako; \
21+
fi \
1222
&& pip3 install --break-system-packages meson \
1323
&& rm -rf /var/lib/apt/lists/*
1424

Dockerfile.gimp3

Lines changed: 0 additions & 45 deletions
This file was deleted.

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,9 @@ A hardware-accelerated media player for the Nintendo Switch, built on mpv and FF
4040
```
4141
This builds the toolchain image and compiles everything automatically. Output will be found in `build/`.
4242

43-
To test with GIMP 3 instead of the default GIMP 2, use `Dockerfile.gimp3`:
43+
To build with GIMP 3 instead of the default GIMP 2:
4444
```sh
45-
docker build -f Dockerfile.gimp3 -t switchwave-builder .
46-
./build-docker.sh
45+
GIMP_VERSION=3 ./build-docker.sh
4746
```
4847

4948
### Manual

build-docker.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22
set -eo pipefail
33

4-
docker build -t switchwave-builder .
4+
docker build --build-arg GIMP_VERSION="${GIMP_VERSION:-2}" -t switchwave-builder .
55

66
docker run --rm --name devkitpro-switchwave \
77
-v "$(pwd)":/mnt/ \

0 commit comments

Comments
 (0)