From 93fcab952b28f4db39d9326b83f14cbd86c0cf17 Mon Sep 17 00:00:00 2001 From: ShadowNinja Date: Fri, 27 Feb 2015 18:05:29 -0500 Subject: 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. --- src/game.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'src/game.cpp') diff --git a/src/game.cpp b/src/game.cpp index df0895ae1..8a9f3e1ea 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -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(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()); -- cgit v1.2.3