build script update

This commit is contained in:
minjaesong
2023-04-15 11:48:42 +09:00
parent d69d8dabde
commit bae212e51f
5 changed files with 52 additions and 10 deletions

View File

@@ -1,8 +1,16 @@
#!/bin/bash
if (( $EUID == 0 )); then echo "The build process is not meant to be run with root privilege, exiting now." >&2; exit 1; fi
cd "${0%/*}"
SRCFILES="terrarummac_arm"
DESTDIR="out/TerrarumMac.arm.app"
RUNTIME="runtime-osx-arm"
if [ ! -d "../assets_release" ]; then
echo "'assets_release' does not exist; prepare the assets for the release and put them into the assets_release directory, exiting now." >&2
exit 1
fi
# Cleanup
rm -rf $DESTDIR || true
mkdir $DESTDIR
@@ -19,7 +27,8 @@ chmod +x $DESTDIR/Contents/MacOS/Terrarum.sh
cp -r "../out/$RUNTIME" $DESTDIR/Contents/MacOS/
# Copy over all the assets and a jarfile
cp -r "../assets" $DESTDIR/Contents/MacOS/
cp -r "../assets_release" $DESTDIR/Contents/MacOS/
mv $DESTDIR/Contents/MacOS/assets_release $DESTDIR/Contents/MacOS/assets
cp -r "../out/TerrarumBuild.jar" $DESTDIR/Contents/MacOS/assets/
echo "Build successful: $DESTDIR"
echo "Build successful: $DESTDIR"