1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Clean up and tweak build system

* Combine client and server man pages.
  * Update unit test options and available databases in man page.
  * Add `--worldname` to man page.
  * Fix a bunch of places where `"Minetest"` was used directly instead of `PROJECT_NAME`.
  * Disable server build by default on all operating systems.
  * Make `ENABLE_FREETYPE` not fail if FreeType isn't found.
  * Enable LevelDB, Redis, and FreeType detection by default.
  * Remove the `VERSION_PATCH_ORIG` hack.
  * Add option to search for and use system JSONCPP.
  * Remove broken LuaJIT version detection.
  * Rename `DISABLE_LUAJIT` to `ENABLE_LUAJIT`.
  * Rename `minetest_*` variables in `version.{h,cpp}` to `g_*`.
  * Clean up style of CMake files.
This commit is contained in:
ShadowNinja 2015-02-27 18:05:29 -05:00
parent 284fefb0c3
commit 93fcab952b
50 changed files with 749 additions and 1068 deletions

View file

@ -1134,8 +1134,8 @@ static void show_pause_menu(GUIFormSpecMenu **cur_formspec,
os << "button_exit[4," << (ypos++) << ";3,0.5;btn_exit_os;"
<< wide_to_narrow(wstrgettext("Exit to OS")) << "]"
<< "textarea[7.5,0.25;3.9,6.25;;" << control_text << ";]"
<< "textarea[0.4,0.25;3.5,6;;" << "Minetest\n"
<< minetest_build_info << "\n"
<< "textarea[0.4,0.25;3.5,6;;" << PROJECT_NAME "\n"
<< g_build_info << "\n"
<< "path_user = " << wrap_rows(porting::path_user, 20)
<< "\n;]";
@ -2033,9 +2033,10 @@ bool Game::createClient(const std::string &playername,
/* Set window caption
*/
core::stringw str = L"Minetest [";
std::wstring str = narrow_to_wide(PROJECT_NAME);
str += L" [";
str += driver->getName();
str += "]";
str += L"]";
device->setWindowCaption(str.c_str());
LocalPlayer *player = client->getEnv().getLocalPlayer();
@ -2057,7 +2058,7 @@ bool Game::initGui(std::wstring *error_message)
{
// First line of debug text
guitext = guienv->addStaticText(
L"Minetest",
narrow_to_wide(PROJECT_NAME).c_str(),
core::rect<s32>(0, 0, 0, 0),
false, false, guiroot);
@ -3994,7 +3995,7 @@ void Game::updateGui(float *statustext_time, const RunStats &stats,
std::ostringstream os(std::ios_base::binary);
os << std::fixed
<< "Minetest " << minetest_version_hash
<< PROJECT_NAME " " << g_version_hash
<< " FPS = " << fps
<< " (R: range_all=" << draw_control->range_all << ")"
<< std::setprecision(0)
@ -4010,7 +4011,7 @@ void Game::updateGui(float *statustext_time, const RunStats &stats,
guitext->setVisible(true);
} else if (flags.show_hud || flags.show_chat) {
std::ostringstream os(std::ios_base::binary);
os << "Minetest " << minetest_version_hash;
os << PROJECT_NAME " " << g_version_hash;
guitext->setText(narrow_to_wide(os.str()).c_str());
guitext->setVisible(true);
} else {
@ -4245,7 +4246,7 @@ void the_game(bool *kill,
} catch (SerializationError &e) {
error_message = L"A serialization error occurred:\n"
+ narrow_to_wide(e.what()) + L"\n\nThe server is probably "
L" running a different version of Minetest.";
L" running a different version of " PROJECT_NAME ".";
errorstream << wide_to_narrow(error_message) << std::endl;
} catch (ServerError &e) {
error_message = narrow_to_wide(e.what());