mirror of
https://github.com/ACreTeam/ac-decomp
synced 2026-06-05 02:37:55 -04:00
0db4b04d70
* Initial Dockerfile implementation * Add wibo installation to dockerfile and also: - Organize dockerfile a little bit more - Add bash command for testing purposes, will probably be removed later * Fix missing python packages in dockerfile, oops * Add devkitPPC env var * Switch to ultralib instead thanos_oopsie_daisy.png * Dockerfile: fix many things * Add Docker build instructions also: - Fleshed out the existing build instructions a little bit * Dockerfile: don't hardcode installation of deps that are in requirements.txt also: - Updated dockerfile usage message * Made readme a little more clear also: - Fix some grammatical errors * Fix missing newline * Add missing comment * Remove extra sed parameter that I left in by accident * Simplify example commands in readme * Simplify example command in dockerfile * Fix devkitPPC installation not working on Docker for Windows * Make previous commit not break Linux building * README: Suggest against cmd prompt for Windows also: - Use platform-agnostic PWD variable in the command examples that'll work on both Windows and Linux. * Dockerfile: update example command to use platform-agnostic PWD * Fix borked symbol in readme * Move wibo notice to manual as docker always uses wibo * Fix readme link in Dockerfile 404ing * Dockerfile: remove holdover packages we don't need anymore * Dockerfile: handle cleanup better specifically: - delete duplicate wibo executable once installed - delete dkp-pacman install script when done - delete the parts of ultralib that aren't needed for this project * Add links to the other two compilers in readme * Add yaz0 tool for win32 * Add yaz0 command to readme * Improve build instructions * Make build instructions a little more clear * Make formatting more consistent * wait why am I adding windows instructions when it probably doesn't even build that way * Remove part that will probably cause confusion * fix an instance where I used the wrong word * denote that docker is the recommended build method * Add wibo instructions to manual section * Fix redundant phrasing * Re-arrange manual steps to match the order they occur in for docker * Finish what the previous commit set out to do * Remove more phrasing that could be considered redundant * Make a few things clearer * Dockerfile: switch ninja to apt per the advice of cuyler * README: for ninja installation send user to package manager page * Add diff.py dependencies to requirements.txt * Dockerfile: remove extra pip command because now everything is in requirements * Merge a few steps together * Fix missing word * Update inconsistent formatting * Sort requirements alphabetically * Remove recommended/not recommended labels * Change windows information bit to not be personified * Change wibo installation part to not be personified * Finish what previous commit aimed to do * Sort apt packages alphabetically * Add notice about a weird docker thing we encountered
53 lines
2.1 KiB
Docker
53 lines
2.1 KiB
Docker
FROM ubuntu:22.04 as build
|
|
|
|
# --- basic package installation ---
|
|
RUN apt-get update && \
|
|
apt-get install -y \
|
|
git \
|
|
ninja-build \
|
|
python3 \
|
|
python3-pip \
|
|
wget
|
|
|
|
# --- python package installation ---
|
|
COPY ./requirements.txt /temp/requirements.txt
|
|
COPY ./tools/ppcdis/requirements.txt /temp/tools/ppcdis/requirements.txt
|
|
RUN pip install -r /temp/requirements.txt
|
|
RUN rm -rf /temp
|
|
|
|
# --- wibo installation ---
|
|
RUN wget https://github.com/decompals/wibo/releases/latest/download/wibo
|
|
RUN install ./wibo /usr/bin
|
|
RUN rm wibo
|
|
|
|
# --- devkitpro installation ---
|
|
RUN wget https://apt.devkitpro.org/install-devkitpro-pacman
|
|
RUN chmod +x install-devkitpro-pacman
|
|
## assume yes for in-script apt commands
|
|
RUN sed -i 's/^apt-get.*$/& -y/g' install-devkitpro-pacman
|
|
## now do dkp-pacman installation
|
|
RUN ./install-devkitpro-pacman
|
|
RUN rm install-devkitpro-pacman
|
|
## workaround for a dumb WSL bug that happens with Windows Docker. if we don't do this, devkitPPC installation fails on Windows.
|
|
RUN if [ ! -e /etc/mtab ]; then ln -s /proc/self/mounts /etc/mtab; fi
|
|
## and finally, we get to install devkitPPC
|
|
RUN dkp-pacman -S devkitPPC --noconfirm
|
|
|
|
# --- stage ultralib headers ---
|
|
RUN mkdir -p /N64_SDK/ultra/usr/
|
|
RUN git clone https://github.com/decompals/ultralib.git /N64_SDK/ultra/usr/
|
|
## dockerfile does not seem to support extglob, so this monstrous command works around it to delete all of ultralib except the headers we need.
|
|
RUN cd /N64_SDK/ultra/usr/ && find -type f -maxdepth 1 -delete && find . -not -name 'include' -type d -maxdepth 1 -exec rm -r "{}" \;
|
|
## modify Gpopmtx's param member to be unsigned int
|
|
RUN sed -i 's/unsigned char param:8;/unsigned int param:8;/g' /N64_SDK/ultra/usr/include/PR/gbi.h
|
|
|
|
# --- set up work directory and env vars ---
|
|
RUN mkdir /ac-decomp
|
|
WORKDIR /ac-decomp
|
|
ENV PATH="/ac-decomp/tools:${PATH}"
|
|
ENV N64_SDK="/N64_SDK"
|
|
ENV DEVKITPPC="/opt/devkitpro/devkitPPC"
|
|
|
|
CMD echo 'Usage: docker run -it --rm -v ${PWD}:/ac-decomp ac-decomp python3 configure.py && ninja\n'\
|
|
'See https://github.com/Prakxo/ac-decomp/blob/master/README.MD for more information'
|