From 32fb784a62478b551bb4b04ad429389c94a73b1b Mon Sep 17 00:00:00 2001 From: theofficialgman <28281419+theofficialgman@users.noreply.github.com> Date: Wed, 6 Nov 2024 12:08:57 -0500 Subject: [PATCH] Godot: update to official 4.3 release and add auto-updater --- .github/workflows/updates/Godot.sh | 7 +++++++ apps/Godot/credits | 2 -- apps/Godot/description | 10 +++++----- apps/Godot/install | 28 ++++++++++++++++++++++++++++ apps/Godot/install-32 | 23 ----------------------- apps/Godot/install-64 | 26 -------------------------- apps/Godot/uninstall | 5 +---- apps/Godot/website | 2 +- etc/category-overrides-non-raspberry | 1 - 9 files changed, 42 insertions(+), 62 deletions(-) create mode 100755 .github/workflows/updates/Godot.sh create mode 100755 apps/Godot/install delete mode 100755 apps/Godot/install-32 delete mode 100755 apps/Godot/install-64 diff --git a/.github/workflows/updates/Godot.sh b/.github/workflows/updates/Godot.sh new file mode 100755 index 0000000000..10e9e0f6af --- /dev/null +++ b/.github/workflows/updates/Godot.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +version=$(get_release godotengine/godot) +armhf_url=https://github.com/godotengine/godot/releases/download/${version}/Godot_v${version}_linux.arm32.zip +arm64_url=https://github.com/godotengine/godot/releases/download/${version}/Godot_v${version}_linux.arm64.zip + +source $GITHUB_WORKSPACE/.github/workflows/update_github_script.sh diff --git a/apps/Godot/credits b/apps/Godot/credits index ba920c1fe8..c36e6ed1c1 100644 --- a/apps/Godot/credits +++ b/apps/Godot/credits @@ -1,3 +1 @@ -Credits to Irtexo for putting it on Pi-Apps. -Credits to Hiulit for porting it to the Raspberry Pi. Credits to Juan Linietsky and Ariel Manzur for creating Godot Engine. diff --git a/apps/Godot/description b/apps/Godot/description index d08bf8d57f..618cc5ef71 100644 --- a/apps/Godot/description +++ b/apps/Godot/description @@ -1,6 +1,6 @@ -Open Source Game Engine that runs fine on the Raspberry Pi (for 2d games). -For the export instructions for Raspberry Pi, go to the website. -This software will only run on the Raspberry Pi 4/Raspberry Pi 400. -GLES2 projects are recommended. +Your free, open‑source game engine. +Develop your 2D & 3D games, cross-platform projects, or even XR ideas! + +Godot 4.X requires Vulkan 1.0, OpenGL 3.3, or OpenGLES 3.0 compatible hardware (eg: Pi4 and newer) To run from GUI: Menu -> Programming -> Godot -To run in a terminal: ~/Godot/godot_*-stable_rpi4_editor* +To run in a terminal: godot diff --git a/apps/Godot/install b/apps/Godot/install new file mode 100755 index 0000000000..309fc95ce7 --- /dev/null +++ b/apps/Godot/install @@ -0,0 +1,28 @@ +#!/bin/bash +version=4.3-stable + +case "$arch" in +"64") wget -O /tmp/godot.zip https://github.com/godotengine/godot/releases/download/${version}/Godot_v${version}_linux.arm64.zip || exit 1 ;; +"32") wget -O /tmp/godot.zip https://github.com/godotengine/godot/releases/download/${version}/Godot_v${version}_linux.arm32.zip || exit 1 ;; +*) error "Failed to detect OS CPU architecture! Something is very wrong." ;; +esac + +sudo rm -rf /opt/godot-${version} /usr/local/bin/godot /usr/local/share/applications/godot-engine.desktop +sudo unzip /tmp/godot.zip -d /opt/godot-${version} || error "Failed to extract godot to /opt directory" +rm -f /tmp/godot.zip + +case "$arch" in +"64") sudo ln -s /opt/godot-${version}/Godot_v${version}_linux.arm64 /usr/local/bin/godot || error "Failed to create godot symlink" ;; +"32") sudo ln -s /opt/godot-${version}/Godot_v${version}_linux.arm32 /usr/local/bin/godot || error "Failed to create godot symlink" ;; +*) error "Failed to detect OS CPU architecture! Something is very wrong." ;; +esac + +echo "[Desktop Entry] +Name=Godot Engine +Comment=Your free, open‑source game engine. +Exec=/usr/local/bin/godot +Icon=$(dirname $0)/icon-64.png +Terminal=false +Type=Application +Categories=Development; +StartupNotify=true" | sudo tee /usr/local/share/applications/godot-engine.desktop > /dev/null diff --git a/apps/Godot/install-32 b/apps/Godot/install-32 deleted file mode 100755 index d88ef950f6..0000000000 --- a/apps/Godot/install-32 +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash -version=3.5.2 -version2=1.15.0 - -rm -rf ~/Godot -mkdir -p ~/Godot -cd ~/Godot || error "Could not change to directory" -wget -O godot.zip https://github.com/hiulit/Unofficial-Godot-Engine-Raspberry-Pi/releases/download/v${version2}/godot_${version}-stable_rpi4.zip || error "failed to download!" -unzip godot.zip -rm -f godot.zip -# IMPORTANT: 32bit arm is packaged differently than 64bit arm and contains a subfolder with the binaries. Check this whenever bumping releases -mv godot_${version}-stable_rpi4/* ./ -rm -rf godot_${version}-stable_rpi4 -echo "[Desktop Entry] -Name=Godot Engine -Comment=Best Opensource Game Engine -Path=$HOME/Godot -Exec=env MESA_GL_VERSION_OVERRIDE=3.3 $HOME/Godot/godot_${version}-stable_rpi4_editor_lto.bin -Icon=$(dirname $0)/icon-64.png -Terminal=false -Type=Application -Categories=Development; -StartupNotify=true" > ~/.local/share/applications/godot-engine.desktop diff --git a/apps/Godot/install-64 b/apps/Godot/install-64 deleted file mode 100755 index 3e209892a8..0000000000 --- a/apps/Godot/install-64 +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash -version=3.5.2 -version2=1.15.0 - -case $(get_codename) in -buster|bionic) - error "Godot ARM64 precompiled binaries do not support Debian Buster. Canceling the install." ;; -esac - -rm -rf ~/Godot -mkdir -p ~/Godot -cd ~/Godot || error "Could not change to directory" -wget -O godot.zip https://github.com/hiulit/Unofficial-Godot-Engine-Raspberry-Pi/releases/download/v${version2}/godot_${version}-stable_rpi4_64.zip || error "failed to download!" -unzip godot.zip -rm -f godot.zip -# IMPORTANT: 32bit arm is packaged differently than 64bit arm and contains a subfolder with the binaries. Check this whenever bumping releases -echo "[Desktop Entry] -Name=Godot Engine -Comment=Best Opensource Game Engine -Path=$HOME/Godot -Exec=env MESA_GL_VERSION_OVERRIDE=3.3 $HOME/Godot/godot_${version}-stable_rpi4_editor.arm64 -Icon=$(dirname $0)/icon-64.png -Terminal=false -Type=Application -Categories=Development; -StartupNotify=true" > ~/.local/share/applications/godot-engine.desktop diff --git a/apps/Godot/uninstall b/apps/Godot/uninstall index 30d2297423..c495c1a166 100755 --- a/apps/Godot/uninstall +++ b/apps/Godot/uninstall @@ -1,6 +1,3 @@ #!/bin/bash -rm -f ~/.local/share/applications/godotengine.desktop -rm -f ~/.local/share/applications/godot-engine.desktop -rm -rf ~/Godot -exit 0 +sudo rm -rf /usr/local/share/applications/godot-engine.desktop /opt/godot-*-stable /usr/local/bin/godot diff --git a/apps/Godot/website b/apps/Godot/website index 019cb1da5a..4d9565ce0e 100644 --- a/apps/Godot/website +++ b/apps/Godot/website @@ -1 +1 @@ -https://github.com/hiulit/Unofficial-Godot-Engine-Raspberry-Pi +https://godotengine.org/ diff --git a/etc/category-overrides-non-raspberry b/etc/category-overrides-non-raspberry index c9d10e34b8..df85608ef7 100644 --- a/etc/category-overrides-non-raspberry +++ b/etc/category-overrides-non-raspberry @@ -3,7 +3,6 @@ CommanderPi|hidden Downgrade Chromium|hidden Flow|hidden Gnome Software|Tools -Godot|hidden Lightpad|hidden Mac OS Theme|hidden PiGro|hidden