diff --git a/buildapp/build_app_linux_arm.sh b/buildapp/build_app_linux_arm.sh index a758bdda0..2e940ad1e 100755 --- a/buildapp/build_app_linux_arm.sh +++ b/buildapp/build_app_linux_arm.sh @@ -1,10 +1,17 @@ #!/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%/*}" APPIMAGETOOL="appimagetool-x86_64.AppImage" SRCFILES="terrarumlinux_arm" DESTDIR="TerrarumLinux.arm" RUNTIME="runtime-linux-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,11 +26,12 @@ chmod +x $DESTDIR/AppRun cp -r "../out/$RUNTIME" $DESTDIR/ # Copy over all the assets and a jarfile -cp -r "../assets" $DESTDIR/ +cp -r "../assets_release" $DESTDIR/ +mv $DESTDIR/assets_release $DESTDIR/assets 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" \ No newline at end of file +echo "Build successful: $DESTDIR" diff --git a/buildapp/build_app_linux_x86.sh b/buildapp/build_app_linux_x86.sh index 63f43a65a..69a498fe2 100755 --- a/buildapp/build_app_linux_x86.sh +++ b/buildapp/build_app_linux_x86.sh @@ -1,10 +1,17 @@ #!/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%/*}" APPIMAGETOOL="appimagetool-x86_64.AppImage" SRCFILES="terrarumlinux_x86" DESTDIR="TerrarumLinux.x86" RUNTIME="runtime-linux-x86" +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,11 +26,12 @@ chmod +x $DESTDIR/AppRun cp -r "../out/$RUNTIME" $DESTDIR/ # Copy over all the assets and a jarfile -cp -r "../assets" $DESTDIR/ +cp -r "../assets_release" $DESTDIR/ +mv $DESTDIR/assets_release $DESTDIR/assets 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" \ No newline at end of file +echo "Build successful: $DESTDIR" diff --git a/buildapp/build_app_mac_arm.sh b/buildapp/build_app_mac_arm.sh index 462f305c6..6c23790d3 100755 --- a/buildapp/build_app_mac_arm.sh +++ b/buildapp/build_app_mac_arm.sh @@ -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" \ No newline at end of file +echo "Build successful: $DESTDIR" diff --git a/buildapp/build_app_mac_x86.sh b/buildapp/build_app_mac_x86.sh index f6c431187..a67904546 100755 --- a/buildapp/build_app_mac_x86.sh +++ b/buildapp/build_app_mac_x86.sh @@ -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_x86" DESTDIR="out/TerrarumMac.x86.app" RUNTIME="runtime-osx-x86" + +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" \ No newline at end of file +echo "Build successful: $DESTDIR" diff --git a/buildapp/build_app_windows_x86.sh b/buildapp/build_app_windows_x86.sh index 49ecf865b..16fc78669 100755 --- a/buildapp/build_app_windows_x86.sh +++ b/buildapp/build_app_windows_x86.sh @@ -1,9 +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="terrarumwindows_x86" DESTDIR="TerrarumWindows.x86" RUNTIME="runtime-windows-x86" +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 @@ -15,10 +22,11 @@ cp $SRCFILES/Terrarum.bat $DESTDIR/ cp -r "../out/$RUNTIME" $DESTDIR/ # Copy over all the assets and a jarfile -cp -r "../assets" $DESTDIR/ +cp -r "../assets_release" $DESTDIR/ +mv $DESTDIR/assets_release $DESTDIR/assets cp -r "../out/TerrarumBuild.jar" $DESTDIR/assets/ # Temporary solution: zip everything zip -r -9 -l "out/TerrarumWindows.x86.zip" $DESTDIR rm -rf $DESTDIR || true -echo "Build successful: $DESTDIR" \ No newline at end of file +echo "Build successful: $DESTDIR"