mirror of
https://github.com/Zelda64Recomp/Zelda64Recomp.git
synced 2026-05-02 23:21:43 +00:00
install n64recomp tools
This commit is contained in:
parent
186008083b
commit
7f63d09f96
3 changed files with 64 additions and 0 deletions
|
|
@ -10,3 +10,6 @@ RUN if [ "${INSTALL_SDL2_VERSION_FROM_SOURCE}" != "none" ]; then \
|
||||||
chmod +x /tmp/install-sdl2.sh && /tmp/install-sdl2.sh ${INSTALL_SDL2_VERSION_FROM_SOURCE}; \
|
chmod +x /tmp/install-sdl2.sh && /tmp/install-sdl2.sh ${INSTALL_SDL2_VERSION_FROM_SOURCE}; \
|
||||||
fi \
|
fi \
|
||||||
&& rm -f /tmp/install-sdl2.sh
|
&& rm -f /tmp/install-sdl2.sh
|
||||||
|
|
||||||
|
RUN chmod +x /tmp/install-n64recomp.sh && /tmp/install-n64recomp.sh
|
||||||
|
RUN rm -f /tmp/install-n64recomp.sh
|
||||||
|
|
|
||||||
44
.devcontainer/install-n64recomp.sh
Normal file
44
.devcontainer/install-n64recomp.sh
Normal file
|
|
@ -0,0 +1,44 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Cleanup temporary directory and associated files when exiting the script.
|
||||||
|
cleanup() {
|
||||||
|
EXIT_CODE=$?
|
||||||
|
set +e
|
||||||
|
if [[ -n "${TMP_DIR}" ]]; then
|
||||||
|
echo "Executing cleanup of tmp files"
|
||||||
|
rm -Rf "${TMP_DIR}"
|
||||||
|
fi
|
||||||
|
exit $EXIT_CODE
|
||||||
|
}
|
||||||
|
trap cleanup EXIT
|
||||||
|
|
||||||
|
echo "Installing N64Recomp..."
|
||||||
|
|
||||||
|
architecture=$(dpkg --print-architecture)
|
||||||
|
case "${architecture}" in
|
||||||
|
arm64)
|
||||||
|
ARCH=aarch64 ;;
|
||||||
|
amd64)
|
||||||
|
ARCH=x86_64 ;;
|
||||||
|
*)
|
||||||
|
echo "Unsupported architecture ${architecture}."
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
TMP_DIR=$(mktemp -d -t n64recomp-XXXXXXXXXX)
|
||||||
|
|
||||||
|
echo "${TMP_DIR}"
|
||||||
|
cd "${TMP_DIR}"
|
||||||
|
|
||||||
|
git clone https://github.com/Mr-Wiseguy/N64Recomp.git --recurse-submodules N64RecompSource
|
||||||
|
cd N64RecompSource
|
||||||
|
|
||||||
|
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=g++-11 -DCMAKE_C_COMPILER=gcc-11 -DCMAKE_MAKE_PROGRAM=ninja -G Ninja -S . -B cmake-build
|
||||||
|
cmake --build cmake-build --config Release --target N64Recomp -j $(nproc)
|
||||||
|
cmake --build cmake-build --config Release --target RSPRecomp -j $(nproc)
|
||||||
|
|
||||||
|
sudo cp -v cmake-build/N64Recomp /usr/local/bin/
|
||||||
|
sudo cp -v cmake-build/RSPRecomp /usr/local/bin/
|
||||||
|
|
@ -23,6 +23,23 @@ trap cleanup EXIT
|
||||||
|
|
||||||
echo "Installing CMake..."
|
echo "Installing CMake..."
|
||||||
|
|
||||||
|
architecture=$(dpkg --print-architecture)
|
||||||
|
case "${architecture}" in
|
||||||
|
arm64)
|
||||||
|
ARCH=aarch64 ;;
|
||||||
|
amd64)
|
||||||
|
ARCH=x86_64 ;;
|
||||||
|
*)
|
||||||
|
echo "Unsupported architecture ${architecture}."
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
TMP_DIR=$(mktemp -d -t sdl2-XXXXXXXXXX)
|
||||||
|
|
||||||
|
echo "${TMP_DIR}"
|
||||||
|
cd "${TMP_DIR}"
|
||||||
|
|
||||||
wget https://www.libsdl.org/release/SDL2-${SDL2_VERSION}.tar.gz
|
wget https://www.libsdl.org/release/SDL2-${SDL2_VERSION}.tar.gz
|
||||||
tar -xzf SDL2-${SDL2_VERSION}.tar.gz
|
tar -xzf SDL2-${SDL2_VERSION}.tar.gz
|
||||||
cd SDL2-${SDL2_VERSION}
|
cd SDL2-${SDL2_VERSION}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue