Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM python:3.11

WORKDIR /home/
COPY install-devkitpro-pacman ./install-devkitpro-pacman
COPY entrypoint.sh ./entrypoint.sh

RUN ["/bin/bash", "-c", "apt update && apt install -y build-essential gcc-arm-none-eabi binutils-arm-none-eabi git vim libpng-dev python3 wget"]
RUN ["/bin/bash", "-c", "git clone https://github.com/pret/agbcc"]
RUN ["/bin/bash", "-c","chmod +x ./install-devkitpro-pacman && ./install-devkitpro-pacman"]
RUN ["dkp-pacman", "-Sy"]
RUN ["/bin/bash", "-c", "ln -s /proc/self/mounts /etc/mtab && dkp-pacman -S gba-dev --noconfirm"]
COPY . /home/pokefirered
RUN ["/bin/bash", "-c", "cd /home/agbcc/ && ./build.sh && ./install.sh ../pokefirered/"]

WORKDIR /home/pokefirered

ENTRYPOINT ["make"]
6 changes: 6 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

source /etc/profile.d/devkit-env.sh

echo "Building pokemon $1"
cd /home/pokefirered/ && make $1
23 changes: 23 additions & 0 deletions install-devkitpro-pacman
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/env bash
if ! [ $(id -u) = 0 ]; then
echo "Need root privilege to install!"
exit 1
fi

# ensure apt is set up to work with https sources
apt-get install apt-transport-https

# Store devkitPro gpg key locally if we don't have it already
if ! [ -f /usr/share/keyring/devkitpro-pub.gpg ]; then
mkdir -p /usr/share/keyring/
wget -U "dkp apt" -O /usr/share/keyring/devkitpro-pub.gpg https://apt.devkitpro.org/devkitpro-pub.gpg
fi

# Add the devkitPro apt repository if we don't have it set up already
if ! [ -f /etc/apt/sources.list.d/devkitpro.list ]; then
echo "deb [signed-by=/usr/share/keyring/devkitpro-pub.gpg] https://apt.devkitpro.org stable main" > /etc/apt/sources.list.d/devkitpro.list
fi

# Finally install devkitPro pacman
apt-get update
apt-get install devkitpro-pacman -y