From 4fa2e352247450906ef7e69fcd506e3cd04e6de1 Mon Sep 17 00:00:00 2001 From: a-bad-dev <244852891+a-bad-dev@users.noreply.github.com> Date: Mon, 26 Jan 2026 00:11:40 -0400 Subject: [PATCH 01/18] update build script --- build.sh | 37 ++++++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/build.sh b/build.sh index 2e591a7..f12a70c 100644 --- a/build.sh +++ b/build.sh @@ -1,19 +1,27 @@ #!/bin/bash -e # Builds an AppImage using appimagetool. -# You need to run this inside of a build directory in the source tree, -# it will generate the build files and compile Minetest for you. +# Run this script on an aarch64 computer, running modern debian or +# something similar, otherwise it's not going to work... -# This script should be run on Debian 11 Bullseye. +VERSION="5.15.0" -apt-get install -y git g++ make ninja-build libc6-dev cmake libpng-dev libjpeg-dev libxi-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-openssl-dev libfreetype6-dev zlib1g-dev libgmp-dev libzstd-dev libleveldb-dev gettext desktop-file-utils ca-certificates wget file --no-install-recommends +BOLD="\033[1m" +GREEN="\033[32m" +RESET="\033[0m" +echo -e "${BOLD}Downloading deps...${RESET}" +apt-get install -y git g++ make ninja-build libc6-dev cmake libpng-dev libjpeg-dev libxi-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-openssl-dev libfreetype6-dev zlib1g-dev libgmp-dev libsdl2-dev libzstd-dev libleveldb-dev gettext desktop-file-utils ca-certificates wget file --no-install-recommends + +echo -e "${BOLD}Downloading LuaJIT and Luanti source code...${RESET}" git clone --depth 1 https://github.com/LuaJIT/LuaJIT.git luajit -git clone --depth 1 --branch stable-5 https://github.com/luanti-org/luanti.git +wget -O luanti.zip https://github.com/luanti-org/luanti/archive/refs/tags/${VERSION}.zip +unzip luanti.zip +mv luanti-${VERSION} luanti/ -# COMPILE LUAJIT +echo -e "${BOLD}Compiling LuaJIT...${RESET}" pushd luajit -make amalg -j4 +make amalg -j$(nproc) popd pushd luanti @@ -23,27 +31,30 @@ mkdir -p build; cd build if [ ! -f appimagetool ]; then # Old version of appimagetool: #wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-aarch64.AppImage -O appimagetool + echo -e "${BOLD}Downloading AppImageTool${RESET}" wget https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-aarch64.AppImage -O appimagetool chmod +x appimagetool fi # Compile and install into AppDir +echo -e "${BOLD}Compiling Luanti...${RESET}" cmake .. -G Ninja \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=AppDir/usr \ -DBUILD_UNITTESTS=OFF \ -DENABLE_SYSTEM_JSONCPP=OFF \ -DLUA_INCLUDE_DIR=../../luajit/src/ \ -DLUA_LIBRARY=../../luajit/src/libluajit.a -ninja +ninja -j$(nproc) objcopy --only-keep-debug ../bin/luanti luanti.debug objcopy --strip-debug --add-gnu-debuglink=luanti.debug ../bin/luanti -ninja install +ninja install -j$(nproc) cd AppDir +echo -e "${BOLD}Building AppImage...${RESET}" # Put desktop and icon at root ln -sf usr/share/applications/org.luanti.luanti.desktop luanti.desktop ln -sf usr/share/icons/hicolor/128x128/apps/luanti.png luanti.png @@ -87,13 +98,13 @@ done cd .. ARCH=aarch64 ./appimagetool --appimage-extract-and-run AppDir/ -# Move the appimage to ~ +# Move the appimage to this script's folder mv Luanti-aarch64.AppImage ../../luanti-5.15.0-aarch64.AppImage # Clean up cd ../.. -rm -rf luanti/ +rm -rf luanti{,.zip} rm -rf luajit/ -echo "Done!" +echo -e "${BOLD}${GREEN}Done!${RESET}" From ceecf4d4c690e7a890becb2b5f2bcfbecde0a378 Mon Sep 17 00:00:00 2001 From: a-bad-dev <244852891+a-bad-dev@users.noreply.github.com> Date: Mon, 26 Jan 2026 10:55:09 -0400 Subject: [PATCH 02/18] fix appimage filename being hardcoded --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index f12a70c..f05019f 100644 --- a/build.sh +++ b/build.sh @@ -99,7 +99,7 @@ cd .. ARCH=aarch64 ./appimagetool --appimage-extract-and-run AppDir/ # Move the appimage to this script's folder -mv Luanti-aarch64.AppImage ../../luanti-5.15.0-aarch64.AppImage +mv Luanti-aarch64.AppImage ../../luanti-${VERSION}-aarch64.AppImage # Clean up cd ../.. From 1c334a9b64dffb775439abe61b1da0af72a92f3b Mon Sep 17 00:00:00 2001 From: a-bad-dev <244852891+a-bad-dev@users.noreply.github.com> Date: Sun, 1 Feb 2026 16:05:03 -0400 Subject: [PATCH 03/18] updates --- build.sh | 49 +++++++++++++++++++++++++++++++++++-------------- 1 file changed, 35 insertions(+), 14 deletions(-) diff --git a/build.sh b/build.sh index f05019f..aa53c7d 100644 --- a/build.sh +++ b/build.sh @@ -11,28 +11,53 @@ GREEN="\033[32m" RESET="\033[0m" echo -e "${BOLD}Downloading deps...${RESET}" -apt-get install -y git g++ make ninja-build libc6-dev cmake libpng-dev libjpeg-dev libxi-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-openssl-dev libfreetype6-dev zlib1g-dev libgmp-dev libsdl2-dev libzstd-dev libleveldb-dev gettext desktop-file-utils ca-certificates wget file --no-install-recommends +apt-get install -y --no-install-recommends \ + git \ + g++ \ + make \ + ninja-build \ + libc6-dev \ + cmake \ + curl \ + libpng-dev \ + libjpeg-dev \ + libxi-dev \ + libgl1-mesa-dev \ + libsqlite3-dev \ + libogg-dev \ + libvorbis-dev \ + libopenal-dev \ + libcurl4-openssl-dev \ + libfreetype6-dev \ + zlib1g-dev \ + libgmp-dev \ + libsdl2-dev \ + libzstd-dev \ + libleveldb-dev \ + gettext \ + desktop-file-utils \ + ca-certificates \ + file echo -e "${BOLD}Downloading LuaJIT and Luanti source code...${RESET}" git clone --depth 1 https://github.com/LuaJIT/LuaJIT.git luajit -wget -O luanti.zip https://github.com/luanti-org/luanti/archive/refs/tags/${VERSION}.zip +curl -Lo luanti.zip https://github.com/luanti-org/luanti/archive/refs/tags/${VERSION}.zip unzip luanti.zip mv luanti-${VERSION} luanti/ echo -e "${BOLD}Compiling LuaJIT...${RESET}" -pushd luajit +cd luajit make amalg -j$(nproc) -popd +cd .. -pushd luanti -mkdir -p build; cd build +cd luanti +mkdir -p build +cd build # Download appimagetool if [ ! -f appimagetool ]; then - # Old version of appimagetool: - #wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-aarch64.AppImage -O appimagetool echo -e "${BOLD}Downloading AppImageTool${RESET}" - wget https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-aarch64.AppImage -O appimagetool + curl -Lo appimagetool https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-aarch64.AppImage chmod +x appimagetool fi @@ -45,10 +70,6 @@ cmake .. -G Ninja \ -DENABLE_SYSTEM_JSONCPP=OFF \ -DLUA_INCLUDE_DIR=../../luajit/src/ \ -DLUA_LIBRARY=../../luajit/src/libluajit.a -ninja -j$(nproc) - -objcopy --only-keep-debug ../bin/luanti luanti.debug -objcopy --strip-debug --add-gnu-debuglink=luanti.debug ../bin/luanti ninja install -j$(nproc) @@ -63,7 +84,7 @@ ln -sf luanti.png .DirIcon # Fix locales mv usr/share/locale usr/share/luanti -cat > AppRun <<\APPRUN +cat > AppRun <<'APPRUN' #!/bin/sh APP_PATH="$(dirname "$(readlink -f "${0}")")" export LD_LIBRARY_PATH="${APP_PATH}"/usr/lib/:"${LD_LIBRARY_PATH}" From 8882e863ed046529eca44f448c1c42cf2af2d515 Mon Sep 17 00:00:00 2001 From: a-bad-dev <244852891+a-bad-dev@users.noreply.github.com> Date: Sun, 1 Feb 2026 17:49:42 -0400 Subject: [PATCH 04/18] Update build.sh --- build.sh | 39 ++++++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/build.sh b/build.sh index aa53c7d..b011393 100644 --- a/build.sh +++ b/build.sh @@ -1,15 +1,22 @@ #!/bin/bash -e -# Builds an AppImage using appimagetool. -# Run this script on an aarch64 computer, running modern debian or +# run this script on an aarch64 computer, running modern debian or # something similar, otherwise it's not going to work... VERSION="5.15.0" BOLD="\033[1m" +RED="\033[31m" GREEN="\033[32m" RESET="\033[0m" +# make sure we are root +if [ "$(id -u)" != 0 ]; then + echo -e "${BOLD}${RED}This script must be run as root!${RESET}" + exit 1 +fi + +# install deps echo -e "${BOLD}Downloading deps...${RESET}" apt-get install -y --no-install-recommends \ git \ @@ -39,29 +46,29 @@ apt-get install -y --no-install-recommends \ ca-certificates \ file +# download 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 unzip luanti.zip mv luanti-${VERSION} luanti/ +# compile luajit echo -e "${BOLD}Compiling LuaJIT...${RESET}" cd luajit make amalg -j$(nproc) cd .. +# prepare to compile luanti cd luanti mkdir -p build cd build -# Download appimagetool -if [ ! -f appimagetool ]; then - echo -e "${BOLD}Downloading AppImageTool${RESET}" - curl -Lo appimagetool https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-aarch64.AppImage - chmod +x appimagetool -fi +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 and install into AppDir echo -e "${BOLD}Compiling Luanti...${RESET}" cmake .. -G Ninja \ -DCMAKE_BUILD_TYPE=Release \ @@ -73,15 +80,16 @@ cmake .. -G Ninja \ 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 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 -# Fix locales +# fix locales mv usr/share/locale usr/share/luanti cat > AppRun <<'APPRUN' @@ -92,7 +100,7 @@ exec "${APP_PATH}/usr/bin/luanti" "$@" APPRUN chmod +x AppRun -# List of libraries from the system that should be bundled in the AppImage. +# bundle the libraries INCLUDE_LIBS=( libopenal.so.1 libSDL2-2.0.so.0 @@ -115,17 +123,18 @@ for i in "${INCLUDE_LIBS[@]}"; do cp /usr/lib/aarch64-linux-gnu/$i usr/lib/ done -# Actually build the appimage +# finally make the appimage cd .. ARCH=aarch64 ./appimagetool --appimage-extract-and-run AppDir/ -# Move the appimage to this script's folder +# move the appimage to this script's folder mv Luanti-aarch64.AppImage ../../luanti-${VERSION}-aarch64.AppImage -# Clean up +# clean up cd ../.. rm -rf luanti{,.zip} rm -rf luajit/ +# done :D echo -e "${BOLD}${GREEN}Done!${RESET}" From 275de7f8eee92b7edd8ee653375d6cc14ecb185f Mon Sep 17 00:00:00 2001 From: a-bad-dev <244852891+a-bad-dev@users.noreply.github.com> Date: Sun, 1 Feb 2026 17:52:55 -0400 Subject: [PATCH 05/18] add a script to test the appimage --- test.sh | 93 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 test.sh diff --git a/test.sh b/test.sh new file mode 100644 index 0000000..24e6f30 --- /dev/null +++ b/test.sh @@ -0,0 +1,93 @@ +#!/bin/bash -e + +# test the AppImage built with build.sh +# again, this only works on aarch64 + +VERSION="5.15.0" + +BOLD="\033[1m" +RED="\033[31m" +GREEN="\033[32m" +RESET="\033[0m" + +# make sure we are root +if [ "$(id -u)" != 0 ]; then + echo -e "${BOLD}${RED}This script must be run as root!${RESET}" + exit 1 +fi + +# make sure no other luanti processes are running +if [ "$(ps aux | grep luanti | wc -l)" != 1 ]; then + echo -e "${BOLD}${RED}No Luanti processes may be running while this script is run.${RESET}" + exit 1 +fi +# check if the AppImage even exists +echo -e "${BOLD}Checking if AppImage exists...${RESET}" + +if [ ! -f luanti-${VERSION}-aarch64.AppImage ]; then + echo -e "${BOLD}${RED}AppImage not found, have you run build.sh?${RESET}" + exit 1 +fi + +# list of dependencies needed to make the AppImage +DEPS=( + git + g++ + make + ninja-build + libc6-dev + cmake + curl + libpng-dev + libjpeg-dev + libxi-dev + libgl1-mesa-dev + libsqlite3-dev + libogg-dev + libvorbis-dev + libopenal-dev + libcurl4-openssl-dev + libfreetype6-dev + zlib1g-dev + libgmp-dev + libsdl2-dev + libzstd-dev + libleveldb-dev + gettext + desktop-file-utils + ca-certificates + file +) + +# remove the dependencies +echo -e "${BOLD}Removing dependencies...${RESET}" + +for d in "${DEPS[@]}"; do + apt remove $d -y +done + +# test the AppImage +echo -e "${BOLD}${GREEN}Testing AppImage in 5 seconds${RESET}" +sleep 5 + +./luanti-${VERSION}-aarch64.AppImage & + +sleep 10 + +if [ "$(ps | grep luanti | wc -l)" == 0 ]; then + echo -e "${BOLD}${RED}AppImage test failed.${RESET}" + exit 1 +fi + +# kill luanti +pkill -9 luanti + +echo -e "${BOLD}${GREEN}AppImage test sucessful.${RESET}" +echo -e "${BOLD}Reinstalling dependencies...${RESET}" + +# reinstall the dependencies +for d in "${DEPS[@]}"; do + apt-get install -y $d +done + +exit 0 From fcd2eecdfd89cf2542dcc6ae21c02e213c4b46d6 Mon Sep 17 00:00:00 2001 From: a-bad-dev <244852891+a-bad-dev@users.noreply.github.com> Date: Sun, 8 Feb 2026 11:47:03 -0400 Subject: [PATCH 06/18] Update scripts for 5.15.1 --- build.sh | 2 +- test.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index b011393..a8e70ac 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.0" +VERSION="5.15.1" BOLD="\033[1m" RED="\033[31m" diff --git a/test.sh b/test.sh index 24e6f30..a5619df 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.0" +VERSION="5.15.1" BOLD="\033[1m" RED="\033[31m" From 4f071a2cbae5aebc8b729272cc06e955b64364bb Mon Sep 17 00:00:00 2001 From: a-bad-dev <244852891+a-bad-dev@users.noreply.github.com> Date: Tue, 14 Apr 2026 18:23:04 -0300 Subject: [PATCH 07/18] small fixes --- build.sh | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/build.sh b/build.sh index a8e70ac..016ba59 100644 --- a/build.sh +++ b/build.sh @@ -5,10 +5,10 @@ VERSION="5.15.1" -BOLD="\033[1m" -RED="\033[31m" -GREEN="\033[32m" -RESET="\033[0m" +BOLD="\x1b[1m" +RED="\x1b[31m" +GREEN="\x1b[32m" +RESET="\x1b[0m" # make sure we are root if [ "$(id -u)" != 0 ]; then @@ -48,7 +48,7 @@ apt-get install -y --no-install-recommends \ # download source code echo -e "${BOLD}Downloading LuaJIT and Luanti source code...${RESET}" -git clone --depth 1 https://github.com/LuaJIT/LuaJIT.git luajit +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 unzip luanti.zip mv luanti-${VERSION} luanti/ @@ -92,35 +92,36 @@ ln -sf luanti.png .DirIcon # fix locales mv usr/share/locale usr/share/luanti -cat > AppRun <<'APPRUN' +cat > AppRun <<'EOF' #!/bin/sh APP_PATH="$(dirname "$(readlink -f "${0}")")" export LD_LIBRARY_PATH="${APP_PATH}"/usr/lib/:"${LD_LIBRARY_PATH}" exec "${APP_PATH}/usr/bin/luanti" "$@" -APPRUN +EOF + 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 + libsndio.so.7.0 + libbsd.so.0 + libmd.so.0 libjpeg.so.62 libpng16.so.16 libvorbisfile.so.3 - libogg.so.0 - libvorbis.so.0 + libogg.so.0 + libvorbis.so.0 libzstd.so.1 libsqlite3.so.0 libleveldb.so.1d - libsnappy.so.1 + libsnappy.so.1 ) mkdir -p usr/lib/ for i in "${INCLUDE_LIBS[@]}"; do - cp /usr/lib/aarch64-linux-gnu/$i usr/lib/ + cp /usr/lib/aarch64-linux-gnu/${i} usr/lib/ done # finally make the appimage From 45605a703a21948a6684e86467eb2b21aa1b5e5d Mon Sep 17 00:00:00 2001 From: a-bad-dev <244852891+a-bad-dev@users.noreply.github.com> Date: Tue, 14 Apr 2026 18:25:40 -0300 Subject: [PATCH 08/18] small fixes --- test.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/test.sh b/test.sh index a5619df..293b284 100644 --- a/test.sh +++ b/test.sh @@ -5,10 +5,10 @@ VERSION="5.15.1" -BOLD="\033[1m" -RED="\033[31m" -GREEN="\033[32m" -RESET="\033[0m" +BOLD="\x1b[1m" +RED="\x1b[31m" +GREEN="\x1b[32m" +RESET="\x1b[0m" # make sure we are root if [ "$(id -u)" != 0 ]; then @@ -21,6 +21,7 @@ if [ "$(ps aux | grep luanti | wc -l)" != 1 ]; then echo -e "${BOLD}${RED}No Luanti processes may be running while this script is run.${RESET}" exit 1 fi + # check if the AppImage even exists echo -e "${BOLD}Checking if AppImage exists...${RESET}" @@ -63,7 +64,7 @@ DEPS=( echo -e "${BOLD}Removing dependencies...${RESET}" for d in "${DEPS[@]}"; do - apt remove $d -y + apt remove ${d} -y done # test the AppImage @@ -87,7 +88,7 @@ echo -e "${BOLD}Reinstalling dependencies...${RESET}" # reinstall the dependencies for d in "${DEPS[@]}"; do - apt-get install -y $d + apt-get install -y ${d} done exit 0 From 360644feaf0df190534d4ae149a3d4649ff7f4cf Mon Sep 17 00:00:00 2001 From: a-bad-dev <244852891+a-bad-dev@users.noreply.github.com> Date: Tue, 14 Apr 2026 18:45:12 -0300 Subject: [PATCH 09/18] Update scripts for 5.15.2 --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 016ba59..ec787f9 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.1" +VERSION="5.15.2" BOLD="\x1b[1m" RED="\x1b[31m" From 57518baae568bb705b7eecba5bd1152518847f81 Mon Sep 17 00:00:00 2001 From: a-bad-dev <244852891+a-bad-dev@users.noreply.github.com> Date: Tue, 14 Apr 2026 18:45:31 -0300 Subject: [PATCH 10/18] Update scripts for 5.15.2 --- test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test.sh b/test.sh index 293b284..fde109a 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.1" +VERSION="5.15.2" BOLD="\x1b[1m" RED="\x1b[31m" 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 11/18] 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 12/18] 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 13/18] 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 14/18] 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 15/18] 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 16/18] 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 17/18] 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 18/18] 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"