From 1a40334f8e8fa632129754c24f4b06e6bdd321f1 Mon Sep 17 00:00:00 2001 From: minjaesong Date: Wed, 16 Aug 2023 22:26:27 +0900 Subject: [PATCH] auto zip for .app packaging --- buildapp/build_app_mac_arm.sh | 7 ++++++- buildapp/build_app_mac_x86.sh | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/buildapp/build_app_mac_arm.sh b/buildapp/build_app_mac_arm.sh index 13e2d7c23..bdd425b21 100755 --- a/buildapp/build_app_mac_arm.sh +++ b/buildapp/build_app_mac_arm.sh @@ -3,7 +3,8 @@ if (( $EUID == 0 )); then echo "The build process is not meant to be run with ro cd "${0%/*}" SRCFILES="terrarummac_arm" -DESTDIR="out/TerrarumMac.arm.app" +APPDIR="./TerrarumMac.arm.app" +DESTDIR="out/$APPDIR" RUNTIME="runtime-osx-arm" if [ ! -d "../assets_release" ]; then @@ -34,4 +35,8 @@ cp -r "../assets_release" $DESTDIR/Contents/MacOS/ mv $DESTDIR/Contents/MacOS/assets_release $DESTDIR/Contents/MacOS/assets cp "../out/TerrarumBuild.jar" $DESTDIR/Contents/MacOS/out/ +cd "out" +rm $APPDIR.zip +7z a -tzip $APPDIR.zip $APPDIR + echo "Build successful: $DESTDIR" diff --git a/buildapp/build_app_mac_x86.sh b/buildapp/build_app_mac_x86.sh index f255b604c..dde0fd1e9 100755 --- a/buildapp/build_app_mac_x86.sh +++ b/buildapp/build_app_mac_x86.sh @@ -3,7 +3,8 @@ if (( $EUID == 0 )); then echo "The build process is not meant to be run with ro cd "${0%/*}" SRCFILES="terrarummac_x86" -DESTDIR="out/TerrarumMac.x86.app" +APPDIR="./TerrarumMac.x86.app" +DESTDIR="out/$APPDIR" RUNTIME="runtime-osx-x86" if [ ! -d "../assets_release" ]; then @@ -34,4 +35,8 @@ cp -r "../assets_release" $DESTDIR/Contents/MacOS/ mv $DESTDIR/Contents/MacOS/assets_release $DESTDIR/Contents/MacOS/assets cp "../out/TerrarumBuild.jar" $DESTDIR/Contents/MacOS/out/ +cd "out" +rm $APPDIR.zip +7z a -tzip $APPDIR.zip $APPDIR + echo "Build successful: $DESTDIR"