1
0

Compare commits

...

10 Commits

Author SHA1 Message Date
savilli
9866b07654 Fix potential freeze in core.check_for_falling 2024-06-01 00:14:23 -04:00
fbdf65c57b update CI - fix build of ssl packages on CI alpine images
* remove edge cos will always are changing
* openssl 1.1 is only at edge.. puff so maybe will provide errors on modern
2024-05-31 23:45:38 -04:00
fb8401098e CMake: link with Intl when necessary
* On some platforms, such as Linux with GNU libc, the gettext
  functions are present in the C standard library and libintl
  is not required. For other libc (uClibc-ng or musl) libintl
   may be required. Thanks Debian the mother of all distros!
* close https://github.com/minetest/minetest/issues/8583
* fixed https://github.com/minetest/minetest/issues/8588
2024-05-31 23:41:40 -04:00
e8265931bc update CI - added alpine build and use right dependency packages
* as always alpoine packages are full shit, puff
2024-05-31 22:44:37 -04:00
dbf529eed4 update CI - fix build for older releases and dont use private postgresql 2024-05-31 17:08:46 -04:00
e71ba6db9e update CI force usage of backports on older debians for json 2024-05-31 16:19:13 -04:00
a532068c86 update build CI use all server postgresql in older debians, trey also newer fedoras
* hardcoded cmake cos is the defaul for older versions of postgresql
  this also works on newer ones.. for custom paths reconfiguration
  must be done when runs cmake configure step
2024-05-31 16:12:24 -04:00
f266a5138e Check property duplicate login names
* Check for duplicate login in TOSERVER_INIT handler
  backported 492110a640
  i.e. checks for duplicate logins before sending all media data to the client
2024-05-31 15:47:20 -04:00
4171d9cc87 fix ci cmakelists typo error 2024-05-30 22:05:04 -04:00
c0f4c4de3e fix cmakelists install manpages error missing colon 2024-05-30 21:25:08 -04:00
5 changed files with 74 additions and 11 deletions

View File

