From cfbd15658396f3f5b6c44eff852a96361898237f Mon Sep 17 00:00:00 2001 From: a-bad-dev <244852891+a-bad-dev@users.noreply.github.com> Date: Sat, 18 Apr 2026 17:14:32 -0300 Subject: [PATCH 1/8] Update build.sh --- build.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/build.sh b/build.sh index ec787f9..d8fe4eb 100644 --- a/build.sh +++ b/build.sh @@ -1,7 +1,7 @@ #!/bin/bash -e # run this script on an aarch64 computer, running modern debian or -# something similar, otherwise it's not going to work... +# something similar, otherwise it's not going to work... VERSION="5.15.2" @@ -11,7 +11,7 @@ GREEN="\x1b[32m" RESET="\x1b[0m" # make sure we are root -if [ "$(id -u)" != 0 ]; then +if [ "$(id -u)" != "0" ]; then echo -e "${BOLD}${RED}This script must be run as root!${RESET}" exit 1 fi @@ -46,7 +46,7 @@ apt-get install -y --no-install-recommends \ ca-certificates \ file -# download source code +# download luajit and luanti source code echo -e "${BOLD}Downloading LuaJIT and Luanti source code...${RESET}" git clone --depth=1 https://github.com/LuaJIT/LuaJIT.git luajit curl -Lo luanti.zip https://github.com/luanti-org/luanti/archive/refs/tags/${VERSION}.zip @@ -68,7 +68,7 @@ echo -e "${BOLD}Downloading AppImageTool${RESET}" curl -Lo appimagetool https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-aarch64.AppImage chmod +x appimagetool -# compile and install into AppDir +# compile luanti echo -e "${BOLD}Compiling Luanti...${RESET}" cmake .. -G Ninja \ -DCMAKE_BUILD_TYPE=Release \ @@ -78,13 +78,14 @@ cmake .. -G Ninja \ -DLUA_INCLUDE_DIR=../../luajit/src/ \ -DLUA_LIBRARY=../../luajit/src/libluajit.a +# install into the AppDir folder ninja install -j$(nproc) # build the appimage itself cd AppDir echo -e "${BOLD}Building AppImage...${RESET}" -# put desktop and icon at root +# put desktop and icon at root of AppDir ln -sf usr/share/applications/org.luanti.luanti.desktop luanti.desktop ln -sf usr/share/icons/hicolor/128x128/apps/luanti.png luanti.png ln -sf luanti.png .DirIcon @@ -93,7 +94,7 @@ ln -sf luanti.png .DirIcon mv usr/share/locale usr/share/luanti cat > AppRun <<'EOF' -#!/bin/sh +#!/bin/bash APP_PATH="$(dirname "$(readlink -f "${0}")")" export LD_LIBRARY_PATH="${APP_PATH}"/usr/lib/:"${LD_LIBRARY_PATH}" exec "${APP_PATH}/usr/bin/luanti" "$@" From 935c614f077388a8a1cc4d75251c0b7fce591083 Mon Sep 17 00:00:00 2001 From: a-bad-dev <244852891+a-bad-dev@users.noreply.github.com> Date: Mon, 20 Apr 2026 13:29:17 -0300 Subject: [PATCH 2/8] compile our own SDL2 --- build.sh | 41 +++++++++++++++++++++++++++++++++++++---- 1 file changed, 37 insertions(+), 4 deletions(-) diff --git a/build.sh b/build.sh index d8fe4eb..b7e3321 100644 --- a/build.sh +++ b/build.sh @@ -4,6 +4,7 @@ # something similar, otherwise it's not going to work... VERSION="5.15.2" +SDL_VERSION="2.32.10" BOLD="\x1b[1m" RED="\x1b[31m" @@ -18,6 +19,7 @@ fi # install deps echo -e "${BOLD}Downloading deps...${RESET}" + apt-get install -y --no-install-recommends \ git \ g++ \ @@ -46,12 +48,19 @@ apt-get install -y --no-install-recommends \ ca-certificates \ file -# download luajit and luanti source code -echo -e "${BOLD}Downloading LuaJIT and Luanti source code...${RESET}" +# download luajit, SDL2, and luanti source code +echo -e "${BOLD}Downloading LuaJIT, SDL2, and Luanti source code...${RESET}" git clone --depth=1 https://github.com/LuaJIT/LuaJIT.git luajit curl -Lo luanti.zip https://github.com/luanti-org/luanti/archive/refs/tags/${VERSION}.zip +curl -Lo sdl2.zip https://github.com/libsdl-org/SDL/releases/download/release-${SDL_VERSION}/SDL2-${SDL_VERSION}.zip + unzip luanti.zip mv luanti-${VERSION} luanti/ +rm luanti.zip + +unzip sdl2.zip +mv SDL2-${SDL_VERSION} sdl2 +rm sdl2.zip # compile luajit echo -e "${BOLD}Compiling LuaJIT...${RESET}" @@ -59,6 +68,26 @@ cd luajit make amalg -j$(nproc) cd .. +# compile sdl2 +echo -e "${BOLD}Compiling SDL2...${RESET}" +cd sdl2 + +mkdir build +cd build + +cmake .. -G Ninja \ + -DSDL_INSTALL_CMAKEDIR=usr/lib/cmake/SDL2 \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=/ \ + -DCMAKE_C_FLAGS="-DSDL_LEAN_AND_MEAN=1" \ + -DSDL_{AUDIO,RENDER,VULKAN,TEST,STATIC}=OFF + +ninja -j$(nproc) +strip -s *.so +DESTDIR="../../" ninja install -j$(nproc) + +cd ../.. + # prepare to compile luanti cd luanti mkdir -p build @@ -105,7 +134,6 @@ chmod +x AppRun # bundle the libraries INCLUDE_LIBS=( libopenal.so.1 - libSDL2-2.0.so.0 libsndio.so.7.0 libbsd.so.0 libmd.so.0 @@ -125,6 +153,9 @@ for i in "${INCLUDE_LIBS[@]}"; do cp /usr/lib/aarch64-linux-gnu/${i} usr/lib/ done +# copy our SDL2 into place +cp ../../../usr/lib/libSDL2-2.0.so.0 usr/lib/ + # finally make the appimage cd .. ARCH=aarch64 ./appimagetool --appimage-extract-and-run AppDir/ @@ -135,7 +166,9 @@ mv Luanti-aarch64.AppImage ../../luanti-${VERSION}-aarch64.AppImage # clean up cd ../.. -rm -rf luanti{,.zip} +rm -rf luanti/ +rm -rf sdl2/ +rm -rf usr/ rm -rf luajit/ # done :D From 2df8b64e79df2fe3e07120dc04089ecb43a339af Mon Sep 17 00:00:00 2001 From: a-bad-dev <244852891+a-bad-dev@users.noreply.github.com> Date: Tue, 28 Apr 2026 21:57:50 -0300 Subject: [PATCH 3/8] Update scripts for 5.16.0-rc1 --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index b7e3321..9904b4f 100644 --- a/build.sh +++ b/build.sh @@ -3,7 +3,7 @@ # run this script on an aarch64 computer, running modern debian or # something similar, otherwise it's not going to work... -VERSION="5.15.2" +VERSION="5.16.0-rc1" SDL_VERSION="2.32.10" BOLD="\x1b[1m" From 38781a65fe0722d63dcbf3f57606d6d1fd1181f5 Mon Sep 17 00:00:00 2001 From: a-bad-dev <244852891+a-bad-dev@users.noreply.github.com> Date: Tue, 28 Apr 2026 21:58:18 -0300 Subject: [PATCH 4/8] Update scripts for 5.16.0-rc1 --- test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test.sh b/test.sh index fde109a..04accaa 100644 --- a/test.sh +++ b/test.sh @@ -3,7 +3,7 @@ # test the AppImage built with build.sh # again, this only works on aarch64 -VERSION="5.15.2" +VERSION="5.16.0-rc1" BOLD="\x1b[1m" RED="\x1b[31m" From b43be1cba0bfbad4bcf30d5e4e8f6b9a27f2aaa9 Mon Sep 17 00:00:00 2001 From: a-bad-dev <244852891+a-bad-dev@users.noreply.github.com> Date: Sun, 10 May 2026 14:09:58 -0300 Subject: [PATCH 5/8] Update scripts for 5.16.0 5.16.0 is broken, do not use it. This is only for completeness. --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 9904b4f..c5b04c0 100644 --- a/build.sh +++ b/build.sh @@ -3,7 +3,7 @@ # run this script on an aarch64 computer, running modern debian or # something similar, otherwise it's not going to work... -VERSION="5.16.0-rc1" +VERSION="5.16.0" SDL_VERSION="2.32.10" BOLD="\x1b[1m" From d9a3b032914ec0c230b9a5118bf1b4e25f65ea4a Mon Sep 17 00:00:00 2001 From: a-bad-dev <244852891+a-bad-dev@users.noreply.github.com> Date: Sun, 10 May 2026 14:10:31 -0300 Subject: [PATCH 6/8] Update scripts for 5.16.0 5.16.0 is broken, do not use it. This is only for completeness. --- test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test.sh b/test.sh index 04accaa..ddf4006 100644 --- a/test.sh +++ b/test.sh @@ -3,7 +3,7 @@ # test the AppImage built with build.sh # again, this only works on aarch64 -VERSION="5.16.0-rc1" +VERSION="5.16.0" BOLD="\x1b[1m" RED="\x1b[31m" From b445356066bd27528a560b1e47298ff2d9e79c2c Mon Sep 17 00:00:00 2001 From: a-bad-dev <244852891+a-bad-dev@users.noreply.github.com> Date: Sun, 10 May 2026 14:32:52 -0300 Subject: [PATCH 7/8] Update scripts for 5.16.1 --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index c5b04c0..25bd025 100644 --- a/build.sh +++ b/build.sh @@ -3,7 +3,7 @@ # run this script on an aarch64 computer, running modern debian or # something similar, otherwise it's not going to work... -VERSION="5.16.0" +VERSION="5.16.1" SDL_VERSION="2.32.10" BOLD="\x1b[1m" From 59fd8e45329e5e6ae5d98536c43f205d69a68ef3 Mon Sep 17 00:00:00 2001 From: a-bad-dev <244852891+a-bad-dev@users.noreply.github.com> Date: Sun, 10 May 2026 14:33:22 -0300 Subject: [PATCH 8/8] Update scripts for 5.16.1 --- test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test.sh b/test.sh index ddf4006..9e2638d 100644 --- a/test.sh +++ b/test.sh @@ -3,7 +3,7 @@ # test the AppImage built with build.sh # again, this only works on aarch64 -VERSION="5.16.0" +VERSION="5.16.1" BOLD="\x1b[1m" RED="\x1b[31m"