Compare commits

..

10 commits

Author SHA1 Message Date
a-bad-dev
74a5ce327e seperate patches from scripts and fix a few things 2026-05-24 00:39:25 -03:00
a-bad-dev
ffe0cc49f2
Update scripts for 5.16.1 2026-05-10 17:53:39 -03:00
a-bad-dev
fcd69b1eec
Update scripts for 5.16.1 2026-05-10 17:53:26 -03:00
a-bad-dev
5f73e291cd
Update scripts for 5.16.1 2026-05-10 17:53:07 -03:00
a-bad-dev
6a144dd147 Update scripts for 5.16.0 2026-05-10 15:27:35 -03:00
a-bad-dev
445e7fdafd
Update scripts for 5.16.0-rc1 2026-04-28 21:32:33 -03:00
a-bad-dev
70f4b6547a
Update scripts for 5.16.0-rc1 2026-04-28 21:32:13 -03:00
a-bad-dev
fa9e0d0aae
Update scripts for 5.16.0-rc1 2026-04-28 21:31:50 -03:00
a-bad-dev
5d753f4197 Update patches for 5.16.0-rc1 2026-04-28 20:38:34 -03:00
a-bad-dev
cd5d4b9383 update scripts and mark them as executable
(aarch64 script currently untested)
2026-04-20 13:25:27 -03:00
6 changed files with 98 additions and 69 deletions

67
build-aarch64.sh Normal file → Executable file
View file

@ -3,13 +3,16 @@
# this script is intended to be run on debian 13 aarch64
VERSION="5.15.2"
VERSION="5.16.1"
SDL_VERSION="2.32.10"
BOLD="\x1b[1m"
RED="\x1b[31m"
GREEN="\x1b[32m"
RESET="\x1b[0m"
SCRIPT_DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
# make sure we are root
if [ "$(id -u)" != "0" ]; then
echo -e "${BOLD}${RED}This script must be run as root!${RESET}"
@ -18,6 +21,7 @@ fi
# install deps
echo -e "${BOLD}Downloading deps...${RESET}"
apt-get install -y --no-install-recommends \
git \
g++ \
@ -46,33 +50,23 @@ 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
# create patch files
cat > patch-1.patch <<'EOF'
3713c3713
< m_repeat_place_time = g_settings->getFloat("repeat_place_time", 0.16f, 2.0f);
---
> m_repeat_place_time = g_settings->getFloat("repeat_place_time", 0.001f, 2.0f);
EOF
unzip sdl2.zip
mv SDL2-${SDL_VERSION} sdl2
rm sdl2.zip
cat > patch-2.patch <<'EOF'
151c151
< repeat_place_time (Place repetition interval) float 0.25 0.16 2.0
---
> repeat_place_time (Place repetition interval) float 0.25 0.001 2.0
EOF
# apply patches
patch luanti/src/client/game.cpp patch-1.patch
patch luanti/builtin/settingtypes.txt patch-2.patch
rm patch-[1-2].patch
# apply external patch files
patch luanti/src/client/game.cpp "$SCRIPT_DIR"/patches/patch-1.patch
patch luanti/builtin/settingtypes.txt "$SCRIPT_DIR"/patches/patch-2.patch
# compile luajit
echo -e "${BOLD}Compiling LuaJIT...${RESET}"
@ -80,6 +74,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
@ -126,7 +140,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
@ -146,6 +159,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/
@ -156,9 +172,10 @@ 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
echo -e "${BOLD}${GREEN}Done!${RESET}"

26
build-win64.sh Normal file → Executable file
View file

