Application build scripts

This commit is contained in:
minjaesong
2022-02-23 11:52:34 +09:00
parent cba25ef428
commit 841a77403b
25 changed files with 223 additions and 82 deletions

29
buildapp/build_app_linux_arm.sh Executable file
View File

@@ -0,0 +1,29 @@
#!/bin/bash
cd "${0%/*}"
APPIMAGETOOL="appimagetool-x86_64.AppImage"
SRCFILES="terrarumlinux_arm"
DESTDIR="TerrarumLinux.arm"
RUNTIME="runtime-linux-arm"
# Cleanup
rm -rf $DESTDIR || true
mkdir $DESTDIR
# Prepare an application
cp icns.png $DESTDIR/icns.png
cp $SRCFILES/Terrarum.desktop $DESTDIR/
cp $SRCFILES/AppRun $DESTDIR/AppRun
chmod +x $DESTDIR/AppRun
# Copy over a Java runtime
cp -r "../out/$RUNTIME" $DESTDIR/
# Copy over all the assets and a jarfile
cp -r "../assets" $DESTDIR/
cp -r "../out/TerrarumBuild.jar" $DESTDIR/assets/
# Pack everything to AppImage
"./$APPIMAGETOOL" $DESTDIR "out/$DESTDIR.AppImage" || { echo 'Building AppImage failed' >&2; exit 1; }
chmod +x "out/$DESTDIR.AppImage"
rm -rf $DESTDIR || true
echo "Build successful: $DESTDIR"