Update build.sh

This commit is contained in:
a-bad-dev 2026-04-17 00:32:14 -03:00 committed by GitHub
commit 266f283840
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -5,16 +5,18 @@
VERSION="5.15.2" VERSION="5.15.2"
# system update # system update (skip this most of the time)
pacman -Syu pacman -Syu
# install deps # install deps
pacman -S zip git mingw-w64-clang-x86_64-{clang,cmake,ninja,curl-winssl,libpng,libjpeg-turbo,freetype,libogg,libvorbis,sqlite3,openal,zstd,gettext,luajit,SDL2} pacman -S zip git mingw-w64-clang-x86_64-{clang,cmake,ninja,curl-winssl,libpng,libjpeg-turbo,freetype,libogg,libvorbis,sqlite3,openal,zstd,gettext,luajit,SDL2}
# prepare to compile # download and extract sources
curl -Lo luanti.tar.gz https://github.com/luanti-org/luanti/archive/refs/tags/${VERSION}.tar.gz curl -Lo luanti.tar.gz https://github.com/luanti-org/luanti/archive/refs/tags/${VERSION}.tar.gz
gunzip luanti.tar.gz gunzip luanti.tar.gz
tar -xf luanti.tar tar -xf luanti.tar
cd luanti-${VERSION}/ cd luanti-${VERSION}/
# configure # configure
@ -24,14 +26,16 @@ cmake . -G Ninja -DRUN_IN_PLACE=TRUE -DBUILD_CLIENT=FALSE -DBUILD_SERVER=TRUE
ninja -j$(nproc) ninja -j$(nproc)
# bundle DLLs # bundle DLLs
cp ../bundle_dlls.sh util/ chmod +x ../bundle_dlls.sh
chmod +x util/bundle_dlls.sh
./util/bundle_dlls.sh bin/luantiserver.exe bin/ ../bundle_dlls.sh bin/luantiserver.exe bin/
# build the zip archive of luantiserver # build the zip archive of luantiserver
mkdir luantiserver-${VERSION}-msys2-win64 mkdir -p luantiserver-${VERSION}-msys2-win64/textures/
cp -r bin/ builtin/ games/ mods/ textures/ worlds/ luantiserver-${VERSION}-msys2-win64/
cp -r bin/ builtin/ games/ mods/ worlds/ luantiserver-${VERSION}-msys2-win64/
cp textures/texture_packs_here.txt luantiserver-${VERSION}-msys2-win64/textures/
zip -r9 luantiserver-${VERSION}-msys2-win64.zip luantiserver-${VERSION}-msys2-win64/ zip -r9 luantiserver-${VERSION}-msys2-win64.zip luantiserver-${VERSION}-msys2-win64/
# clean up # clean up