1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-11 17:51:04 +00:00

Rename to Luanti (#15294)

The new header intentionally isn't in MTG stone design (or any other MTG-esque design), since we want to distance Luanti and MTG from each other. The font "undefined medium" (https://undefined-medium.com/) was used. 

ASCII art generated by https://patorjk.com/software/taag/#p=display&f=Graffiti&t=luanti
https://github.com/minetest/minetest/pull/11952#issuecomment-1013364703

---------

Co-authored-by: sfan5 <sfan5@live.de>
This commit is contained in:
grorp 2024-10-27 14:04:51 +01:00 committed by GitHub
parent b7073df68c
commit 4b90e582b4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
118 changed files with 206 additions and 179 deletions

View file

@ -1,4 +1,4 @@
project(minetest)
project(luanti)
INCLUDE(CheckTypeSize)
INCLUDE(CheckIncludeFiles)
@ -6,12 +6,12 @@ INCLUDE(CheckLibraryExists)
check_type_size(int SIZEOF_INT BUILTIN_TYPES_ONLY LANGUAGE CXX)
if(SIZEOF_INT LESS 4)
message(FATAL_ERROR "Minetest will not work with int less than 32 bits wide.")
message(FATAL_ERROR "${PROJECT_NAME_CAPITALIZED} will not work with int less than 32 bits wide.")
endif()
check_type_size(size_t SIZEOF_SIZE_T LANGUAGE CXX)
if(SIZEOF_SIZE_T LESS 4)
message(FATAL_ERROR "Minetest will not work with size_t less than 32 bits wide.")
message(FATAL_ERROR "${PROJECT_NAME_CAPITALIZED} will not work with size_t less than 32 bits wide.")
endif()
# Add custom SemiDebug build mode
@ -488,7 +488,7 @@ endif()
# This gives us the icon and file version information
if(WIN32)
set(WINRESOURCE_FILE "${CMAKE_CURRENT_SOURCE_DIR}/../misc/winresource.rc")
set(MINETEST_EXE_MANIFEST_FILE "${CMAKE_CURRENT_SOURCE_DIR}/../misc/minetest.exe.manifest")
set(EXE_MANIFEST_FILE "${CMAKE_CURRENT_SOURCE_DIR}/../misc/luanti.exe.manifest")
if(MINGW)
if(NOT CMAKE_RC_COMPILER)
set(CMAKE_RC_COMPILER "windres.exe")
@ -498,10 +498,10 @@ if(WIN32)
-i${WINRESOURCE_FILE}
-o ${CMAKE_CURRENT_BINARY_DIR}/winresource_rc.o
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
DEPENDS ${WINRESOURCE_FILE} ${MINETEST_EXE_MANIFEST_FILE})
DEPENDS ${WINRESOURCE_FILE} ${EXE_MANIFEST_FILE})
SET(extra_windows_SRCS ${CMAKE_CURRENT_BINARY_DIR}/winresource_rc.o)
else(MINGW) # Probably MSVC
set(extra_windows_SRCS ${WINRESOURCE_FILE} ${MINETEST_EXE_MANIFEST_FILE})
set(extra_windows_SRCS ${WINRESOURCE_FILE} ${EXE_MANIFEST_FILE})
endif(MINGW)
endif()
@ -556,7 +556,7 @@ include_directories(SYSTEM
${GMP_INCLUDE_DIR}
${JSON_INCLUDE_DIR}
${LUA_BIT_INCLUDE_DIR}
# on Android, Minetest depends on SDL2 directly
# on Android, Luanti depends on SDL2 directly
# on other platforms, only IrrlichtMt depends on SDL2
"$<$<PLATFORM_ID:Android>:${SDL2_INCLUDE_DIRS}>"
)
@ -578,7 +578,7 @@ endif()
# When cross-compiling assume the user doesn't want to run the executable anyway,
# otherwise place it in <source dir>/bin/ since Minetest can only run from there.
# otherwise place it in <source dir>/bin/ since Luanti can only run from there.
if(NOT CMAKE_CROSSCOMPILING)
set(EXECUTABLE_OUTPUT_PATH "${CMAKE_SOURCE_DIR}/bin")
endif()
@ -626,7 +626,7 @@ if(BUILD_CLIENT)
sha256
${FREETYPE_LIBRARY}
${PLATFORM_LIBS}
# on Android, Minetest depends on SDL2 directly
# on Android, Luanti depends on SDL2 directly
# on other platforms, only IrrlichtMt depends on SDL2
"$<$<PLATFORM_ID:Android>:${SDL2_LIBRARIES}>"
)
@ -812,7 +812,7 @@ elseif(NOT MSVC)
check_c_source_compiles("#include <lua.h>\nint main(){return sizeof(lua_atccall);}" HAVE_ATCCALL)
if(NOT HAVE_ATCCALL)
string(CONCAT explanation_msg
"It looks like you're trying to build Minetest using a system-wide "
"It looks like you're trying to build ${PROJECT_NAME_CAPITALIZED} using a system-wide "
"Lua installation. This is no longer supported because PUC Lua "
"cannot interoperate with C++ correctly. Read src/unittest/test_lua.cpp "
" for technical details.")
@ -986,6 +986,14 @@ if(WIN32)
endif()
endif()
macro(CreateLegacyAlias _cmake_target _old_path _new_name)
add_custom_target("${_cmake_target}" ALL
COMMAND "${CMAKE_COMMAND}" -E create_symlink "${_new_name}" "${_old_path}"
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
add_dependencies("${_cmake_target}" "${_new_name}")
install(PROGRAMS "${_old_path}" DESTINATION ${BINDIR})
endmacro()
if(BUILD_CLIENT AND NOT ANDROID)
install(TARGETS ${PROJECT_NAME}
RUNTIME DESTINATION ${BINDIR}
@ -993,6 +1001,9 @@ if(BUILD_CLIENT AND NOT ANDROID)
ARCHIVE DESTINATION ${BINDIR}
BUNDLE DESTINATION .
)
if(UNIX)
CreateLegacyAlias(minetest_alias "${EXECUTABLE_OUTPUT_PATH}/minetest" ${PROJECT_NAME})
endif()
if(APPLE)
install(CODE "
@ -1016,6 +1027,9 @@ endif()
if(BUILD_SERVER)
install(TARGETS ${PROJECT_NAME}server DESTINATION ${BINDIR})
if(UNIX)
CreateLegacyAlias(minetestserver_alias "${EXECUTABLE_OUTPUT_PATH}/minetestserver" ${PROJECT_NAME}server)
endif()
endif()
if (ANDROID)

View file

@ -61,7 +61,7 @@ extern "C" {
}
#if !defined(__cpp_rtti) || !defined(__cpp_exceptions)
#error Minetest cannot be built without exceptions or RTTI
#error Luanti cannot be built without exceptions or RTTI
#endif
#if defined(__MINGW32__) && !defined(__clang__)
@ -69,7 +69,7 @@ extern "C" {
// https://github.com/minetest/minetest/issues/10137 for one of the various issues we had
#error ==================================
#error MinGW gcc has a broken TLS implementation and is not supported for building \
Minetest. Look at testTLS() in test_threading.cpp and see for yourself. \
Luanti. Look at testTLS() in test_threading.cpp and see for yourself. \
Please use a clang-based compiler or alternatively MSVC.
#error ==================================
#endif
@ -174,6 +174,19 @@ int main(int argc, char *argv[])
warningstream << "Continuing without debugger" << std::endl;
}
{
auto exe_name = argc > 0 ? lowercase(fs::GetFilenameFromPath(argv[0])) : "";
if (str_starts_with(exe_name, "minetest")) {
#if CHECK_CLIENT_BUILD()
const char *new_ = PROJECT_NAME;
#else
const char *new_ = PROJECT_NAME "server";
#endif
warningstream << "The executable " << exe_name
<< " is a deprecated alias, please use " << new_ << " instead." << std::endl;
}
}
porting::signal_handler_init();
porting::initializePaths();
@ -366,15 +379,15 @@ static void set_allowed_options(OptionList *allowed_options)
allowed_options->insert(std::make_pair("gameid", ValueSpec(VALUETYPE_STRING,
_("Set gameid (\"--gameid list\" prints available ones)"))));
allowed_options->insert(std::make_pair("migrate", ValueSpec(VALUETYPE_STRING,
_("Migrate from current map backend to another (Only works when using minetestserver or with --server)"))));
_("Migrate from current map backend to another (Only works when using " PROJECT_NAME "server or with --server)"))));
allowed_options->insert(std::make_pair("migrate-players", ValueSpec(VALUETYPE_STRING,
_("Migrate from current players backend to another (Only works when using minetestserver or with --server)"))));
_("Migrate from current players backend to another (Only works when using " PROJECT_NAME "server or with --server)"))));
allowed_options->insert(std::make_pair("migrate-auth", ValueSpec(VALUETYPE_STRING,
_("Migrate from current auth backend to another (Only works when using minetestserver or with --server)"))));
_("Migrate from current auth backend to another (Only works when using " PROJECT_NAME "server or with --server)"))));
allowed_options->insert(std::make_pair("migrate-mod-storage", ValueSpec(VALUETYPE_STRING,
_("Migrate from current mod storage backend to another (Only works when using minetestserver or with --server)"))));
_("Migrate from current mod storage backend to another (Only works when using " PROJECT_NAME "server or with --server)"))));
allowed_options->insert(std::make_pair("terminal", ValueSpec(VALUETYPE_FLAG,
_("Feature an interactive terminal (Only works when using minetestserver or with --server)"))));
_("Feature an interactive terminal (Only works when using " PROJECT_NAME "server or with --server)"))));
allowed_options->insert(std::make_pair("recompress", ValueSpec(VALUETYPE_FLAG,
_("Recompress the blocks of the given map database."))));
#if CHECK_CLIENT_BUILD()

