mirror of
https://github.com/a-bad-dev/luanti-no-place-rep-limit.git
synced 2026-06-09 00:41:32 +00:00
Compare commits
No commits in common. "main" and "5.15.2" have entirely different histories.
6 changed files with 69 additions and 98 deletions
67
build-aarch64.sh
Executable file → Normal file
67
build-aarch64.sh
Executable file → Normal file
|
|
@ -3,16 +3,13 @@
|
||||||
# this script is intended to be run on debian 13 aarch64
|
# this script is intended to be run on debian 13 aarch64
|
||||||
|
|
||||||
|
|
||||||
VERSION="5.16.1"
|
VERSION="5.15.2"
|
||||||
SDL_VERSION="2.32.10"
|
|
||||||
|
|
||||||
BOLD="\x1b[1m"
|
BOLD="\x1b[1m"
|
||||||
RED="\x1b[31m"
|
RED="\x1b[31m"
|
||||||
GREEN="\x1b[32m"
|
GREEN="\x1b[32m"
|
||||||
RESET="\x1b[0m"
|
RESET="\x1b[0m"
|
||||||
|
|
||||||
SCRIPT_DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
|
|
||||||
|
|
||||||
# make sure we are root
|
# 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}"
|
echo -e "${BOLD}${RED}This script must be run as root!${RESET}"
|
||||||
|
|
@ -21,7 +18,6 @@ fi
|
||||||
|
|
||||||
# install deps
|
# install deps
|
||||||
echo -e "${BOLD}Downloading deps...${RESET}"
|
echo -e "${BOLD}Downloading deps...${RESET}"
|
||||||
|
|
||||||
apt-get install -y --no-install-recommends \
|
apt-get install -y --no-install-recommends \
|
||||||
git \
|
git \
|
||||||
g++ \
|
g++ \
|
||||||
|
|
@ -50,23 +46,33 @@ apt-get install -y --no-install-recommends \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
file
|
file
|
||||||
|
|
||||||
# download luajit, SDL2, and luanti source code
|
# download luajit and luanti source code
|
||||||
echo -e "${BOLD}Downloading LuaJIT, SDL2, and Luanti source code...${RESET}"
|
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
|
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
|
unzip luanti.zip
|
||||||
mv luanti-${VERSION} luanti/
|
mv luanti-${VERSION} luanti/
|
||||||
rm luanti.zip
|
|
||||||
|
|
||||||
unzip sdl2.zip
|
# create patch files
|
||||||
mv SDL2-${SDL_VERSION} sdl2
|
cat > patch-1.patch <<'EOF'
|
||||||
rm sdl2.zip
|
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
|
||||||
|
|
||||||
# apply external patch files
|
cat > patch-2.patch <<'EOF'
|
||||||
patch luanti/src/client/game.cpp "$SCRIPT_DIR"/patches/patch-1.patch
|
151c151
|
||||||
patch luanti/builtin/settingtypes.txt "$SCRIPT_DIR"/patches/patch-2.patch
|
< 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
|
||||||
|
|
||||||
# compile luajit
|
# compile luajit
|
||||||
echo -e "${BOLD}Compiling LuaJIT...${RESET}"
|
echo -e "${BOLD}Compiling LuaJIT...${RESET}"
|
||||||
|
|
@ -74,26 +80,6 @@ cd luajit
|
||||||
make amalg -j$(nproc)
|
make amalg -j$(nproc)
|
||||||
cd ..
|
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
|
# prepare to compile luanti
|
||||||
cd luanti
|
cd luanti
|
||||||
mkdir -p build
|
mkdir -p build
|
||||||
|
|
@ -140,6 +126,7 @@ chmod +x AppRun
|
||||||
# bundle the libraries
|
# bundle the libraries
|
||||||
INCLUDE_LIBS=(
|
INCLUDE_LIBS=(
|
||||||
libopenal.so.1
|
libopenal.so.1
|
||||||
|
libSDL2-2.0.so.0
|
||||||
libsndio.so.7.0
|
libsndio.so.7.0
|
||||||
libbsd.so.0
|
libbsd.so.0
|
||||||
libmd.so.0
|
libmd.so.0
|
||||||
|
|
@ -159,9 +146,6 @@ 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
|
done
|
||||||
|
|
||||||
# copy our SDL2 into place
|
|
||||||
cp ../../../usr/lib/libSDL2-2.0.so.0 usr/lib/
|
|
||||||
|
|
||||||
# finally make the appimage
|
# finally make the appimage
|
||||||
cd ..
|
cd ..
|
||||||
ARCH=aarch64 ./appimagetool --appimage-extract-and-run AppDir/
|
ARCH=aarch64 ./appimagetool --appimage-extract-and-run AppDir/
|
||||||
|
|
@ -172,10 +156,9 @@ mv Luanti-aarch64.AppImage ../../luanti-${VERSION}-aarch64.AppImage
|
||||||
# clean up
|
# clean up
|
||||||
cd ../..
|
cd ../..
|
||||||
|
|
||||||
rm -rf luanti/
|
rm -rf luanti{,.zip}
|
||||||
rm -rf sdl2/
|
|
||||||
rm -rf usr/
|
|
||||||
rm -rf luajit/
|
rm -rf luajit/
|
||||||
|
|
||||||
# done :D
|
# done :D
|
||||||
echo -e "${BOLD}${GREEN}Done!${RESET}"
|
echo -e "${BOLD}${GREEN}Done!${RESET}"
|
||||||
|
|
||||||
|
|
|
||||||
26
build-win64.sh
Executable file → Normal file
26
build-win64.sh
Executable file → Normal file
|
|
@ -1,14 +1,12 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# this script is intended to be run in MSYS2 CLANG64
|
# this script is intended to be run in MSYS2 CLANG64
|
||||||
|
|
||||||
VERSION="5.16.1"
|
VERSION="5.15.2"
|
||||||
|
|
||||||
BOLD="\x1b[1m"
|
BOLD="\x1b[1m"
|
||||||
GREEN="\x1b[32m"
|
GREEN="\x1b[32m"
|
||||||
RESET="\x1b[0m"
|
RESET="\x1b[0m"
|
||||||
|
|
||||||
SCRIPT_DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
|
|
||||||
|
|
||||||
# system update (skip this most of the time)
|
# system update (skip this most of the time)
|
||||||
echo -e "${BOLD}Updating system...${RESET}"
|
echo -e "${BOLD}Updating system...${RESET}"
|
||||||
pacman -Syu
|
pacman -Syu
|
||||||
|
|
@ -26,9 +24,25 @@ tar -xf luanti.tar
|
||||||
|
|
||||||
cd luanti-${VERSION}/
|
cd luanti-${VERSION}/
|
||||||
|
|
||||||
# apply external patch files
|
# create and apply patches
|
||||||
patch src/client/game.cpp "${SCRIPT_DIR}/patches/patch-1.patch"
|
cat > patch-1.patch <<'EOF'
|
||||||
patch builtin/settingtypes.txt "${SCRIPT_DIR}/patches/patch-2.patch"
|
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
|
||||||
|
|
||||||
# configure
|
# configure
|
||||||
echo -e "${BOLD}Preparing to compile...${RESET}"
|
echo -e "${BOLD}Preparing to compile...${RESET}"
|
||||||
|
|
|
||||||
66
build-x86_64.sh
Executable file → Normal file
66
build-x86_64.sh
Executable file → Normal file
|
|
@ -3,16 +3,13 @@
|
||||||
# this script is intended to be run on debian 13 x86_64
|
# this script is intended to be run on debian 13 x86_64
|
||||||
|
|
||||||
|
|
||||||
VERSION="5.16.1"
|
VERSION="5.15.2"
|
||||||
SDL_VERSION="2.32.10"
|
|
||||||
|
|
||||||
BOLD="\x1b[1m"
|
BOLD="\x1b[1m"
|
||||||
RED="\x1b[31m"
|
RED="\x1b[31m"
|
||||||
GREEN="\x1b[32m"
|
GREEN="\x1b[32m"
|
||||||
RESET="\x1b[0m"
|
RESET="\x1b[0m"
|
||||||
|
|
||||||
SCRIPT_DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
|
|
||||||
|
|
||||||
# make sure we are root
|
# 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}"
|
echo -e "${BOLD}${RED}This script must be run as root!${RESET}"
|
||||||
|
|
@ -21,7 +18,6 @@ fi
|
||||||
|
|
||||||
# install deps
|
# install deps
|
||||||
echo -e "${BOLD}Downloading deps...${RESET}"
|
echo -e "${BOLD}Downloading deps...${RESET}"
|
||||||
|
|
||||||
apt-get install -y --no-install-recommends \
|
apt-get install -y --no-install-recommends \
|
||||||
git \
|
git \
|
||||||
g++ \
|
g++ \
|
||||||
|
|
@ -50,23 +46,33 @@ apt-get install -y --no-install-recommends \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
file
|
file
|
||||||
|
|
||||||
# download luajit, SDL2, and luanti source code
|
# download luajit and luanti source code
|
||||||
echo -e "${BOLD}Downloading LuaJIT, SDL2, and Luanti source code...${RESET}"
|
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
|
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
|
unzip luanti.zip
|
||||||
mv luanti-${VERSION} luanti/
|
mv luanti-${VERSION} luanti/
|
||||||
rm luanti.zip
|
|
||||||
|
|
||||||
unzip sdl2.zip
|
# create patch files
|
||||||
mv SDL2-${SDL_VERSION} sdl2
|
cat > patch-1.patch <<'EOF'
|
||||||
rm sdl2.zip
|
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
|
||||||
|
|
||||||
# apply external patch files
|
cat > patch-2.patch <<'EOF'
|
||||||
patch luanti/src/client/game.cpp "${SCRIPT_DIR}/patches/patch-1.patch"
|
151c151
|
||||||
patch luanti/builtin/settingtypes.txt "${SCRIPT_DIR}/patches/patch-2.patch"
|
< 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
|
||||||
|
|
||||||
# compile luajit
|
# compile luajit
|
||||||
echo -e "${BOLD}Compiling LuaJIT...${RESET}"
|
echo -e "${BOLD}Compiling LuaJIT...${RESET}"
|
||||||
|
|
@ -74,26 +80,6 @@ cd luajit
|
||||||
make amalg -j$(nproc)
|
make amalg -j$(nproc)
|
||||||
cd ..
|
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
|
# prepare to compile luanti
|
||||||
cd luanti
|
cd luanti
|
||||||
mkdir -p build
|
mkdir -p build
|
||||||
|
|
@ -140,6 +126,7 @@ chmod +x AppRun
|
||||||
# bundle the libraries
|
# bundle the libraries
|
||||||
INCLUDE_LIBS=(
|
INCLUDE_LIBS=(
|
||||||
libopenal.so.1
|
libopenal.so.1
|
||||||
|
libSDL2-2.0.so.0
|
||||||
libsndio.so.7.0
|
libsndio.so.7.0
|
||||||
libbsd.so.0
|
libbsd.so.0
|
||||||
libmd.so.0
|
libmd.so.0
|
||||||
|
|
@ -159,9 +146,6 @@ for i in "${INCLUDE_LIBS[@]}"; do
|
||||||
cp /usr/lib/x86_64-linux-gnu/${i} usr/lib/
|
cp /usr/lib/x86_64-linux-gnu/${i} usr/lib/
|
||||||
done
|
done
|
||||||
|
|
||||||
# copy our SDL2 into place
|
|
||||||
cp ../../../usr/lib/libSDL2-2.0.so.0 usr/lib/
|
|
||||||
|
|
||||||
# finally make the appimage
|
# finally make the appimage
|
||||||
cd ..
|
cd ..
|
||||||
ARCH=x86_64 ./appimagetool --appimage-extract-and-run AppDir/
|
ARCH=x86_64 ./appimagetool --appimage-extract-and-run AppDir/
|
||||||
|
|
@ -172,9 +156,7 @@ mv Luanti-x86_64.AppImage ../../luanti-${VERSION}-x86_64.AppImage
|
||||||
# clean up
|
# clean up
|
||||||
cd ../..
|
cd ../..
|
||||||
|
|
||||||
rm -rf luanti/
|
rm -rf luanti{,.zip}
|
||||||
rm -rf sdl2/
|
|
||||||
rm -rf usr/
|
|
||||||
rm -rf luajit/
|
rm -rf luajit/
|
||||||
|
|
||||||
# done :D
|
# done :D
|
||||||
|
|
|
||||||
0
bundle_dlls.sh
Executable file → Normal file
0
bundle_dlls.sh
Executable file → Normal file
|
|
@ -1,4 +0,0 @@
|
||||||
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);
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
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
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue