From 86b15f032a081c70dd986986008289447b8df06e Mon Sep 17 00:00:00 2001 From: Sego Date: Mon, 12 Jun 2023 14:30:20 +0300 Subject: [PATCH 1/6] Create godot.sh --- scripts/development/godot.sh | 37 ++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 scripts/development/godot.sh diff --git a/scripts/development/godot.sh b/scripts/development/godot.sh new file mode 100644 index 000000000..0c3717232 --- /dev/null +++ b/scripts/development/godot.sh @@ -0,0 +1,37 @@ +if which godot3 > /dev/null 2>&1; then + echo "Godot already exists!" + sleep 2 +else + sudo apt-get install build-essential scons pkg-config libx11-dev libxcursor-dev libxinerama-dev libgl1-mesa-dev libglu-dev libasound2-dev libpulse-dev libudev-dev libxi-dev libxrandr-dev yasm clang xz-utils wget + + sudo sed -i '1s/.*/#! \/usr\/bin\/python3/' /usr/bin/scons + + mkdir /tmp/godot + cd /tmp/godot + wget https://github.com/godotengine/godot/releases/download/3.5.2-stable/godot-3.5.2-stable.tar.xz + tar -xf godot-3.5.2-stable.tar.xz + cd godot-3.5.2-stable + + echo "Building godot, this may take a few hours..." + scons platform=x11 target=release_debug tools=yes use_llvm=yes CCFLAGS="-march=armv8-a+fp+simd" arch=arm64 -j4 + + sudo cp icon.svg /usr/share/pixmaps/godot.svg + sudo cp bin/godot.x11.opt.tools.arm64.llvm /usr/bin/godot3 + touch /tmp/godot/godot3.desktop + echo "[Desktop Entry] +Name=Godot Engine +GenericName=Libre game engine +Comment=Multi-platform 2D and 3D game engine with a feature-rich editor +Exec=godot3 -p +Icon=godot +Terminal=false +Type=Application +MimeType=application/x-godot-project; +Categories=Development;IDE;" > /tmp/godot/godot3.desktop + sudo cp /tmp/godot/godot3.desktop /usr/share/applications/godot3.desktop + + echo "Cleaning up..." + rm -rf /tmp/godot + + echo "Godot successfully installed!" +fi From 1b3d3de63165c7fd47d42d8535702614b0240459 Mon Sep 17 00:00:00 2001 From: Sego Date: Tue, 6 Aug 2024 21:14:52 +0300 Subject: [PATCH 2/6] Use latest godot 3 --- scripts/development/godot.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/scripts/development/godot.sh b/scripts/development/godot.sh index 0c3717232..d8ebcc2f5 100644 --- a/scripts/development/godot.sh +++ b/scripts/development/godot.sh @@ -8,9 +8,7 @@ else mkdir /tmp/godot cd /tmp/godot - wget https://github.com/godotengine/godot/releases/download/3.5.2-stable/godot-3.5.2-stable.tar.xz - tar -xf godot-3.5.2-stable.tar.xz - cd godot-3.5.2-stable + lastversion extract godot -b 3 echo "Building godot, this may take a few hours..." scons platform=x11 target=release_debug tools=yes use_llvm=yes CCFLAGS="-march=armv8-a+fp+simd" arch=arm64 -j4 From 545808b4a733d7f006adcfcc147af433af2d6beb Mon Sep 17 00:00:00 2001 From: Sego Date: Wed, 7 Aug 2024 01:49:48 +0300 Subject: [PATCH 3/6] Change godot3 installation dir to /usr/local/bin --- scripts/development/godot.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/development/godot.sh b/scripts/development/godot.sh index d8ebcc2f5..cf3b3f6af 100644 --- a/scripts/development/godot.sh +++ b/scripts/development/godot.sh @@ -14,7 +14,7 @@ else scons platform=x11 target=release_debug tools=yes use_llvm=yes CCFLAGS="-march=armv8-a+fp+simd" arch=arm64 -j4 sudo cp icon.svg /usr/share/pixmaps/godot.svg - sudo cp bin/godot.x11.opt.tools.arm64.llvm /usr/bin/godot3 + sudo cp bin/godot.x11.opt.tools.arm64.llvm /usr/local/bin/godot3 touch /tmp/godot/godot3.desktop echo "[Desktop Entry] Name=Godot Engine From aabf4621edaee9527d1bbd39b3512b46d6d0454d Mon Sep 17 00:00:00 2001 From: Sego Date: Wed, 7 Aug 2024 03:29:38 +0300 Subject: [PATCH 4/6] Install lastversion, oops --- scripts/development/godot.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/development/godot.sh b/scripts/development/godot.sh index cf3b3f6af..50b37f146 100644 --- a/scripts/development/godot.sh +++ b/scripts/development/godot.sh @@ -2,8 +2,9 @@ if which godot3 > /dev/null 2>&1; then echo "Godot already exists!" sleep 2 else - sudo apt-get install build-essential scons pkg-config libx11-dev libxcursor-dev libxinerama-dev libgl1-mesa-dev libglu-dev libasound2-dev libpulse-dev libudev-dev libxi-dev libxrandr-dev yasm clang xz-utils wget - + sudo apt-get install build-essential scons pkg-config libx11-dev libxcursor-dev libxinerama-dev libgl1-mesa-dev libglu-dev libasound2-dev libpulse-dev libudev-dev libxi-dev libxrandr-dev yasm clang xz-utils wget python3-pip + pipx_install lastversion + sudo sed -i '1s/.*/#! \/usr\/bin\/python3/' /usr/bin/scons mkdir /tmp/godot From 6c812a9f2f88edb7f61a7bd528ef2f6766b5f7d4 Mon Sep 17 00:00:00 2001 From: Sego Date: Fri, 9 Aug 2024 03:54:55 +0300 Subject: [PATCH 5/6] Use /usr/local --- scripts/development/godot.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/development/godot.sh b/scripts/development/godot.sh index 50b37f146..5ebc113db 100644 --- a/scripts/development/godot.sh +++ b/scripts/development/godot.sh @@ -14,7 +14,8 @@ else echo "Building godot, this may take a few hours..." scons platform=x11 target=release_debug tools=yes use_llvm=yes CCFLAGS="-march=armv8-a+fp+simd" arch=arm64 -j4 - sudo cp icon.svg /usr/share/pixmaps/godot.svg + sudo mkdir /usr/local/share/pixmaps + sudo cp icon.svg /usr/local/share/pixmaps/godot.svg sudo cp bin/godot.x11.opt.tools.arm64.llvm /usr/local/bin/godot3 touch /tmp/godot/godot3.desktop echo "[Desktop Entry] @@ -27,7 +28,8 @@ Terminal=false Type=Application MimeType=application/x-godot-project; Categories=Development;IDE;" > /tmp/godot/godot3.desktop - sudo cp /tmp/godot/godot3.desktop /usr/share/applications/godot3.desktop + sudo mkdir /usr/local/share/applications + sudo cp /tmp/godot/godot3.desktop /usr/local/share/applications/godot3.desktop echo "Cleaning up..." rm -rf /tmp/godot From 37e4550bc3b1f4a54e369150504073d1da36d2fe Mon Sep 17 00:00:00 2001 From: Sego Date: Fri, 16 Aug 2024 01:07:42 +0300 Subject: [PATCH 6/6] Change flags --- scripts/development/godot.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/development/godot.sh b/scripts/development/godot.sh index 5ebc113db..4637e4d4a 100644 --- a/scripts/development/godot.sh +++ b/scripts/development/godot.sh @@ -12,7 +12,7 @@ else lastversion extract godot -b 3 echo "Building godot, this may take a few hours..." - scons platform=x11 target=release_debug tools=yes use_llvm=yes CCFLAGS="-march=armv8-a+fp+simd" arch=arm64 -j4 + scons platform=x11 target=release_debug tools=yes use_llvm=yes CCFLAGS="-march=native" arch=arm64 -j$(nproc) sudo mkdir /usr/local/share/pixmaps sudo cp icon.svg /usr/local/share/pixmaps/godot.svg