View file

@ -464,7 +464,8 @@ bool setSystemPaths()
// Use "C:\Users\<user>\AppData\Roaming\<PROJECT_NAME_C>"
len = GetEnvironmentVariable("APPDATA", buf, sizeof(buf));
FATAL_ERROR_IF(len == 0 || len > sizeof(buf), "Failed to get APPDATA");
path_user = std::string(buf) + DIR_DELIM + PROJECT_NAME_C;
// TODO: Luanti with migration
path_user = std::string(buf) + DIR_DELIM + "Minetest";
} else {
path_user = std::string(buf);
}
@ -529,8 +530,9 @@ bool setSystemPaths()
if (minetest_user_path && minetest_user_path[0] != '\0') {
path_user = std::string(minetest_user_path);
} else {
// TODO: luanti with migration
path_user = std::string(getHomeOrFail()) + DIR_DELIM "."
+ PROJECT_NAME;
+ "minetest";
}
return true;
@ -557,9 +559,10 @@ bool setSystemPaths()
if (minetest_user_path && minetest_user_path[0] != '\0') {
path_user = std::string(minetest_user_path);
} else {
// TODO: luanti with migration
path_user = std::string(getHomeOrFail())
+ "/Library/Application Support/"
+ PROJECT_NAME;
+ "minetest";
}
return true;
}
@ -574,8 +577,9 @@ bool setSystemPaths()
if (minetest_user_path && minetest_user_path[0] != '\0') {
path_user = std::string(minetest_user_path);
} else {
// TODO: luanti with migration
path_user = std::string(getHomeOrFail()) + DIR_DELIM "."
+ lowercase(PROJECT_NAME);
+ "minetest";
}
return true;
}
@ -681,11 +685,13 @@ void initializePaths()
const char *cache_dir = getenv("XDG_CACHE_HOME");
const char *home_dir = getenv("HOME");
if (cache_dir && cache_dir[0] != '\0') {
path_cache = std::string(cache_dir) + DIR_DELIM + PROJECT_NAME;
// TODO: luanti with migration
path_cache = std::string(cache_dir) + DIR_DELIM + "minetest";
} else if (home_dir) {
// Then try $HOME/.cache/PROJECT_NAME
// TODO: luanti with migration
path_cache = std::string(home_dir) + DIR_DELIM + ".cache"
+ DIR_DELIM + PROJECT_NAME;
+ DIR_DELIM + "minetest";
} else {
// If neither works, use $PATH_USER/cache
path_cache = path_user + DIR_DELIM + "cache";

View file

@ -90,7 +90,7 @@ void osSpecificInit()
#ifdef GPROF
// in the start-up code
warningstream << "Initializing GPROF profiler" << std::endl;
monstartup("libMinetest.so");
monstartup("libluanti.so");
#endif
}

View file

@ -586,12 +586,12 @@ void Server::start()
// ASCII art for the win!
const char *art[] = {
" __. __. __. ",
" _____ |__| ____ _____ / |_ _____ _____ / |_ ",
" / \\| |/ \\ / __ \\ _\\/ __ \\/ __> _\\",
"| Y Y \\ | | \\ ___/| | | ___/\\___ \\| | ",
"|__|_| / |___| /\\______> | \\______>_____/| | ",
" \\/ \\/ \\/ \\/ \\/ "
R"(.__ __ .__ )",
R"(| | __ _______ _____/ |_|__|)",
R"(| | | | \__ \ / \ __\ |)",
R"(| |_| | // __ \| | \ | | |)",
R"(|____/____/(____ /___| /__| |__|)",
R"( \/ \/ )",
};
if (!m_admin_chat) {