@ -1,12 +1,14 @@
#!/bin/bash
# this script is intended to be run in MSYS2 CLANG64
VERSION="5.15.2"
VERSION="5.16.1"
BOLD="\x1b[1m"
GREEN="\x1b[32m"
RESET="\x1b[0m"
SCRIPT_DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
# system update (skip this most of the time)
echo -e "${BOLD}Updating system...${RESET}"
pacman -Syu
@ -24,25 +26,9 @@ tar -xf luanti.tar
cd luanti-${VERSION}/
# create and apply patches
cat > patch-1.patch <<'EOF'
3713c3713
< m_repeat_place_time = g_settings->getFloat("repeat_place_time", 0.16f, 2.0f);
---
> m_repeat_place_time = g_settings->getFloat("repeat_place_time", 0.001f, 2.0f);
EOF
cat > patch-2.patch <<'EOF'
151c151
< repeat_place_time (Place repetition interval) float 0.25 0.16 2.0
---
> repeat_place_time (Place repetition interval) float 0.25 0.001 2.0
EOF
patch src/client/game.cpp patch-1.patch
patch builtin/settingtypes.txt patch-2.patch
rm patch-[1-2].patch
# apply external patch files
patch src/client/game.cpp "${SCRIPT_DIR}/patches/patch-1.patch"
patch builtin/settingtypes.txt "${SCRIPT_DIR}/patches/patch-2.patch"
# configure
echo -e "${BOLD}Preparing to compile...${RESET}"

66
build-x86_64.sh Normal file → Executable file
View file

@ -3,13 +3,16 @@
# this script is intended to be run on debian 13 x86_64
VERSION="5.15.2"
VERSION="5.16.1"
SDL_VERSION="2.32.10"
BOLD="\x1b[1m"
RED="\x1b[31m"
GREEN="\x1b[32m"
RESET="\x1b[0m"
SCRIPT_DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
# make sure we are root
if [ "$(id -u)" != "0" ]; then
echo -e "${BOLD}${RED}This script must be run as root!${RESET}"
@ -18,6 +21,7 @@ fi
# install deps
echo -e "${BOLD}Downloading deps...${RESET}"
apt-get install -y --no-install-recommends \
git \
g++ \
@ -46,33 +50,23 @@ 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
# create patch files
cat > patch-1.patch <<'EOF'
3713c3713
< m_repeat_place_time = g_settings->getFloat("repeat_place_time", 0.16f, 2.0f);
---
> m_repeat_place_time = g_settings->getFloat("repeat_place_time", 0.001f, 2.0f);
EOF
unzip sdl2.zip
mv SDL2-${SDL_VERSION} sdl2
rm sdl2.zip
cat > patch-2.patch <<'EOF'
151c151
< repeat_place_time (Place repetition interval) float 0.25 0.16 2.0
---
> repeat_place_time (Place repetition interval) float 0.25 0.001 2.0
EOF
# apply patches
patch luanti/src/client/game.cpp patch-1.patch
patch luanti/builtin/settingtypes.txt patch-2.patch
rm patch-[1-2].patch
# apply external patch files
patch luanti/src/client/game.cpp "${SCRIPT_DIR}/patches/patch-1.patch"
patch luanti/builtin/settingtypes.txt "${SCRIPT_DIR}/patches/patch-2.patch"
# compile luajit
echo -e "${BOLD}Compiling LuaJIT...${RESET}"
@ -80,6 +74,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
@ -126,7 +140,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
@ -146,6 +159,9 @@ for i in "${INCLUDE_LIBS[@]}"; do
cp /usr/lib/x86_64-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=x86_64 ./appimagetool --appimage-extract-and-run AppDir/
@ -156,7 +172,9 @@ mv Luanti-x86_64.AppImage ../../luanti-${VERSION}-x86_64.AppImage
# clean up
cd ../..
rm -rf luanti{,.zip}
rm -rf luanti/
rm -rf sdl2/
rm -rf usr/
rm -rf luajit/
# done :D

0
bundle_dlls.sh Normal file → Executable file
View file

4
patches/patch-1.patch Normal file
View file

@ -0,0 +1,4 @@
3753c3753
< m_repeat_place_time = g_settings->getFloat("repeat_place_time", 0.16f, 2.0f);
---
> m_repeat_place_time = g_settings->getFloat("repeat_place_time", 0.001f, 2.0f);

4
patches/patch-2.patch Normal file
View file

@ -0,0 +1,4 @@
151c151
< repeat_place_time (Place repetition interval) float 0.25 0.16 2.0
---
> repeat_place_time (Place repetition interval) float 0.25 0.001 2.0