@ -14,7 +14,7 @@ stages:
- mkdir cmakebuild
- mkdir -p artifact/multicraft/usr/
- cd cmakebuild
- cmake -DCMAKE_INSTALL_PREFIX=../artifact/multicraft/usr/ -DBUILD_SERVER=ON -DBUILD_CLIENT=ON -DRUN_IN_PLACE=OFF -DENABLE_CURL=ON -DENABLE_SOUND=ON -DENABLE_LUAJIT=ON -DENABLE_GETTEXT=ON -DENABLE_FREETYPE=ON -DENABLE_SYSTEM_GMP=ON -DENABLE_SYSTEM_JSONCPP=ON -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo ..
- cmake -DCMAKE_INSTALL_PREFIX=../artifact/multicraft/usr/ -DBUILD_SERVER=ON -DBUILD_CLIENT=ON -DRUN_IN_PLACE=OFF -DENABLE_CURL=ON -DENABLE_SOUND=ON -DENABLE_LUAJIT=ON -DENABLE_GETTEXT=ON -DENABLE_FREETYPE=ON -DENABLE_SYSTEM_GMP=ON -DENABLE_SYSTEM_JSONCPP=ON -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_POSTGRESQL=ON ..
- make -j$(nproc)
- make install
artifacts:
@ -23,6 +23,47 @@ stages:
paths:
- artifact/*
##
## Alpine the limited distro for nonsocial geeks
##
build:alpine-312:
extends: .build_template
image: alpine:3.12
before_script:
- apk update
- apk add build-base cmake pkgconf gettext-dev bzip2-dev curl-dev libnl3-dev rtmpdump-dev libidn2-dev ncurses-dev freetype-dev mesa-dev gmp-dev irrlicht-dev libjpeg-turbo-dev jsoncpp-dev leveldb-dev luajit-dev lua5.1-dev libogg-dev openal-soft-dev libpng-dev postgresql-dev hiredis-dev sqlite-dev libvorbis-dev libxi-dev zlib-dev doxygen libxrandr-dev libx11-dev zstd-dev openssl-dev samurai
build:alpine-314:
extends: .build_template
image: alpine:3.14
before_script:
- apk update
- apk add build-base cmake pkgconf gettext-dev bzip2-dev curl-dev libnl3-dev rtmpdump-dev libidn2-dev ncurses-dev freetype-dev mesa-dev gmp-dev irrlicht-dev libjpeg-turbo-dev jsoncpp-dev leveldb-dev luajit-dev lua5.1-dev libogg-dev openal-soft-dev libpng-dev postgresql-dev hiredis-dev sqlite-dev libvorbis-dev libxi-dev zlib-dev doxygen libxrandr-dev libx11-dev zstd-dev openssl-dev samurai
build:alpine-316:
extends: .build_template
image: alpine:3.16
before_script:
- apk update
- apk add build-base cmake pkgconf gettext-dev bzip2-dev curl-dev libnl3-dev rtmpdump-dev libidn2-dev ncurses-dev freetype-dev mesa-dev gmp-dev irrlicht-dev libjpeg-turbo-dev jsoncpp-dev leveldb-dev luajit-dev lua5.1-dev libogg-dev openal-soft-dev libpng-dev postgresql-dev hiredis-dev sqlite-dev libvorbis-dev libxi-dev zlib-dev doxygen libxrandr-dev libx11-dev zstd-dev openssl-dev samurai
build:alpine-319:
extends: .build_template
image: alpine:3.19
before_script:
- apk update
- apk add build-base cmake pkgconf gettext-dev bzip2-dev curl-dev libnl3-dev rtmpdump-dev libidn2-dev ncurses-dev freetype-dev mesa-dev gmp-dev irrlicht-dev libjpeg-turbo-dev jsoncpp-dev leveldb-dev luajit-dev lua5.1-dev libogg-dev openal-soft-dev libpng-dev postgresql-dev hiredis-dev sqlite-dev libvorbis-dev libxi-dev zlib-dev doxygen libxrandr-dev libx11-dev zstd-dev openssl-dev samurai
# error - need to enable testing repo due spatial index
#build:alpine-edge:
# extends: .build_template
# image: alpine:edge
# before_script:
# - apk update
# - apk add build-base git cmake pkgconf gettext-dev bzip2-dev curl-dev libnl3-dev rtmpdump-dev libidn2-dev ncurses-dev freetype-dev mesa-dev gmp-dev irrlicht-dev libjpeg-turbo-dev jsoncpp-dev leveldb-dev luajit-dev lua5.1-dev libogg-dev openal-soft-dev libpng-dev postgresql-dev hiredis-dev sqlite-dev libvorbis-dev libxi-dev zlib-dev doxygen libxrandr-dev libx11-dev zstd-dev openssl1.1-compat-dev samurai libspatialindex-dev
##
## Debian mother of many distros
##
@ -46,7 +87,8 @@ build:debian-8:
- echo "deb http://archive.debian.org/debian/ jessie-backports main contrib non-free" >> /etc/apt/sources.list.d/50debianoficial.list
- echo "deb http://deb.freexian.com/extended-lts jessie main contrib non-free" >> /etc/apt/sources.list.d/50debianoficial.list
- DEBIAN_FRONTEND=noninteractive apt-get update -y || true
- DEBIAN_FRONTEND=noninteractive apt-get -y --force-yes install build-essential cmake pkg-config cmake-data debhelper lsb-release gettext libbz2-dev libcurl4-gnutls-dev libnl-genl-3-dev libnl-3-dev librtmp-dev libidn11-dev libncurses-dev libfreetype6-dev libglu1-mesa-dev libgmp-dev libirrlicht-dev libjpeg-dev libjsoncpp-dev libleveldb-dev libluajit-5.1-dev liblua5.1-dev libogg-dev libopenal-dev libpng-dev libpq-dev libhiredis-dev libspatialindex-dev libsqlite3-dev libvorbis-dev libx11-dev libxxf86vm-dev libpq-dev libhiredis-dev zlib1g-dev doxygen libxrandr-dev x11proto-xf86vidmode-dev
- DEBIAN_FRONTEND=noninteractive apt-get -y --force-yes install build-essential cmake pkg-config cmake-data debhelper lsb-release gettext libbz2-dev libcurl4-gnutls-dev libnl-genl-3-dev libnl-3-dev librtmp-dev libidn11-dev libncurses-dev libfreetype6-dev libglu1-mesa-dev libgmp-dev libirrlicht-dev libjpeg-dev libleveldb-dev libluajit-5.1-dev liblua5.1-dev libogg-dev libopenal-dev libpng-dev libpq-dev libhiredis-dev libspatialindex-dev libsqlite3-dev libvorbis-dev libx11-dev libxxf86vm-dev libpq-dev postgresql-server-dev-all libhiredis-dev zlib1g-dev doxygen libxrandr-dev x11proto-xf86vidmode-dev
- DEBIAN_FRONTEND=noninteractive apt-get -y --force-yes -t jessie-backports install libjsoncpp-dev
# Stretch
@ -57,6 +99,7 @@ build:debian-9:
- echo "" > /etc/apt/apt.conf.d/50venenuxcustom
- echo "APT::Get::AllowUnauthenticated \"true\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- echo "Acquire::AllowInsecureRepositories \"true\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- echo "deb http://archive.debian.org/debian/ stretch main contrib" > /etc/apt/sources.list.d/50debianoficial.list
- echo "deb http://deb.freexian.com/extended-lts stretch main contrib non-free" > /etc/apt/sources.list
- DEBIAN_FRONTEND=noninteractive apt-get update -y || true
- DEBIAN_FRONTEND=noninteractive apt-get -y --force-yes install build-essential cmake pkg-config debhelper lsb-release gettext libbz2-dev libcurl4-gnutls-dev libnl-genl-3-dev libnl-3-dev librtmp-dev libidn11-dev libncurses-dev libfreetype6-dev libglu1-mesa-dev libgmp-dev libirrlicht-dev libjpeg-dev libjsoncpp-dev libleveldb-dev libluajit-5.1-dev liblua5.1-dev libogg-dev libopenal-dev libpng-dev libpq-dev libhiredis-dev libspatialindex-dev libsqlite3-dev libvorbis-dev libx11-dev libxxf86vm-dev postgresql-server-dev-all libpq-dev libhiredis-dev zlib1g-dev doxygen libxrandr-dev mesa-common-dev x11proto-xf86vidmode-dev libzstd-dev
@ -68,7 +111,7 @@ build:debian-11:
image: debian:11
before_script:
- apt-get update -y || true
- apt-get -y install build-essential cmake pkg-config debhelper lsb-release gettext libbz2-dev libcurl4-gnutls-dev libnl-genl-3-dev libnl-3-dev librtmp-dev libidn11-dev libncurses-dev libfreetype6-dev libglu1-mesa-dev libgmp-dev libirrlicht-dev libjpeg-dev libjsoncpp-dev libleveldb-dev libluajit-5.1-dev liblua5.1-dev libogg-dev libopenal-dev libpng-dev libpq-dev libhiredis-dev libspatialindex-dev libsqlite3-dev libvorbis-dev libx11-dev libxxf86vm-dev postgresql-server-dev-all libpq-dev libhiredis-dev zlib1g-dev doxygen libxrandr-dev mesa-common-dev x11proto-xf86vidmode-dev libzstd-dev
- apt-get -y install build-essential cmake pkg-config debhelper lsb-release gettext libbz2-dev libcurl4-gnutls-dev libnl-genl-3-dev libnl-3-dev librtmp-dev libidn11-dev libncurses-dev libfreetype6-dev libglu1-mesa-dev libgmp-dev libirrlicht-dev libjpeg-dev libjsoncpp-dev libleveldb-dev libluajit-5.1-dev liblua5.1-dev libogg-dev libopenal-dev libpng-dev libpq-dev postgresql-server-dev-all libhiredis-dev libspatialindex-dev libsqlite3-dev libvorbis-dev libx11-dev libxxf86vm-dev postgresql-server-dev-all libpq-dev libhiredis-dev zlib1g-dev doxygen libxrandr-dev mesa-common-dev x11proto-xf86vidmode-dev libzstd-dev
# Bookworm
@ -139,10 +182,10 @@ build:fedora-36:
<<: *build_definition
image: fedora:36
before_script:
- dnf -y install make automake gcc gcc-c++ kernel-devel cmake pkgconfig bzip2-devel gettext-devel sqlite-devel zlib-devel libpng-devel libjpeg-turbo-devel libXxf86vm-devel mesa-libGL-devel irrlicht-devel desktop-file-utils systemd openal* libvorbis* jsoncpp-devel libcurl-devel libcurl luajit-devel leveldb-devel gmp-devel libappstream-glib freetype-devel spatialindex-devel openssl-devel libogg-devel libpq-devel hiredis-devel libzstd-devel libXi-devel ncurses-devel doxygen
- dnf -y install make automake gcc gcc-c++ kernel-devel cmake pkgconfig bzip2-devel gettext-devel sqlite-devel zlib-devel libpng-devel libjpeg-turbo-devel libXxf86vm-devel mesa-libGL-devel irrlicht-devel desktop-file-utils systemd openal* libvorbis* jsoncpp-devel libcurl-devel libcurl luajit-devel leveldb-devel gmp-devel libappstream-glib freetype-devel spatialindex-devel openssl-devel libogg-devel hiredis-devel libzstd-devel libXi-devel ncurses-devel doxygen
build:fedora-37:
<<: *build_definition
image: fedora:37
before_script:
- dnf -y install make automake gcc gcc-c++ kernel-devel cmake pkgconfig bzip2-devel gettext-devel sqlite-devel zlib-devel libpng-devel libjpeg-turbo-devel libXxf86vm-devel mesa-libGL-devel irrlicht-devel desktop-file-utils systemd openal* libvorbis* jsoncpp-devel libcurl-devel libcurl luajit-devel leveldb-devel gmp-devel libappstream-glib freetype-devel spatialindex-devel openssl-devel libogg-devel libpq-devel hiredis-devel libzstd-devel libXi-devel ncurses-devel doxygen
- dnf -y install make automake gcc gcc-c++ kernel-devel cmake pkgconfig bzip2-devel gettext-devel sqlite-devel zlib-devel libpng-devel libjpeg-turbo-devel libXxf86vm-devel mesa-libGL-devel irrlicht-devel desktop-file-utils systemd openal* libvorbis* jsoncpp-devel libcurl-devel libcurl luajit-devel leveldb-devel gmp-devel libappstream-glib freetype-devel spatialindex-devel openssl-devel libogg-devel hiredis-devel libzstd-devel libXi-devel ncurses-devel doxygen

View File

@ -223,8 +223,8 @@ install(FILES "doc/world_format.txt" DESTINATION "${DOCDIR}" COMPONENT "Docs")
install(FILES "multicraft.conf.example" DESTINATION "${EXAMPLE_CONF_DIR}")
if(UNIX AND NOT APPLE)
install(FILES "doc/minetest.6" DESTINATION "${MANDIR}/man6 RENAME "${PROJECT_NAME}.6")
install(FILES "doc/minetestserver.6" DESTINATION "${MANDIR}/man6 RENAME "${PROJECT_NAME}server.6")
install(FILES "doc/minetest.6" DESTINATION "${MANDIR}/man6" RENAME "${PROJECT_NAME}.6")
install(FILES "doc/minetestserver.6" DESTINATION "${MANDIR}/man6" RENAME "${PROJECT_NAME}server.6")
install(FILES "misc/net.minetest.minetest.desktop" DESTINATION "${XDG_APPS_DIR}" RENAME "net.minetest.${PROJECT_NAME}.desktop")
install(FILES "misc/net.minetest.minetest.appdata.xml" DESTINATION "${APPDATADIR}" RENAME "net.minetest.${PROJECT_NAME}.appdata.xml")
install(FILES "misc/minetest.svg" DESTINATION "${ICONDIR}/hicolor/scalable/apps" RENAME "multicraft.svg")

View File

@ -513,16 +513,16 @@ function core.check_single_for_falling(p)
if same and d_bottom.paramtype2 == "leveled" and
core.get_node_level(p_bottom) <
core.get_node_max_level(p_bottom) then
convert_to_falling_node(p, n)
return true
local success = convert_to_falling_node(p, n)
return success
end
-- Otherwise only if the bottom node is considered "fall through"
if not same and
(not d_bottom.walkable or d_bottom.buildable_to) and
(core.get_item_group(n.name, "float") == 0 or
d_bottom.liquidtype == "none") then
convert_to_falling_node(p, n)
return true
local success = convert_to_falling_node(p, n)
return success
end
end
end

View File

@ -84,6 +84,14 @@ if(ENABLE_GETTEXT)
endif()
set(USE_GETTEXT TRUE)
message(STATUS "GetText enabled; locales found: ${GETTEXT_AVAILABLE_LOCALES}")
# On some platforms, such as Linux with GNU libc, the gettext
# functions are present in the C standard library and libintl
# is not required. For other libc (uClibc-ng or musl) libintl
# may be required.
find_package(Intl)
if(NOT Intl_LIBRARIES STREQUAL "")
message(STATUS "GetText Intl : ${Intl_LIBRARIES}")
endif()
endif(GETTEXTLIB_FOUND)
else()
mark_as_advanced(GETTEXT_ICONV_DLL GETTEXT_INCLUDE_DIR GETTEXT_LIBRARY GETTEXT_MSGFMT)
@ -575,6 +583,7 @@ if(BUILD_CLIENT)
${BZIP2_LIBRARIES}
${PNG_LIBRARIES}
${X11_LIBRARIES}
${Intl_LIBRARIES}
${SOUND_LIBRARIES}
${SQLITE3_LIBRARY}
${LUA_LIBRARY}
@ -684,6 +693,7 @@ if(BUILD_SERVER)
${ZLIB_LIBRARIES}
${SQLITE3_LIBRARY}
${JSON_LIBRARY}
${Intl_LIBRARIES}
${LUA_LIBRARY}
${GMP_LIBRARY}
${PLATFORM_LIBS}

View File

@ -175,6 +175,16 @@ void Server::handleCommand_Init(NetworkPacket* pkt)
return;
}
RemotePlayer *player = m_env->getPlayer(playername);
// If player is already connected, cancel
if (player && player->getPeerId() != PEER_ID_INEXISTENT) {
actionstream << "Server: Player with name \"" << playername <<
"\" tried to connect, but player with same name is already connected" << std::endl;
DenyAccess(peer_id, SERVER_ACCESSDENIED_ALREADY_CONNECTED);
return;
}
m_clients.setPlayerName(peer_id, playername);
//TODO (later) case insensitivity