From f6f7e8dc2c400460a560ab71a8bea13f37d8043f Mon Sep 17 00:00:00 2001 From: MisterSheeple <27652712+MisterSheeple@users.noreply.github.com> Date: Thu, 4 Jul 2024 06:50:57 +0000 Subject: [PATCH 01/34] Update Dockerfile to latest Ubuntu LTS --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index c0d33680..4f9692b0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:22.04 as build +FROM ubuntu:24.04 as build # --- basic package installation --- RUN apt-get update && \ From 38dd02eeadcf0a1c167665a1594122df13cd02ee Mon Sep 17 00:00:00 2001 From: MisterSheeple <27652712+MisterSheeple@users.noreply.github.com> Date: Thu, 4 Jul 2024 07:31:28 +0000 Subject: [PATCH 02/34] Add fixes for Ubuntu 24.04 in Dockerfile --- Dockerfile | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4f9692b0..0535d2bc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,8 @@ RUN apt-get update && \ # --- 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 +# why bother setting up a venv for this, right? ¯\_(ツ)_/¯ +RUN pip install --break-system-packages -r /temp/requirements.txt RUN rm -rf /temp # --- wibo installation --- @@ -23,26 +24,26 @@ 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 +# assume yes for in-script apt commands RUN sed -i 's/^apt-get.*$/& -y/g' install-devkitpro-pacman -## now do dkp-pacman installation +# 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. +# 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 +# and finally, we get to install devkitPPC RUN dkp-pacman -S devkitPPC --noconfirm -## dear fucking god this is hacky but it works (needed otherwise next step fails) -RUN rm /usr/bin/cpp /usr/bin/g++ -## set devkitPPC executables as the default ones +# dear fucking god this is hacky but it works (needed otherwise next step fails) +RUN rm /usr/bin/cpp /usr/bin/g++ /lib/cpp +# set devkitPPC executables as the default ones RUN for file in $(find "/opt/devkitpro/devkitPPC/bin" -type f -name 'powerpc-eabi*'); do new_file=$(basename "$file" | sed 's/powerpc-eabi-//g'); update-alternatives --install "/usr/bin/$new_file" "$new_file" "$file" 0; done # --- 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. +# 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 +# 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 --- From f7474d2ff9f05ec6ee44466047e15c3782f32c33 Mon Sep 17 00:00:00 2001 From: MisterSheeple <27652712+MisterSheeple@users.noreply.github.com> Date: Fri, 5 Jul 2024 03:59:20 +0000 Subject: [PATCH 03/34] a few quality of life updates to the dockerfile --- Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 0535d2bc..3186b800 100644 --- a/Dockerfile +++ b/Dockerfile @@ -39,7 +39,6 @@ RUN rm /usr/bin/cpp /usr/bin/g++ /lib/cpp RUN for file in $(find "/opt/devkitpro/devkitPPC/bin" -type f -name 'powerpc-eabi*'); do new_file=$(basename "$file" | sed 's/powerpc-eabi-//g'); update-alternatives --install "/usr/bin/$new_file" "$new_file" "$file" 0; done # --- 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 "{}" \; From c52f83907fef6b72735aa506e87b77afc2efdf97 Mon Sep 17 00:00:00 2001 From: MisterSheeple <27652712+MisterSheeple@users.noreply.github.com> Date: Thu, 1 Aug 2024 16:10:43 +0000 Subject: [PATCH 04/34] Clean up extraneous comments in dockerfile --- Dockerfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3186b800..4661476f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,12 +26,10 @@ 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 # dear fucking god this is hacky but it works (needed otherwise next step fails) RUN rm /usr/bin/cpp /usr/bin/g++ /lib/cpp From c151492f7ce2ccb9295844e37455f0ea3475318f Mon Sep 17 00:00:00 2001 From: MisterSheeple <27652712+MisterSheeple@users.noreply.github.com> Date: Mon, 5 Aug 2024 03:11:58 +0000 Subject: [PATCH 05/34] Add compiler download & setup --- Dockerfile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Dockerfile b/Dockerfile index 4661476f..2ebafc3c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,6 +16,12 @@ COPY ./tools/ppcdis/requirements.txt /temp/tools/ppcdis/requirements.txt RUN pip install --break-system-packages -r /temp/requirements.txt RUN rm -rf /temp +# --- compiler download and setup --- +RUN wget https://files.decomp.dev/compilers_latest.zip +RUN mkdir compilers_temp && unzip compilers_latest.zip -d compilers_temp +RUN mv compilers_temp/GC/1.2.5n/ tools/ && mv compilers_temp/GC/1.3.2/ tools/ && mv compilers_temp/GC/1.3.2r/ tools/ +RUN rm -r compilers_temp compilers_latest.zip + # --- wibo installation --- RUN wget https://github.com/decompals/wibo/releases/download/0.6.13/wibo RUN install ./wibo /usr/bin From 27668ab595c3b201f333d688996f020de0a832f3 Mon Sep 17 00:00:00 2001 From: MisterSheeple <27652712+MisterSheeple@users.noreply.github.com> Date: Mon, 5 Aug 2024 03:21:34 +0000 Subject: [PATCH 06/34] Fix missing unzip install and fix compilers not going in the right folder --- Dockerfile | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2ebafc3c..36d152ae 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,9 @@ FROM ubuntu:24.04 as build +# --- set up work directory --- +RUN mkdir /ac-decomp +WORKDIR /ac-decomp + # --- basic package installation --- RUN apt-get update && \ apt-get install -y \ @@ -7,6 +11,7 @@ RUN apt-get update && \ ninja-build \ python3 \ python3-pip \ + unzip \ wget # --- python package installation --- @@ -19,7 +24,7 @@ RUN rm -rf /temp # --- compiler download and setup --- RUN wget https://files.decomp.dev/compilers_latest.zip RUN mkdir compilers_temp && unzip compilers_latest.zip -d compilers_temp -RUN mv compilers_temp/GC/1.2.5n/ tools/ && mv compilers_temp/GC/1.3.2/ tools/ && mv compilers_temp/GC/1.3.2r/ tools/ +RUN mv compilers_temp/GC/1.2.5n/ /ac-decomp/tools/ && mv compilers_temp/GC/1.3.2/ /ac-decomp/tools/ && mv compilers_temp/GC/1.3.2r/ /ac-decomp/tools/ RUN rm -r compilers_temp compilers_latest.zip # --- wibo installation --- @@ -49,9 +54,7 @@ RUN cd /N64_SDK/ultra/usr/ && find -type f -maxdepth 1 -delete && find . -not -n # 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 +# --- set up env vars --- ENV PATH="/ac-decomp/tools:${PATH}" ENV N64_SDK="/N64_SDK" ENV DEVKITPPC="/opt/devkitpro/devkitPPC" From a8c47cba590f93de7b4bc2f939071a3cb7bd44fc Mon Sep 17 00:00:00 2001 From: MisterSheeple <27652712+MisterSheeple@users.noreply.github.com> Date: Mon, 5 Aug 2024 03:41:47 +0000 Subject: [PATCH 07/34] Undo most of previous commit --- Dockerfile | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 36d152ae..a14af6fd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,5 @@ FROM ubuntu:24.04 as build -# --- set up work directory --- -RUN mkdir /ac-decomp -WORKDIR /ac-decomp - # --- basic package installation --- RUN apt-get update && \ apt-get install -y \ @@ -24,7 +20,7 @@ RUN rm -rf /temp # --- compiler download and setup --- RUN wget https://files.decomp.dev/compilers_latest.zip RUN mkdir compilers_temp && unzip compilers_latest.zip -d compilers_temp -RUN mv compilers_temp/GC/1.2.5n/ /ac-decomp/tools/ && mv compilers_temp/GC/1.3.2/ /ac-decomp/tools/ && mv compilers_temp/GC/1.3.2r/ /ac-decomp/tools/ +RUN mv compilers_temp/GC/1.2.5n/ tools/ && mv compilers_temp/GC/1.3.2/ tools/ && mv compilers_temp/GC/1.3.2r/ tools/ RUN rm -r compilers_temp compilers_latest.zip # --- wibo installation --- @@ -54,7 +50,9 @@ RUN cd /N64_SDK/ultra/usr/ && find -type f -maxdepth 1 -delete && find . -not -n # 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 env vars --- +# --- 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" From 97a29a89b735cee15daf013720fab9f3743f72c9 Mon Sep 17 00:00:00 2001 From: MisterSheeple <27652712+MisterSheeple@users.noreply.github.com> Date: Mon, 5 Aug 2024 03:56:13 +0000 Subject: [PATCH 08/34] Revert compiler downloading for now --- Dockerfile | 7 ------- 1 file changed, 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index a14af6fd..4661476f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,6 @@ RUN apt-get update && \ ninja-build \ python3 \ python3-pip \ - unzip \ wget # --- python package installation --- @@ -17,12 +16,6 @@ COPY ./tools/ppcdis/requirements.txt /temp/tools/ppcdis/requirements.txt RUN pip install --break-system-packages -r /temp/requirements.txt RUN rm -rf /temp -# --- compiler download and setup --- -RUN wget https://files.decomp.dev/compilers_latest.zip -RUN mkdir compilers_temp && unzip compilers_latest.zip -d compilers_temp -RUN mv compilers_temp/GC/1.2.5n/ tools/ && mv compilers_temp/GC/1.3.2/ tools/ && mv compilers_temp/GC/1.3.2r/ tools/ -RUN rm -r compilers_temp compilers_latest.zip - # --- wibo installation --- RUN wget https://github.com/decompals/wibo/releases/download/0.6.13/wibo RUN install ./wibo /usr/bin From 978aa21e02d8a24a349ba5d6b0d17200752bc103 Mon Sep 17 00:00:00 2001 From: MisterSheeple <27652712+MisterSheeple@users.noreply.github.com> Date: Mon, 5 Aug 2024 04:09:57 +0000 Subject: [PATCH 09/34] Create build-docker.sh --- build-docker.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 build-docker.sh diff --git a/build-docker.sh b/build-docker.sh new file mode 100644 index 00000000..f4ee9cc8 --- /dev/null +++ b/build-docker.sh @@ -0,0 +1,13 @@ +docker build -t ac-decomp . +if [ -e /bin/curl ]; then + curl -O https://files.decomp.dev/compilers_latest.zip +elif [ -e /bin/wget ]; then + wget https://files.decomp.dev/compilers_latest.zip +else + echo "You do not seem to have curl or wget installed on this system. Please install one or the other to continue." + exit 0 +fi + +mkdir compilers_temp && if [ -e /bin/unzip ]; then unzip compilers_latest.zip -d compilers_temp; else echo "You do not seem to have unzip installed on this system. Please install it to continue."; exit 1; fi +mv compilers_temp/GC/1.2.5n/ tools/ && mv compilers_temp/GC/1.3.2/ tools/ && mv compilers_temp/GC/1.3.2r/ tools/ +echo "Docker image setup is now complete. You may proceed with the instructions." From 74e6e24589fb4570b1ffc6b68e49d2e84ba872f5 Mon Sep 17 00:00:00 2001 From: MisterSheeple <27652712+MisterSheeple@users.noreply.github.com> Date: Mon, 5 Aug 2024 04:13:50 +0000 Subject: [PATCH 10/34] Create build-docker.bat --- build-docker.bat | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 build-docker.bat diff --git a/build-docker.bat b/build-docker.bat new file mode 100644 index 00000000..2df1ccf1 --- /dev/null +++ b/build-docker.bat @@ -0,0 +1,7 @@ +docker build -t ac-decomp . +curl -O https://files.decomp.dev/compilers_latest.zip +Expand-Archive -LiteralPath compilers_latest.zip -DestinationPath compilers_temp +move compilers_temp\GC\1.2.5n\ tools\ && mv compilers_temp\GC\1.3.2\ tools\ && mv compilers_temp\GC\1.3.2r\ tools\ +Remove-Item compilers_latest.zip +Remove-Item -Path compilers_temp\ -Recurse +echo "Docker image setup is now complete. You may proceed with the instructions." From 9db2f8d990dc2930553fdb12ce3000722d50739c Mon Sep 17 00:00:00 2001 From: MisterSheeple <27652712+MisterSheeple@users.noreply.github.com> Date: Mon, 5 Aug 2024 04:15:28 +0000 Subject: [PATCH 11/34] Update build-docker.sh --- build-docker.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/build-docker.sh b/build-docker.sh index f4ee9cc8..0e3d8298 100644 --- a/build-docker.sh +++ b/build-docker.sh @@ -8,6 +8,13 @@ else exit 0 fi -mkdir compilers_temp && if [ -e /bin/unzip ]; then unzip compilers_latest.zip -d compilers_temp; else echo "You do not seem to have unzip installed on this system. Please install it to continue."; exit 1; fi +mkdir compilers_temp +if [ -e /bin/unzip ]; then + unzip compilers_latest.zip -d compilers_temp +else + echo "You do not seem to have unzip installed on this system. Please install it to continue." + exit 1 +fi mv compilers_temp/GC/1.2.5n/ tools/ && mv compilers_temp/GC/1.3.2/ tools/ && mv compilers_temp/GC/1.3.2r/ tools/ +rm -r compilers_temp compilers_latest.zip echo "Docker image setup is now complete. You may proceed with the instructions." From acd1982abdead01784190088fcfa576efcb2b6d2 Mon Sep 17 00:00:00 2001 From: MisterSheeple <27652712+MisterSheeple@users.noreply.github.com> Date: Mon, 5 Aug 2024 04:19:35 +0000 Subject: [PATCH 12/34] Rename build-docker.bat to build-docker.ps1 --- build-docker.bat => build-docker.ps1 | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename build-docker.bat => build-docker.ps1 (100%) diff --git a/build-docker.bat b/build-docker.ps1 similarity index 100% rename from build-docker.bat rename to build-docker.ps1 From c97aed3ab1e9531c2500dd3c15dfd63c8272da93 Mon Sep 17 00:00:00 2001 From: MisterSheeple <27652712+MisterSheeple@users.noreply.github.com> Date: Mon, 5 Aug 2024 04:20:29 +0000 Subject: [PATCH 13/34] Update README.MD --- README.MD | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/README.MD b/README.MD index 2c0ac959..8d738847 100644 --- a/README.MD +++ b/README.MD @@ -19,11 +19,10 @@ Use `--recursive` when cloning to have ppcdis in the repository. 1. [Dump a copy of the game](./docs/extract_game.md) and extract all files. 2. Place **main.dol**, **foresta.rel.szs**, **forest_1st.arc**, and **forest_2nd.arc** in *dump/*. -3. Download the [CodeWarrior 1.3.2, 1.3.2r, and 1.2.5n compilers](https://files.decomp.dev/compilers_latest.zip) and extract them to *tools/1.3.2/*, *tools/1.3.2r/*, and *tools/1.2.5n/*, respectively. -4. Install Docker. -5. Build the Docker image (`docker build -t ac-decomp .`). -6. Run configure.py (`docker run --rm -v ${PWD}:/ac-decomp ac-decomp python3 configure.py`). -7. Run build.py (`docker run --rm -v ${PWD}:/ac-decomp ac-decomp python3 build.py`). +3. Install Docker. +4. Build the Docker image. If using MacOS or Linux, run `chmod +x build-docker.sh && ./build-docker.sh`. If using Windows, run the `build-docker.ps1` file. +5. Run configure.py (`docker run --rm -v ${PWD}:/ac-decomp ac-decomp python3 configure.py`). +6. Run build.py (`docker run --rm -v ${PWD}:/ac-decomp ac-decomp python3 build.py`). ### Build manually From c8e7d5377d65e5e46e60657b8372899a23f2fc7f Mon Sep 17 00:00:00 2001 From: MisterSheeple <27652712+MisterSheeple@users.noreply.github.com> Date: Mon, 5 Aug 2024 04:56:39 +0000 Subject: [PATCH 14/34] Update and rename build-docker.ps1 to build-docker.bat --- build-docker.bat | 15 +++++++++++++++ build-docker.ps1 | 7 ------- 2 files changed, 15 insertions(+), 7 deletions(-) create mode 100644 build-docker.bat delete mode 100644 build-docker.ps1 diff --git a/build-docker.bat b/build-docker.bat new file mode 100644 index 00000000..72841f7e --- /dev/null +++ b/build-docker.bat @@ -0,0 +1,15 @@ +@echo off +echo "Please ensure Docker Desktop is running before you continue." +pause +docker build -t ac-decomp . +curl -O https://files.decomp.dev/compilers_latest.zip +mkdir compilers_temp +tar -xf compilers_latest.zip -C compilers_temp +xcopy compilers_temp\GC\1.2.5n\ tools\1.2.5n\ /E /I +xcopy compilers_temp\GC\1.3.2\ tools\1.3.2\ /E /I +xcopy compilers_temp\GC\1.3.2r\ tools\1.3.2r\ /E /I +del compilers_latest.zip +rmdir /S /Q compilers_temp\ +echo "Docker image setup is now complete. You may proceed with the instructions." +pause +exit diff --git a/build-docker.ps1 b/build-docker.ps1 deleted file mode 100644 index 2df1ccf1..00000000 --- a/build-docker.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -docker build -t ac-decomp . -curl -O https://files.decomp.dev/compilers_latest.zip -Expand-Archive -LiteralPath compilers_latest.zip -DestinationPath compilers_temp -move compilers_temp\GC\1.2.5n\ tools\ && mv compilers_temp\GC\1.3.2\ tools\ && mv compilers_temp\GC\1.3.2r\ tools\ -Remove-Item compilers_latest.zip -Remove-Item -Path compilers_temp\ -Recurse -echo "Docker image setup is now complete. You may proceed with the instructions." From 17a86201c6350e76386936182ae22d1478d2e2c6 Mon Sep 17 00:00:00 2001 From: MisterSheeple <27652712+MisterSheeple@users.noreply.github.com> Date: Mon, 5 Aug 2024 04:57:24 +0000 Subject: [PATCH 15/34] Update README.MD --- README.MD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.MD b/README.MD index 8d738847..92eae8eb 100644 --- a/README.MD +++ b/README.MD @@ -20,7 +20,7 @@ Use `--recursive` when cloning to have ppcdis in the repository. 1. [Dump a copy of the game](./docs/extract_game.md) and extract all files. 2. Place **main.dol**, **foresta.rel.szs**, **forest_1st.arc**, and **forest_2nd.arc** in *dump/*. 3. Install Docker. -4. Build the Docker image. If using MacOS or Linux, run `chmod +x build-docker.sh && ./build-docker.sh`. If using Windows, run the `build-docker.ps1` file. +4. Build the Docker image. If using MacOS or Linux (including WSL), run `chmod +x build-docker.sh && ./build-docker.sh`. If using Windows, run the `build-docker.bat` file. 5. Run configure.py (`docker run --rm -v ${PWD}:/ac-decomp ac-decomp python3 configure.py`). 6. Run build.py (`docker run --rm -v ${PWD}:/ac-decomp ac-decomp python3 build.py`). From 98d1884cffcd423b93cb9e21d85dbb934f522046 Mon Sep 17 00:00:00 2001 From: MisterSheeple <27652712+MisterSheeple@users.noreply.github.com> Date: Mon, 5 Aug 2024 05:03:10 +0000 Subject: [PATCH 16/34] Add notifier to make sure user has Docker --- build-docker.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build-docker.sh b/build-docker.sh index 0e3d8298..4d01dc82 100644 --- a/build-docker.sh +++ b/build-docker.sh @@ -1,3 +1,5 @@ +echo "Ensure Docker has been properly installed before continuing." +read -p "Press enter to continue or CTRL-C to exit." docker build -t ac-decomp . if [ -e /bin/curl ]; then curl -O https://files.decomp.dev/compilers_latest.zip From da21463aac05ed6eefd1596e7c85c74b3c619003 Mon Sep 17 00:00:00 2001 From: MisterSheeple <27652712+MisterSheeple@users.noreply.github.com> Date: Mon, 5 Aug 2024 05:03:38 +0000 Subject: [PATCH 17/34] Make messaging more consistent --- build-docker.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-docker.bat b/build-docker.bat index 72841f7e..b752d425 100644 --- a/build-docker.bat +++ b/build-docker.bat @@ -1,5 +1,5 @@ @echo off -echo "Please ensure Docker Desktop is running before you continue." +echo "Please ensure Docker Desktop is running before continuing." pause docker build -t ac-decomp . curl -O https://files.decomp.dev/compilers_latest.zip From 544e49b52412ad10056778e24058e56a9cdd0ab8 Mon Sep 17 00:00:00 2001 From: MisterSheeple <27652712+MisterSheeple@users.noreply.github.com> Date: Mon, 5 Aug 2024 05:04:04 +0000 Subject: [PATCH 18/34] Make messaging more consistent --- build-docker.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-docker.sh b/build-docker.sh index 4d01dc82..503350ad 100644 --- a/build-docker.sh +++ b/build-docker.sh @@ -1,4 +1,4 @@ -echo "Ensure Docker has been properly installed before continuing." +echo "Please ensure Docker has been properly installed before continuing." read -p "Press enter to continue or CTRL-C to exit." docker build -t ac-decomp . if [ -e /bin/curl ]; then From c7554be7cdebf01cba13f35fcf300462781f9c15 Mon Sep 17 00:00:00 2001 From: MisterSheeple <27652712+MisterSheeple@users.noreply.github.com> Date: Mon, 5 Aug 2024 05:04:21 +0000 Subject: [PATCH 19/34] Update build-docker.sh --- build-docker.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-docker.sh b/build-docker.sh index 503350ad..872eb728 100644 --- a/build-docker.sh +++ b/build-docker.sh @@ -1,5 +1,5 @@ echo "Please ensure Docker has been properly installed before continuing." -read -p "Press enter to continue or CTRL-C to exit." +read -p "Press Enter to continue or CTRL-C to exit." docker build -t ac-decomp . if [ -e /bin/curl ]; then curl -O https://files.decomp.dev/compilers_latest.zip From 67b717649a9637fd939906ac824321f8884027c9 Mon Sep 17 00:00:00 2001 From: MisterSheeple <27652712+MisterSheeple@users.noreply.github.com> Date: Mon, 5 Aug 2024 05:04:43 +0000 Subject: [PATCH 20/34] Update build-docker.sh --- build-docker.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-docker.sh b/build-docker.sh index 872eb728..c99ea0a0 100644 --- a/build-docker.sh +++ b/build-docker.sh @@ -1,4 +1,4 @@ -echo "Please ensure Docker has been properly installed before continuing." +echo "Please ensure Docker is installed before continuing." read -p "Press Enter to continue or CTRL-C to exit." docker build -t ac-decomp . if [ -e /bin/curl ]; then From 36d2f9a8fd459d5a5e34cf2669df3393afde2f01 Mon Sep 17 00:00:00 2001 From: MisterSheeple <27652712+MisterSheeple@users.noreply.github.com> Date: Mon, 5 Aug 2024 05:06:02 +0000 Subject: [PATCH 21/34] Update build-docker.sh --- build-docker.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build-docker.sh b/build-docker.sh index c99ea0a0..4ed73dc4 100644 --- a/build-docker.sh +++ b/build-docker.sh @@ -15,6 +15,8 @@ if [ -e /bin/unzip ]; then unzip compilers_latest.zip -d compilers_temp else echo "You do not seem to have unzip installed on this system. Please install it to continue." + rm compilers_latest.zip + rm -r compilers_temp exit 1 fi mv compilers_temp/GC/1.2.5n/ tools/ && mv compilers_temp/GC/1.3.2/ tools/ && mv compilers_temp/GC/1.3.2r/ tools/ From 005bb9c13d9263617ea66d0d3dc24bc47eac5ed1 Mon Sep 17 00:00:00 2001 From: MisterSheeple <27652712+MisterSheeple@users.noreply.github.com> Date: Mon, 5 Aug 2024 05:09:18 +0000 Subject: [PATCH 22/34] Update README.MD --- README.MD | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.MD b/README.MD index 92eae8eb..bc42ff02 100644 --- a/README.MD +++ b/README.MD @@ -7,6 +7,7 @@ Decompilation in progress of Animal Crossing (GAFE01) A decompilation of the original N64 version of the game is being worked on [here](https://github.com/zeldaret/af). + ## Cloning Use `--recursive` when cloning to have ppcdis in the repository. @@ -26,7 +27,7 @@ Use `--recursive` when cloning to have ppcdis in the repository. ### Build manually -> ℹ️ When building manually from a work directory originally used for Docker, you will need to run `sudo ninja -t clean` for the build to execute properly. +> ℹ️ When building manually from a work directory previously used for Docker, you will need to run `sudo ninja -t clean` for the build to execute properly. 1. [Dump a copy of the game](./docs/extract_game.md) and extract all files. 2. Place **main.dol**, **foresta.rel.szs**, **forest_1st.arc**, and **forest_2nd.arc** in *dump/*. From 407de26eeefe8b8536e684b0d27b4d1bdd48829d Mon Sep 17 00:00:00 2001 From: MisterSheeple <27652712+MisterSheeple@users.noreply.github.com> Date: Mon, 5 Aug 2024 05:13:03 +0000 Subject: [PATCH 23/34] Make Windows disclaimer more detailed --- README.MD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.MD b/README.MD index bc42ff02..4ffbe3af 100644 --- a/README.MD +++ b/README.MD @@ -14,7 +14,7 @@ Use `--recursive` when cloning to have ppcdis in the repository. ## Building -> ℹ️ When using Windows, it's recommended to use WSL. +> ℹ️ The build is known to run disproportionately slow on Windows, so we recommend using WSL for both build methods when using Windows. ### Docker From d786d614f26c11f22ebdb16dd60ceacbe9b40e68 Mon Sep 17 00:00:00 2001 From: MisterSheeple <27652712+MisterSheeple@users.noreply.github.com> Date: Mon, 5 Aug 2024 05:14:16 +0000 Subject: [PATCH 24/34] Make messaging less redundant --- README.MD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.MD b/README.MD index 4ffbe3af..2ff5abd6 100644 --- a/README.MD +++ b/README.MD @@ -14,7 +14,7 @@ Use `--recursive` when cloning to have ppcdis in the repository. ## Building -> ℹ️ The build is known to run disproportionately slow on Windows, so we recommend using WSL for both build methods when using Windows. +> ℹ️ When using Windows, the build is known to run disproportionately slow when run natively, so we recommend using WSL. ### Docker From 079f8dce91b1f3927c3b4cbee3676793c79c4b57 Mon Sep 17 00:00:00 2001 From: MisterSheeple <27652712+MisterSheeple@users.noreply.github.com> Date: Mon, 5 Aug 2024 05:15:26 +0000 Subject: [PATCH 25/34] Fix typo --- README.MD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.MD b/README.MD index 2ff5abd6..de6f0773 100644 --- a/README.MD +++ b/README.MD @@ -14,7 +14,7 @@ Use `--recursive` when cloning to have ppcdis in the repository. ## Building -> ℹ️ When using Windows, the build is known to run disproportionately slow when run natively, so we recommend using WSL. +> ℹ️ When using Windows, the build is known to run disproportionately slow when ran natively, so we recommend using WSL. ### Docker From 7485a409e04f2b034448560fc757cf9eb08e74ca Mon Sep 17 00:00:00 2001 From: MisterSheeple <27652712+MisterSheeple@users.noreply.github.com> Date: Mon, 5 Aug 2024 05:15:51 +0000 Subject: [PATCH 26/34] Fix redundancy --- README.MD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.MD b/README.MD index de6f0773..27a6b2cd 100644 --- a/README.MD +++ b/README.MD @@ -14,7 +14,7 @@ Use `--recursive` when cloning to have ppcdis in the repository. ## Building -> ℹ️ When using Windows, the build is known to run disproportionately slow when ran natively, so we recommend using WSL. +> ℹ️ On Windows, the build is known to run disproportionately slow when ran natively, so we recommend using WSL. ### Docker From bf4a53bc3434372da0c6c066bb6918466ce92234 Mon Sep 17 00:00:00 2001 From: MisterSheeple <27652712+MisterSheeple@users.noreply.github.com> Date: Mon, 5 Aug 2024 05:18:49 +0000 Subject: [PATCH 27/34] Update README.MD --- README.MD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.MD b/README.MD index 27a6b2cd..f4db1dd1 100644 --- a/README.MD +++ b/README.MD @@ -36,7 +36,7 @@ Use `--recursive` when cloning to have ppcdis in the repository. 5. Install Python modules from requirements.txt (`pip install -r requirements.txt`). 6. Install version 0.6.13 of [wibo](https://github.com/decompals/wibo) - Wibo is a lightweight Wine replacement that's tailor-made for use with decomp projects. Regular Wine can be used if preferred, but for the purposes of this guide, these instructions will use wibo. - - Download [version 0.6.13 GitHub release](https://github.com/decompals/wibo/releases/tag/0.6.13) and run `install ./wibo /usr/bin` to install it to your system. + - Download the [GitHub release of version 0.6.13](https://github.com/decompals/wibo/releases/tag/0.6.13) and run `install ./wibo /usr/bin` to install it to your system. 7. Install devkitPPC. - To get devkitPPC, you'll need [devkitPro Pacman](https://devkitpro.org/wiki/devkitPro_pacman#Installing_devkitPro_Pacman). - Run `dkp-pacman -S devkitPPC` once dkp-pacman is installed to install devkitPPC. From 26a35d580f062dc4d41a584711dd846353c20c34 Mon Sep 17 00:00:00 2001 From: MisterSheeple <27652712+MisterSheeple@users.noreply.github.com> Date: Mon, 5 Aug 2024 05:21:43 +0000 Subject: [PATCH 28/34] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 4661476f..fbe6b183 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,7 +28,7 @@ RUN chmod +x install-devkitpro-pacman RUN sed -i 's/^apt-get.*$/& -y/g' install-devkitpro-pacman 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. +# workaround for a dumb 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 RUN dkp-pacman -S devkitPPC --noconfirm # dear fucking god this is hacky but it works (needed otherwise next step fails) From 2ea8e32049f44b6444201167e2ac81febdf2911d Mon Sep 17 00:00:00 2001 From: MisterSheeple <27652712+MisterSheeple@users.noreply.github.com> Date: Mon, 5 Aug 2024 05:26:13 +0000 Subject: [PATCH 29/34] Rename build-docker.bat to docker-setup.bat --- build-docker.bat => docker-setup.bat | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename build-docker.bat => docker-setup.bat (100%) diff --git a/build-docker.bat b/docker-setup.bat similarity index 100% rename from build-docker.bat rename to docker-setup.bat From f006b89fb5961b699f205db3d6e7ef686f8638e1 Mon Sep 17 00:00:00 2001 From: MisterSheeple <27652712+MisterSheeple@users.noreply.github.com> Date: Mon, 5 Aug 2024 05:26:26 +0000 Subject: [PATCH 30/34] Rename build-docker.sh to docker-setup.sh --- build-docker.sh => docker-setup.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename build-docker.sh => docker-setup.sh (100%) diff --git a/build-docker.sh b/docker-setup.sh similarity index 100% rename from build-docker.sh rename to docker-setup.sh From fc8522cb445b97dacc3fa6c9515d2ad40ad68fe0 Mon Sep 17 00:00:00 2001 From: MisterSheeple <27652712+MisterSheeple@users.noreply.github.com> Date: Mon, 5 Aug 2024 05:26:57 +0000 Subject: [PATCH 31/34] Make messaging less confusing --- README.MD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.MD b/README.MD index f4db1dd1..299986bf 100644 --- a/README.MD +++ b/README.MD @@ -21,7 +21,7 @@ Use `--recursive` when cloning to have ppcdis in the repository. 1. [Dump a copy of the game](./docs/extract_game.md) and extract all files. 2. Place **main.dol**, **foresta.rel.szs**, **forest_1st.arc**, and **forest_2nd.arc** in *dump/*. 3. Install Docker. -4. Build the Docker image. If using MacOS or Linux (including WSL), run `chmod +x build-docker.sh && ./build-docker.sh`. If using Windows, run the `build-docker.bat` file. +4. Set up the Docker image. If using MacOS or Linux (including WSL), run `chmod +x docker-setup.sh && ./docker-setup.sh`. If using Windows, run the `docker-setup.bat` file. 5. Run configure.py (`docker run --rm -v ${PWD}:/ac-decomp ac-decomp python3 configure.py`). 6. Run build.py (`docker run --rm -v ${PWD}:/ac-decomp ac-decomp python3 build.py`). From 014a0af0a1fa8597c3792e1b0a19a91c3b9c75cc Mon Sep 17 00:00:00 2001 From: MisterSheeple <27652712+MisterSheeple@users.noreply.github.com> Date: Mon, 5 Aug 2024 05:34:19 +0000 Subject: [PATCH 32/34] Rearrange docker command --- docker-setup.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-setup.bat b/docker-setup.bat index b752d425..e4c09736 100644 --- a/docker-setup.bat +++ b/docker-setup.bat @@ -1,7 +1,6 @@ @echo off echo "Please ensure Docker Desktop is running before continuing." pause -docker build -t ac-decomp . curl -O https://files.decomp.dev/compilers_latest.zip mkdir compilers_temp tar -xf compilers_latest.zip -C compilers_temp @@ -10,6 +9,7 @@ xcopy compilers_temp\GC\1.3.2\ tools\1.3.2\ /E /I xcopy compilers_temp\GC\1.3.2r\ tools\1.3.2r\ /E /I del compilers_latest.zip rmdir /S /Q compilers_temp\ +docker build -t ac-decomp . echo "Docker image setup is now complete. You may proceed with the instructions." pause exit From 1874c92f56d843fe67c904ce09a81c992835f9f8 Mon Sep 17 00:00:00 2001 From: MisterSheeple <27652712+MisterSheeple@users.noreply.github.com> Date: Mon, 5 Aug 2024 05:34:54 +0000 Subject: [PATCH 33/34] Rearrange docker command --- docker-setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-setup.sh b/docker-setup.sh index 4ed73dc4..8acf7a8b 100644 --- a/docker-setup.sh +++ b/docker-setup.sh @@ -1,6 +1,5 @@ echo "Please ensure Docker is installed before continuing." read -p "Press Enter to continue or CTRL-C to exit." -docker build -t ac-decomp . if [ -e /bin/curl ]; then curl -O https://files.decomp.dev/compilers_latest.zip elif [ -e /bin/wget ]; then @@ -21,4 +20,5 @@ else fi mv compilers_temp/GC/1.2.5n/ tools/ && mv compilers_temp/GC/1.3.2/ tools/ && mv compilers_temp/GC/1.3.2r/ tools/ rm -r compilers_temp compilers_latest.zip +docker build -t ac-decomp . echo "Docker image setup is now complete. You may proceed with the instructions." From 62a22b242a1fe05828c88fad657d2caca4dc1537 Mon Sep 17 00:00:00 2001 From: MisterSheeple <27652712+MisterSheeple@users.noreply.github.com> Date: Mon, 5 Aug 2024 05:45:05 +0000 Subject: [PATCH 34/34] Improve existence checks --- docker-setup.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docker-setup.sh b/docker-setup.sh index 8acf7a8b..65453b80 100644 --- a/docker-setup.sh +++ b/docker-setup.sh @@ -1,8 +1,8 @@ echo "Please ensure Docker is installed before continuing." read -p "Press Enter to continue or CTRL-C to exit." -if [ -e /bin/curl ]; then +if command -v curl &> /dev/null; then curl -O https://files.decomp.dev/compilers_latest.zip -elif [ -e /bin/wget ]; then +elif command -v wget &> /dev/null; then wget https://files.decomp.dev/compilers_latest.zip else echo "You do not seem to have curl or wget installed on this system. Please install one or the other to continue." @@ -10,7 +10,7 @@ else fi mkdir compilers_temp -if [ -e /bin/unzip ]; then +if command -v unzip &> /dev/null; then unzip compilers_latest.zip -d compilers_temp else echo "You do not seem to have unzip installed on this system. Please install it to continue."