#include "irrlichttypes_bloated.h"
#include "irrlicht.h"
#include "irrlicht_changes/printing.h"
#include "benchmark/benchmark.h"
#include "chat_interface.h"
#include "debug.h"
#include "unittest/test.h"
#include "server.h"
#include "filesys.h"
#include "version.h"
#include "defaultsettings.h"
#include "migratesettings.h"
#include "gettext.h"
#include "log.h"
#include "log_internal.h"
#include "util/quicktune.h"
#include "httpfetch.h"
#include "gameparams.h"
#include "database/database.h"
#include "config.h"
#include "player.h"
#include "porting.h"
#include "serialization.h"
#include "network/socket.h"
#include "mapblock.h"
#include <lua.h>
Macros | |
#define | CONFIGFILE "minetest.conf" |
#define | DEBUGFILE "debug.txt" |
#define | DEFAULT_SERVER_PORT 30000 |
#define | ENV_NO_COLOR "NO_COLOR" |
#define | ENV_CLICOLOR "CLICOLOR" |
#define | ENV_CLICOLOR_FORCE "CLICOLOR_FORCE" |
#define | SERVER_ONLY "" |
#define | LOCAL_GAME "" |
Typedefs | |
typedef std::map< std::string, ValueSpec > | OptionList |
Functions | |
static void | get_env_opts (Settings &args) |
static bool | get_cmdline_opts (int argc, char *argv[], Settings *cmd_args) |
static void | set_allowed_options (OptionList *allowed_options) |
static void | print_help (const OptionList &allowed_options) |
static void | print_allowed_options (const OptionList &allowed_options) |
static void | print_version (std::ostream &os) |
static void | print_worldspecs (const std::vector< WorldSpec > &worldspecs, std::ostream &os, bool print_name=true, bool print_path=true) |
static void | print_modified_quicktune_values () |
static void | list_game_ids () |
static void | list_worlds (bool print_name, bool print_path) |
static bool | setup_log_params (const Settings &cmd_args) |
static bool | create_userdata_path () |
static bool | use_debugger (int argc, char *argv[]) |
static bool | init_common (const Settings &cmd_args, int argc, char *argv[]) |
static void | uninit_common () |
static void | startup_message () |
static bool | read_config_file (const Settings &cmd_args) |
static void | init_log_streams (const Settings &cmd_args) |
static bool | game_configure (GameParams *game_params, const Settings &cmd_args) |
static void | game_configure_port (GameParams *game_params, const Settings &cmd_args) |
static bool | game_configure_world (GameParams *game_params, const Settings &cmd_args) |
static bool | get_world_from_cmdline (GameParams *game_params, const Settings &cmd_args) |
static bool | get_world_from_config (GameParams *game_params, const Settings &cmd_args) |
static bool | auto_select_world (GameParams *game_params) |
static std::string | get_clean_world_path (const std::string &path) |
static bool | game_configure_subgame (GameParams *game_params, const Settings &cmd_args) |
static bool | get_game_from_cmdline (GameParams *game_params, const Settings &cmd_args) |
static bool | determine_subgame (GameParams *game_params) |
static bool | run_dedicated_server (const GameParams &game_params, const Settings &cmd_args) |
static bool | migrate_map_database (const GameParams &game_params, const Settings &cmd_args) |
static bool | recompress_map_database (const GameParams &game_params, const Settings &cmd_args) |
int | main (int argc, char *argv[]) |
Variables | |
static FileLogOutput | file_log_output |
static OptionList | allowed_options |
#define CONFIGFILE "minetest.conf" |
Referenced by read_config_file().
#define DEBUGFILE "debug.txt" |
Referenced by init_log_streams().
#define DEFAULT_SERVER_PORT 30000 |
Referenced by game_configure_port().
#define ENV_CLICOLOR "CLICOLOR" |
Referenced by get_env_opts().
#define ENV_CLICOLOR_FORCE "CLICOLOR_FORCE" |
Referenced by get_env_opts().
#define ENV_NO_COLOR "NO_COLOR" |
Referenced by get_env_opts().
#define LOCAL_GAME "" |
Referenced by set_allowed_options().
#define SERVER_ONLY "" |
Referenced by set_allowed_options().
typedef std::map<std::string, ValueSpec> OptionList |
|
static |
References DIR_DELIM, dstream, getAvailableWorlds(), infostream, GameParams::is_dedicated_server, porting::path_user, print_worldspecs(), rawstream, and GameParams::world_path.
Referenced by game_configure_world().
|
static |
References fs::CreateAllDirs(), fs::CreateDir(), porting::path_user, and fs::PathExists().
Referenced by main().
|
static |
References errorstream, findWorldSubgame(), g_settings, GameParams::game_spec, Settings::get(), getWorldExists(), getWorldGameId(), SubgameSpec::id, infostream, GameParams::is_dedicated_server, SubgameSpec::isValid(), warningstream, and GameParams::world_path.
Referenced by game_configure_subgame().
|
static |
References errorstream, game_configure_port(), game_configure_subgame(), and game_configure_world().
Referenced by main().
|
static |
References DEFAULT_SERVER_PORT, Settings::exists(), g_settings, Settings::getU16(), GameParams::is_dedicated_server, and GameParams::socket_port.
Referenced by game_configure().
|
static |
References determine_subgame(), and get_game_from_cmdline().
Referenced by game_configure().
|
static |
References auto_select_world(), get_world_from_cmdline(), and get_world_from_config().
Referenced by game_configure().
|
static |
Referenced by get_world_from_cmdline(), and get_world_from_config().
|
static |
References allowed_options, Settings::parseCommandLine(), and set_allowed_options().
Referenced by main().
|
static |
References ENV_CLICOLOR, ENV_CLICOLOR_FORCE, ENV_NO_COLOR, and Settings::set().
Referenced by main().
|
static |
References _, dstream, errorstream, Settings::exists(), findSubgame(), GameParams::game_spec, Settings::get(), and SubgameSpec::isValid().
Referenced by game_configure_subgame().
|
static |
References dstream, Settings::exists(), Settings::get(), get_clean_world_path(), getAvailableWorlds(), print_worldspecs(), and GameParams::world_path.
Referenced by game_configure_world().
|
static |
References Settings::exists(), g_settings, Settings::get(), get_clean_world_path(), and GameParams::world_path.
Referenced by game_configure_world().
|
static |
References Settings::createLayer(), g_settings, Settings::get(), Settings::getS32(), porting::getTimeUs(), httpfetch_init(), init_gettext(), init_log_streams(), migrate_settings(), mysrand(), porting::path_locale, read_config_file(), set_default_settings(), SL_GLOBAL, sockets_init(), startup_message(), and uninit_common().
Referenced by main().
|
static |
References Logger::addOutputMaxLevel(), ARRLEN, DEBUGFILE, DIR_DELIM, Settings::exists(), file_log_output, g_logger, g_settings, Settings::get(), Settings::getU64(), infostream, LL_MAX, porting::path_user, Logger::removeOutput(), FileLogOutput::setFile(), Logger::stringToLevel(), and warningstream.
Referenced by init_common().
|
static |
References getAvailableGameIds(), and rawstream.
Referenced by main().
|
static |
References _, getAvailableWorlds(), and print_worldspecs().
Referenced by main().
int main | ( | int | argc, |
char * | argv[] ) |
References Logger::addOutputMaxLevel(), allowed_options, porting::attachOrCreateConsole(), BEGIN_DEBUG_EXCEPTION_HANDLER, create_userdata_path(), debug_set_exception_handler(), END_DEBUG_EXCEPTION_HANDLER, errorstream, Settings::exists(), g_logger, g_settings, g_settings_path, game_configure(), Settings::get(), get_cmdline_opts(), get_env_opts(), Settings::getBool(), fs::GetFilenameFromPath(), Settings::getFlag(), init_common(), porting::initializePaths(), GameParams::is_dedicated_server, list_game_ids(), list_worlds(), LL_ACTION, lowercase(), porting::osSpecificInit(), print_help(), print_modified_quicktune_values(), print_version(), Logger::registerThread(), ClientLauncher::run(), run_benchmarks(), run_dedicated_server(), run_tests(), sanity_check, setup_log_params(), porting::signal_handler_init(), stderr_output, str_starts_with(), Settings::updateConfigFile(), use_debugger(), warningstream, and GameParams::world_path.
Referenced by SDL_Main().
|
static |
References actionstream, ServerMap::createDatabase(), DIR_DELIM, errorstream, Settings::exists(), Settings::get(), porting::getTimeS(), MapDatabase::listAllLoadableBlocks(), MapDatabase::loadBlock(), Settings::readConfigFile(), Settings::set(), porting::signal_handler_killstatus(), Settings::updateConfigFile(), and GameParams::world_path.
Referenced by run_dedicated_server().
|
static |
References _, allowed_options, padStringRight(), and VALUETYPE_FLAG.
Referenced by print_help().
|
static |
References _, allowed_options, and print_allowed_options().
Referenced by main().
|
static |
References dstream, getQuicktuneNames(), getQuicktuneValue(), QuicktuneValue::getString(), and QuicktuneValue::modified.
Referenced by main().
|
static |
References g_build_info, g_version_hash, porting::get_sysinfo(), and porting::getPlatformName().
Referenced by main(), and startup_message().
|
static |
Referenced by auto_select_world(), get_world_from_cmdline(), and list_worlds().
|
static |
References CONFIGFILE, DIR_DELIM, errorstream, Settings::exists(), g_settings, g_settings_path, Settings::get(), infostream, porting::path_user, Settings::readConfigFile(), and sanity_check.
Referenced by init_common().
|
static |
References actionstream, Database::beginSave(), ServerMap::createDatabase(), ServerMap::deSerializeBlock(), DIR_DELIM, Database::endSave(), errorstream, GameParams::game_spec, Settings::get(), porting::getTimeS(), MapDatabase::listAllLoadableBlocks(), MapDatabase::loadBlock(), Settings::readConfigFile(), MapDatabase::saveBlock(), SER_FMT_VER_HIGHEST_WRITE, MapBlock::serialize(), porting::signal_handler_killstatus(), GameParams::world_path, and writeU8().
Referenced by run_dedicated_server().
|
static |
References _, TerminalChatConsole::clearKillStatus(), dedicated_server_loop(), errorstream, Settings::exists(), g_settings, g_term_console, GameParams::game_spec, Settings::get(), Settings::getBool(), Settings::getFlag(), SubgameSpec::id, is_valid_player_name(), Address::isIPv6(), migrate_map_database(), ServerEnvironment::migrateAuthDatabase(), Server::migrateModStorageDatabase(), ServerEnvironment::migratePlayersDatabase(), PLAYERNAME_ALLOWED_CHARS_USER_EXPL, recompress_map_database(), Address::Resolve(), Address::serializeString(), Address::setAddress(), TerminalChatConsole::setup(), porting::signal_handler_killstatus(), GameParams::socket_port, Thread::start(), Thread::stop(), TerminalChatConsole::stopAndWaitforThread(), verbosestream, Thread::wait(), warningstream, BaseException::what(), and GameParams::world_path.
Referenced by main().
|
static |
References _, allowed_options, LOCAL_GAME, SERVER_ONLY, VALUETYPE_FLAG, and VALUETYPE_STRING.
Referenced by get_cmdline_opts().
|
static |
References _, Logger::addOutput(), Logger::addOutputMaxLevel(), Logger::color_mode, dstream, errorstream, Settings::exists(), g_logger, Settings::get(), Settings::getFlag(), LL_ERROR, LL_INFO, LL_TRACE, LL_VERBOSE, LOG_COLOR_ALWAYS, LOG_COLOR_AUTO, LOG_COLOR_NEVER, Logger::removeOutput(), and stderr_output.
Referenced by main().
|
static |
References infostream, LATEST_PROTOCOL_VERSION, print_version(), SER_FMT_VER_HIGHEST_READ, and TOSTRING.
Referenced by init_common().
|
static |
References Settings::getLayer(), httpfetch_cleanup(), SL_TOTAL_COUNT, and sockets_cleanup().
Referenced by init_common().
|
static |
References ARRLEN, porting::getCurrentExecPath(), and warningstream.
Referenced by main().
|
static |
Referenced by get_cmdline_opts(), main(), Settings::parseCommandLine(), print_allowed_options(), print_help(), and set_allowed_options().
|
static |
Referenced by init_log_streams().