Skip to content

Commit

Permalink
Added make-release.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelomer committed Aug 31, 2021
1 parent d821866 commit 73e73b8
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 7 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ otherlibs/libfmod_SDL.so
otherlibs/libFNA3D.so.0
otherlibs/libSDL2-2.0.so.0
otherlibs/fmodstudioapi20202linux
Celeste
Celeste
Celeste-ARM64-prebuilt
Celeste-ARM64-prebuilt.zip
31 changes: 31 additions & 0 deletions make-release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/usr/bin/env bash

set -e
cd "${0%/*}"

echo "[+] Removing existing release"
rm -rf Celeste-ARM64-prebuilt
rm -f Celeste-ARM64-prebuilt.zip
mkdir Celeste-ARM64-prebuilt

echo "[+] Building everything"

cd fmod
make clean all

cd ../otherlibs
make clean all

echo "[+] Copying binaries"
cd ../Celeste-ARM64-prebuilt
mkdir -p fmod
cp -vr ../fmod/patch_celeste.sh ../fmod/sound ../fmod/nosound fmod/
mkdir -p otherlibs
cp -v ../otherlibs/libFNA3D.so.0 ../otherlibs/libSDL2-2.0.so.0 ../otherlibs/libfmod_SDL.so otherlibs/

echo "[+] Copying scripts"
cp -v ../make-release.sh ../patch.sh ./

echo "[+] Creating zip"
cd ..
zip -r Celeste-ARM64-prebuilt.zip Celeste-ARM64-prebuilt
37 changes: 31 additions & 6 deletions patch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,22 @@ backup() {
}

cd otherlibs
echo "[+] Building libraries"
make
if [ -f Makefile ]; then
echo "[+] Building libraries"
make
else
echo "[i] Missing otherlibs/Makefile, skipping"
fi

cd ../fmod
echo "[+] Building FMOD preload"
make sound
skipped_fmod=0
if [ -f Makefile ]; then
echo "[+] Building FMOD preload"
make sound
else
skipped_fmod=1
echo "[i] Missing fmod/Makefile, skipping"
fi

cd ..
echo "[+] Patching Celeste.exe"
Expand All @@ -44,7 +54,22 @@ chmod +x "${celeste_dir}/Celeste"
echo "[+] Copying libraries to Celeste directory"
backup "${celeste_dir}/lib64"
mkdir -p "${celeste_dir}/lib64"
cp -H otherlibs/*.so* otherlibs/FMOD_SDL/libfmod.so.13 otherlibs/FMOD_SDL/libfmodstudio.so.13 "${celeste_dir}/lib64/"
if [ "${skipped_fmod}" -ne 1 ]; then
cp -H otherlibs/FMOD_SDL/libfmod.so.13 otherlibs/FMOD_SDL/libfmodstudio.so.13 "${celeste_dir}/lib64/"
else
cat <<'EOF'
This release does not contain fmod libraries.
Download these libraries from https://fmod.com/download and copy
the arm64 libraries libfmod.so.13 and libfmodstudio.so.13 to the
lib64 folder in the Celeste folder.
EOF
fi
cp -H otherlibs/*.so* "${celeste_dir}/lib64/"
cd "${celeste_dir}/lib64/"
ln -s libfmod.so.13 libfmod.so.10
ln -s libfmodstudio.so.13 libfmodstudio.so.10
ln -s libfmodstudio.so.13 libfmodstudio.so.10

echo "[+] Successfully patched Celeste"

0 comments on commit 73e73b8

Please sign in to comment.