Merge branch 'stable-0.4' for revert teleport pathc and fix ci builds
This commit is contained in:
commit
c7be1239f6
@ -151,6 +151,8 @@ build:ubuntu-14.10:
|
|||||||
- apt-get update -y || true
|
- apt-get update -y || true
|
||||||
- apt-get -y --force-yes install build-essential git 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 libsqlite3-dev libvorbis-dev libx11-dev libxxf86vm-dev libpq-dev libhiredis-dev zlib1g-dev doxygen libxrandr-dev mesa-common-dev x11proto-xf86vidmode-dev
|
- apt-get -y --force-yes install build-essential git 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 libsqlite3-dev libvorbis-dev libx11-dev libxxf86vm-dev libpq-dev libhiredis-dev zlib1g-dev doxygen libxrandr-dev mesa-common-dev x11proto-xf86vidmode-dev
|
||||||
|
|
||||||
|
# Zesty most close to stretch
|
||||||
|
|
||||||
build:ubuntu-17.04:
|
build:ubuntu-17.04:
|
||||||
extends: .build_template
|
extends: .build_template
|
||||||
image: ubuntu:zesty
|
image: ubuntu:zesty
|
||||||
|
@ -7,7 +7,10 @@
|
|||||||
core.chatcommands = core.registered_chatcommands -- BACKWARDS COMPATIBILITY
|
core.chatcommands = core.registered_chatcommands -- BACKWARDS COMPATIBILITY
|
||||||
|
|
||||||
core.register_on_chat_message(function(name, message)
|
core.register_on_chat_message(function(name, message)
|
||||||
if message:sub(1,1) ~= "/" then
|
if message:find("[\r\n]") then
|
||||||
|
core.chat_send_player(name, "You cannot use newlines in chat messages.")
|
||||||
|
return true
|
||||||
|
elseif message:sub(1,1) ~= "/" then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -402,6 +402,8 @@ function modmgr.preparemodlist(data)
|
|||||||
if modpath ~= nil and
|
if modpath ~= nil and
|
||||||
modpath ~= "" then
|
modpath ~= "" then
|
||||||
get_mods(modpath,global_mods)
|
get_mods(modpath,global_mods)
|
||||||
|
else
|
||||||
|
get_mods("/usr/share/games/minetest/mods",global_mods)
|
||||||
end
|
end
|
||||||
|
|
||||||
for i=1,#global_mods,1 do
|
for i=1,#global_mods,1 do
|
||||||
|
@ -6,16 +6,56 @@
|
|||||||
#
|
#
|
||||||
# This module is similar to FindLua51.cmake except that it finds LuaJit instead.
|
# This module is similar to FindLua51.cmake except that it finds LuaJit instead.
|
||||||
|
|
||||||
find_package (PkgConfig REQUIRED)
|
FIND_PATH(LUA_INCLUDE_DIR luajit.h
|
||||||
pkg_check_modules (LuaJIT QUIET REQUIRED luajit)
|
HINTS
|
||||||
set (LUA_LIBRARY ${LuaJIT_LIBRARIES})
|
$ENV{LUA_DIR}
|
||||||
set (LUA_INCLUDE_DIR ${LuaJIT_INCLUDE_DIRS})
|
PATH_SUFFIXES include/luajit-2.1 include/luajit-2.0 include/luajit-5_1-2.1 include/luajit-5_1-2.0 include luajit
|
||||||
set (LUA_VERSION_STRING ${LuaJIT_VERSION})
|
PATHS
|
||||||
|
~/Library/Frameworks
|
||||||
|
/Library/Frameworks
|
||||||
|
/sw # Fink
|
||||||
|
/opt/local # DarwinPorts
|
||||||
|
/opt/csw # Blastwave
|
||||||
|
/opt
|
||||||
|
)
|
||||||
|
|
||||||
|
# Test if running on vcpkg toolchain
|
||||||
|
if(DEFINED VCPKG_TARGET_TRIPLET AND DEFINED VCPKG_APPLOCAL_DEPS)
|
||||||
|
# On vcpkg luajit is 'lua51' and normal lua is 'lua'
|
||||||
|
FIND_LIBRARY(LUA_LIBRARY
|
||||||
|
NAMES lua51
|
||||||
|
HINTS
|
||||||
|
$ENV{LUA_DIR}
|
||||||
|
PATH_SUFFIXES lib
|
||||||
|
)
|
||||||
|
else()
|
||||||
|
FIND_LIBRARY(LUA_LIBRARY
|
||||||
|
NAMES luajit-5.1
|
||||||
|
HINTS
|
||||||
|
$ENV{LUA_DIR}
|
||||||
|
PATH_SUFFIXES lib64 lib
|
||||||
|
PATHS
|
||||||
|
~/Library/Frameworks
|
||||||
|
/Library/Frameworks
|
||||||
|
/sw
|
||||||
|
/opt/local
|
||||||
|
/opt/csw
|
||||||
|
/opt
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
IF(LUA_INCLUDE_DIR AND EXISTS "${LUA_INCLUDE_DIR}/luajit.h")
|
||||||
|
FILE(STRINGS "${LUA_INCLUDE_DIR}/luajit.h" lua_version_str REGEX "^#define[ \t]+LUA_RELEASE[ \t]+\"LuaJIT .+\"")
|
||||||
|
|
||||||
|
STRING(REGEX REPLACE "^#define[ \t]+LUA_RELEASE[ \t]+\"LuaJIT ([^\"]+)\".*" "\\1" LUA_VERSION_STRING "${lua_version_str}")
|
||||||
|
UNSET(lua_version_str)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
INCLUDE(FindPackageHandleStandardArgs)
|
INCLUDE(FindPackageHandleStandardArgs)
|
||||||
# handle the QUIETLY and REQUIRED arguments and set LUAJIT_FOUND to TRUE if
|
# handle the QUIETLY and REQUIRED arguments and set LUAJIT_FOUND to TRUE if
|
||||||
# all listed variables are TRUE
|
# all listed variables are TRUE
|
||||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LuaJit
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LuaJIT
|
||||||
REQUIRED_VARS LUA_LIBRARY LUA_INCLUDE_DIR
|
REQUIRED_VARS LUA_LIBRARY LUA_INCLUDE_DIR
|
||||||
VERSION_VAR LUA_VERSION_STRING)
|
VERSION_VAR LUA_VERSION_STRING)
|
||||||
|
|
||||||
|
@ -174,7 +174,7 @@ option(ENABLE_POSTGRESQL "Enable PostgreSQL backend" TRUE)
|
|||||||
set(USE_POSTGRESQL FALSE)
|
set(USE_POSTGRESQL FALSE)
|
||||||
|
|
||||||
if(ENABLE_POSTGRESQL)
|
if(ENABLE_POSTGRESQL)
|
||||||
if(CMAKE_VERSION VERSION_LESS "3.10")
|
if(CMAKE_VERSION VERSION_LESS "3.20")
|
||||||
find_package(PostgreSQL QUIET)
|
find_package(PostgreSQL QUIET)
|
||||||
# Before CMake 3.20 FindPostgreSQL.cmake always looked for server includes
|
# Before CMake 3.20 FindPostgreSQL.cmake always looked for server includes
|
||||||
# but we don't need them, so continue anyway if only those are missing.
|
# but we don't need them, so continue anyway if only those are missing.
|
||||||
@ -647,7 +647,7 @@ if(BUILD_CLIENT)
|
|||||||
target_link_libraries(${PROJECT_NAME} ${CURSES_LIBRARIES})
|
target_link_libraries(${PROJECT_NAME} ${CURSES_LIBRARIES})
|
||||||
endif()
|
endif()
|
||||||
if (USE_POSTGRESQL)
|
if (USE_POSTGRESQL)
|
||||||
target_link_libraries(${PROJECT_NAME} ${POSTGRESQL_LIBRARY})
|
target_link_libraries(${PROJECT_NAME} ${PostgreSQL_LIBRARIES})
|
||||||
endif()
|
endif()
|
||||||
if (USE_LEVELDB)
|
if (USE_LEVELDB)
|
||||||
target_link_libraries(${PROJECT_NAME} ${LEVELDB_LIBRARY})
|
target_link_libraries(${PROJECT_NAME} ${LEVELDB_LIBRARY})
|
||||||
@ -682,7 +682,7 @@ if(BUILD_SERVER)
|
|||||||
target_link_libraries(${PROJECT_NAME}server ${CURSES_LIBRARIES})
|
target_link_libraries(${PROJECT_NAME}server ${CURSES_LIBRARIES})
|
||||||
endif()
|
endif()
|
||||||
if (USE_POSTGRESQL)
|
if (USE_POSTGRESQL)
|
||||||
target_link_libraries(${PROJECT_NAME}server ${POSTGRESQL_LIBRARY})
|
target_link_libraries(${PROJECT_NAME}server ${PostgreSQL_LIBRARIES})
|
||||||
endif()
|
endif()
|
||||||
if (USE_LEVELDB)
|
if (USE_LEVELDB)
|
||||||
target_link_libraries(${PROJECT_NAME}server ${LEVELDB_LIBRARY})
|
target_link_libraries(${PROJECT_NAME}server ${LEVELDB_LIBRARY})
|
||||||
@ -870,12 +870,12 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
endif(CMAKE_SYSTEM_NAME MATCHES "(Darwin|BSD|DragonFly)")
|
endif(CMAKE_SYSTEM_NAME MATCHES "(Darwin|BSD|DragonFly)")
|
||||||
|
|
||||||
set(CMAKE_CXX_FLAGS_SEMIDEBUG "-g -O1 -Wall ${WARNING_FLAGS} ${CMAKE_C_FLAGS} ${OTHER_FLAGS}")
|
set(CMAKE_CXX_FLAGS_SEMIDEBUG "-g -O1 -Wall ${WARNING_FLAGS} ${CMAKE_CXX_FLAGS} ${OTHER_FLAGS} $ENV{CPPFLAGS}")
|
||||||
set(CMAKE_CXX_FLAGS_DEBUG "-g -O0 -Wall ${WARNING_FLAGS} ${CMAKE_C_FLAGS} ${OTHER_FLAGS}")
|
set(CMAKE_CXX_FLAGS_DEBUG "-g -O0 -Wall ${WARNING_FLAGS} ${CMAKE_CXX_FLAGS} ${OTHER_FLAGS} $ENV{CPPFLAGS}")
|
||||||
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${CMAKE_C_FLAGS} ")
|
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${CMAKE_C_FLAGS} $ENV{CFLAGS}")
|
||||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${CMAKE_C_FLAGS} -g")
|
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${CMAKE_C_FLAGS} -g")
|
||||||
set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_PROFILE} ${CMAKE_C_FLAGS} -O1 -g")
|
set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_PROFILE} ${CMAKE_C_FLAGS} -O1 -g")
|
||||||
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_WITHDEBINFO} ${CMAKE_C_FLAGS} -g")
|
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_WITHDEBINFO} ${CMAKE_C_FLAGS} $ENV{CFLAGS} -g")
|
||||||
|
|
||||||
if(USE_GPROF)
|
if(USE_GPROF)
|
||||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -pg")
|
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -pg")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user