mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +00:00
CMake stuff works now on linux and windows... and should be possible to make to work on OS X.
This commit is contained in:
parent
426c206d7e
commit
9fbb0889a7
9 changed files with 367 additions and 102 deletions
|
@ -25,12 +25,13 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
|
||||
#ifndef SERVER
|
||||
#ifdef _WIN32
|
||||
#pragma error ("For a server build, SERVER must be defined globally")
|
||||
#else
|
||||
#error "For a server build, SERVER must be defined globally"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef UNITTEST_DISABLE
|
||||
#ifdef NDEBUG
|
||||
#ifdef _WIN32
|
||||
#pragma message ("Disabling unit tests")
|
||||
#else
|
||||
|
@ -66,6 +67,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
#include "strfnd.h"
|
||||
#include "porting.h"
|
||||
#include "materials.h"
|
||||
#include "config.h"
|
||||
|
||||
/*
|
||||
Settings.
|
||||
|
@ -129,6 +131,12 @@ int main(int argc, char *argv[])
|
|||
|
||||
BEGIN_DEBUG_EXCEPTION_HANDLER
|
||||
|
||||
// Print startup message
|
||||
dstream<<DTIME<<"minetest-c55"
|
||||
" with SER_FMT_VER_HIGHEST="<<(int)SER_FMT_VER_HIGHEST
|
||||
<<", "<<BUILD_INFO
|
||||
<<std::endl;
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
|
@ -185,12 +193,6 @@ int main(int argc, char *argv[])
|
|||
// Initialize default settings
|
||||
set_default_settings();
|
||||
|
||||
// Print startup message
|
||||
dstream<<DTIME<<"minetest-c55 server"
|
||||
" with SER_FMT_VER_HIGHEST="<<(int)SER_FMT_VER_HIGHEST
|
||||
<<", ENABLE_TESTS="<<ENABLE_TESTS
|
||||
<<std::endl;
|
||||
|
||||
// Set locale. This is for forcing '.' as the decimal point.
|
||||
std::locale::global(std::locale("C"));
|
||||
// This enables printing all characters in bitmap font
|
||||
|
@ -226,6 +228,9 @@ int main(int argc, char *argv[])
|
|||
{
|
||||
core::array<std::string> filenames;
|
||||
filenames.push_back(porting::path_userdata + "/minetest.conf");
|
||||
#ifdef RUN_IN_PLACE
|
||||
filenames.push_back(porting::path_userdata + "/../minetest.conf");
|
||||
#endif
|
||||
|
||||
for(u32 i=0; i<filenames.size(); i++)
|
||||
{
|
||||
|
@ -308,6 +313,8 @@ int main(int argc, char *argv[])
|
|||
std::string map_dir = porting::path_userdata+"/map";
|
||||
if(cmd_args.exists("map-dir"))
|
||||
map_dir = cmd_args.get("map-dir");
|
||||
else if(g_settings.exists("map-dir"))
|
||||
map_dir = g_settings.get("map-dir");
|
||||
|
||||
Server server(map_dir.c_str(), hm_params, map_params);
|
||||
server.start(port);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue