forked from Mirrorlandia_minetest/minetest
Revert the upper-case PROJECT_NAME nonsense that was part of #2402
This commit is contained in:
parent
558d715bf6
commit
4ea5a96fff
@ -6,8 +6,8 @@ if(${CMAKE_VERSION} STREQUAL "2.8.2")
|
||||
endif()
|
||||
|
||||
# This can be read from ${PROJECT_NAME} after project() is called
|
||||
project(Minetest)
|
||||
string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER)
|
||||
project(minetest)
|
||||
set(PROJECT_NAME_CAPITALIZED "Minetest")
|
||||
|
||||
|
||||
# Also remember to set PROTOCOL_VERSION in network/networkprotocol.h when releasing
|
||||
@ -65,11 +65,11 @@ if(WIN32)
|
||||
set(EXAMPLE_CONF_DIR ".")
|
||||
set(LOCALEDIR "locale")
|
||||
elseif(APPLE)
|
||||
set(BUNDLE_NAME ${PROJECT_NAME_LOWER}.app)
|
||||
set(BUNDLE_NAME ${PROJECT_NAME}.app)
|
||||
set(BUNDLE_PATH "${BUNDLE_NAME}")
|
||||
set(BINDIR ${BUNDLE_NAME}/Contents/MacOS)
|
||||
set(SHAREDIR ${BUNDLE_NAME}/Contents/Resources)
|
||||
set(DOCDIR "${SHAREDIR}/${PROJECT_NAME_LOWER}")
|
||||
set(DOCDIR "${SHAREDIR}/${PROJECT_NAME}")
|
||||
set(EXAMPLE_CONF_DIR ${DOCDIR})
|
||||
set(LOCALEDIR "${SHAREDIR}/locale")
|
||||
elseif(UNIX) # Linux, BSD etc
|
||||
@ -84,15 +84,15 @@ elseif(UNIX) # Linux, BSD etc
|
||||
set(ICONDIR "unix/icons")
|
||||
set(LOCALEDIR "locale")
|
||||
else()
|
||||
set(SHAREDIR "${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME_LOWER}")
|
||||
set(SHAREDIR "${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME}")
|
||||
set(BINDIR "${CMAKE_INSTALL_PREFIX}/bin")
|
||||
set(DOCDIR "${CMAKE_INSTALL_PREFIX}/share/doc/${PROJECT_NAME_LOWER}")
|
||||
set(DOCDIR "${CMAKE_INSTALL_PREFIX}/share/doc/${PROJECT_NAME}")
|
||||
set(MANDIR "${CMAKE_INSTALL_PREFIX}/share/man")
|
||||
set(EXAMPLE_CONF_DIR ${DOCDIR})
|
||||
set(XDG_APPS_DIR "${CMAKE_INSTALL_PREFIX}/share/applications")
|
||||
set(APPDATADIR "${CMAKE_INSTALL_PREFIX}/share/appdata")
|
||||
set(ICONDIR "${CMAKE_INSTALL_PREFIX}/share/icons")
|
||||
set(LOCALEDIR "${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME_LOWER}/locale")
|
||||
set(LOCALEDIR "${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME}/locale")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
@ -37,15 +37,15 @@ BEGIN
|
||||
BLOCK "040904b0"
|
||||
BEGIN
|
||||
VALUE "Comments", ""
|
||||
VALUE "CompanyName", PROJECT_NAME " community"
|
||||
VALUE "FileDescription", PROJECT_NAME " engine main executable"
|
||||
VALUE "CompanyName", PROJECT_NAME_C " community"
|
||||
VALUE "FileDescription", PROJECT_NAME_C " engine"
|
||||
VALUE "FileVersion", VERSION_STRING
|
||||
VALUE "InternalName", PROJECT_NAME
|
||||
VALUE "LegalCopyright", "(c) 2014 celeron55"
|
||||
VALUE "LegalCopyright", "(c) 2011-2015 celeron55"
|
||||
VALUE "LegalTrademarks", """Minetest"" is the property of the Minetest community, don't use it without permission!"
|
||||
VALUE "OriginalFilename", "minetest.exe"
|
||||
VALUE "PrivateBuild", VERSION_EXTRA
|
||||
VALUE "ProductName", PROJECT_NAME
|
||||
VALUE "ProductName", PROJECT_NAME_C
|
||||
VALUE "ProductVersion", PRODUCT_VERSION_STRING
|
||||
VALUE "SpecialBuild", BUILDMODE
|
||||
END
|
||||
|
@ -1,7 +1,6 @@
|
||||
cmake_minimum_required(VERSION 2.6)
|
||||
|
||||
project(Minetest)
|
||||
string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER)
|
||||
project(minetest)
|
||||
|
||||
INCLUDE(CheckIncludeFiles)
|
||||
|
||||
@ -465,10 +464,10 @@ set(EXECUTABLE_OUTPUT_PATH "${CMAKE_SOURCE_DIR}/bin")
|
||||
|
||||
|
||||
if(BUILD_CLIENT)
|
||||
add_executable(${PROJECT_NAME_LOWER} ${client_SRCS})
|
||||
add_dependencies(${PROJECT_NAME_LOWER} GenerateVersion)
|
||||
add_executable(${PROJECT_NAME} ${client_SRCS})
|
||||
add_dependencies(${PROJECT_NAME} GenerateVersion)
|
||||
set(client_LIBS
|
||||
${PROJECT_NAME_LOWER}
|
||||
${PROJECT_NAME}
|
||||
${ZLIB_LIBRARIES}
|
||||
${IRRLICHT_LIBRARY}
|
||||
${OPENGL_LIBRARIES}
|
||||
@ -497,37 +496,37 @@ if(BUILD_CLIENT)
|
||||
endif()
|
||||
if(USE_CURL)
|
||||
target_link_libraries(
|
||||
${PROJECT_NAME_LOWER}
|
||||
${PROJECT_NAME}
|
||||
${CURL_LIBRARY}
|
||||
)
|
||||
endif()
|
||||
if(USE_FREETYPE)
|
||||
if(FREETYPE_PKGCONFIG_FOUND)
|
||||
set_target_properties(${PROJECT_NAME_LOWER}
|
||||
set_target_properties(${PROJECT_NAME}
|
||||
PROPERTIES
|
||||
COMPILE_FLAGS "${FREETYPE_CFLAGS_STR}"
|
||||
)
|
||||
endif()
|
||||
target_link_libraries(
|
||||
${PROJECT_NAME_LOWER}
|
||||
${PROJECT_NAME}
|
||||
${FREETYPE_LIBRARY}
|
||||
${CGUITTFONT_LIBRARY}
|
||||
)
|
||||
endif()
|
||||
if (USE_LEVELDB)
|
||||
target_link_libraries(${PROJECT_NAME_LOWER} ${LEVELDB_LIBRARY})
|
||||
target_link_libraries(${PROJECT_NAME} ${LEVELDB_LIBRARY})
|
||||
endif()
|
||||
if (USE_REDIS)
|
||||
target_link_libraries(${PROJECT_NAME_LOWER} ${REDIS_LIBRARY})
|
||||
target_link_libraries(${PROJECT_NAME} ${REDIS_LIBRARY})
|
||||
endif()
|
||||
endif(BUILD_CLIENT)
|
||||
|
||||
|
||||
if(BUILD_SERVER)
|
||||
add_executable(${PROJECT_NAME_LOWER}server ${server_SRCS})
|
||||
add_dependencies(${PROJECT_NAME_LOWER}server GenerateVersion)
|
||||
add_executable(${PROJECT_NAME}server ${server_SRCS})
|
||||
add_dependencies(${PROJECT_NAME}server GenerateVersion)
|
||||
target_link_libraries(
|
||||
${PROJECT_NAME_LOWER}server
|
||||
${PROJECT_NAME}server
|
||||
${ZLIB_LIBRARIES}
|
||||
${SQLITE3_LIBRARY}
|
||||
${JSON_LIBRARY}
|
||||
@ -535,17 +534,17 @@ if(BUILD_SERVER)
|
||||
${LUA_LIBRARY}
|
||||
${PLATFORM_LIBS}
|
||||
)
|
||||
set_target_properties(${PROJECT_NAME_LOWER}server PROPERTIES
|
||||
set_target_properties(${PROJECT_NAME}server PROPERTIES
|
||||
COMPILE_DEFINITIONS "SERVER")
|
||||
if (USE_LEVELDB)
|
||||
target_link_libraries(${PROJECT_NAME_LOWER}server ${LEVELDB_LIBRARY})
|
||||
target_link_libraries(${PROJECT_NAME}server ${LEVELDB_LIBRARY})
|
||||
endif()
|
||||
if (USE_REDIS)
|
||||
target_link_libraries(${PROJECT_NAME_LOWER}server ${REDIS_LIBRARY})
|
||||
target_link_libraries(${PROJECT_NAME}server ${REDIS_LIBRARY})
|
||||
endif()
|
||||
if(USE_CURL)
|
||||
target_link_libraries(
|
||||
${PROJECT_NAME_LOWER}server
|
||||
${PROJECT_NAME}server
|
||||
${CURL_LIBRARY}
|
||||
)
|
||||
endif()
|
||||
@ -646,7 +645,7 @@ if(WIN32)
|
||||
endif()
|
||||
|
||||
if(BUILD_CLIENT)
|
||||
install(TARGETS ${PROJECT_NAME_LOWER}
|
||||
install(TARGETS ${PROJECT_NAME}
|
||||
RUNTIME DESTINATION ${BINDIR}
|
||||
LIBRARY DESTINATION ${BINDIR}
|
||||
ARCHIVE DESTINATION ${BINDIR}
|
||||
@ -664,7 +663,7 @@ if(BUILD_CLIENT)
|
||||
if(USE_GETTEXT)
|
||||
foreach(LOCALE ${GETTEXT_AVAILABLE_LOCALES})
|
||||
set_mo_paths(MO_BUILD_PATH MO_DEST_PATH ${LOCALE})
|
||||
set(MO_BUILD_PATH "${MO_BUILD_PATH}/${PROJECT_NAME_LOWER}.mo")
|
||||
set(MO_BUILD_PATH "${MO_BUILD_PATH}/${PROJECT_NAME}.mo")
|
||||
install(FILES ${MO_BUILD_PATH} DESTINATION ${MO_DEST_PATH})
|
||||
endforeach()
|
||||
endif()
|
||||
@ -685,16 +684,16 @@ if(BUILD_CLIENT)
|
||||
endif(BUILD_CLIENT)
|
||||
|
||||
if(BUILD_SERVER)
|
||||
install(TARGETS ${PROJECT_NAME_LOWER}server DESTINATION ${BINDIR})
|
||||
install(TARGETS ${PROJECT_NAME}server DESTINATION ${BINDIR})
|
||||
endif()
|
||||
|
||||
if (USE_GETTEXT)
|
||||
set(MO_FILES)
|
||||
|
||||
foreach(LOCALE ${GETTEXT_AVAILABLE_LOCALES})
|
||||
set(PO_FILE_PATH "${GETTEXT_PO_PATH}/${LOCALE}/${PROJECT_NAME_LOWER}.po")
|
||||
set(PO_FILE_PATH "${GETTEXT_PO_PATH}/${LOCALE}/${PROJECT_NAME}.po")
|
||||
set_mo_paths(MO_BUILD_PATH MO_DEST_PATH ${LOCALE})
|
||||
set(MO_FILE_PATH "${MO_BUILD_PATH}/${PROJECT_NAME_LOWER}.mo")
|
||||
set(MO_FILE_PATH "${MO_BUILD_PATH}/${PROJECT_NAME}.mo")
|
||||
|
||||
add_custom_command(OUTPUT ${MO_BUILD_PATH}
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${MO_BUILD_PATH}
|
||||
|
@ -110,7 +110,7 @@ bool ClientLauncher::run(GameParams &game_params, const Settings &cmd_args)
|
||||
return false;
|
||||
}
|
||||
|
||||
porting::setXorgClassHint(video_driver->getExposedVideoData(), PROJECT_NAME);
|
||||
porting::setXorgClassHint(video_driver->getExposedVideoData(), PROJECT_NAME_C);
|
||||
|
||||
/*
|
||||
This changes the minimum allowed number of vertices in a VBO.
|
||||
@ -183,7 +183,7 @@ bool ClientLauncher::run(GameParams &game_params, const Settings &cmd_args)
|
||||
{
|
||||
// Set the window caption
|
||||
const wchar_t *text = wgettext("Main Menu");
|
||||
device->setWindowCaption((narrow_to_wide(PROJECT_NAME) + L" [" + text + L"]").c_str());
|
||||
device->setWindowCaption((narrow_to_wide(PROJECT_NAME_C) + L" [" + text + L"]").c_str());
|
||||
delete[] text;
|
||||
|
||||
try { // This is used for catching disconnects
|
||||
|
@ -4,6 +4,7 @@
|
||||
#define CMAKE_CONFIG_H
|
||||
|
||||
#define PROJECT_NAME "@PROJECT_NAME@"
|
||||
#define PROJECT_NAME_C "@PROJECT_NAME_CAPITALIZED@"
|
||||
#define VERSION_MAJOR @VERSION_MAJOR@
|
||||
#define VERSION_MINOR @VERSION_MINOR@
|
||||
#define VERSION_PATCH @VERSION_PATCH@
|
||||
|
@ -13,7 +13,8 @@
|
||||
#if defined USE_CMAKE_CONFIG_H
|
||||
#include "cmake_config.h"
|
||||
#elif defined (__ANDROID__) || defined (ANDROID)
|
||||
#define PROJECT_NAME "Minetest"
|
||||
#define PROJECT_NAME "minetest"
|
||||
#define PROJECT_NAME_C "Minetest"
|
||||
#define STATIC_SHAREDIR ""
|
||||
#include "android_version.h"
|
||||
#ifdef NDEBUG
|
||||
|
@ -322,7 +322,7 @@ void set_default_settings(Settings *settings)
|
||||
settings->setDefault("enable_particles", "false");
|
||||
settings->setDefault("video_driver", "ogles1");
|
||||
settings->setDefault("touchtarget", "true");
|
||||
settings->setDefault("TMPFolder","/sdcard/" PROJECT_NAME "/tmp/");
|
||||
settings->setDefault("TMPFolder","/sdcard/" PROJECT_NAME_C "/tmp/");
|
||||
settings->setDefault("touchscreen_threshold","20");
|
||||
settings->setDefault("smooth_lighting", "false");
|
||||
settings->setDefault("max_simultaneous_block_sends_per_client", "3");
|
||||
|
@ -522,7 +522,7 @@ void *EmergeThread::Thread()
|
||||
<< "----" << std::endl
|
||||
<< "\"" << e.what() << "\"" << std::endl
|
||||
<< "See debug.txt." << std::endl
|
||||
<< "World probably saved by a newer version of " PROJECT_NAME "."
|
||||
<< "World probably saved by a newer version of " PROJECT_NAME_C "."
|
||||
<< std::endl;
|
||||
m_server->setAsyncFatalError(err.str());
|
||||
}
|
||||
|
12
src/game.cpp
12
src/game.cpp
@ -1134,7 +1134,7 @@ 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;;" << PROJECT_NAME "\n"
|
||||
<< "textarea[0.4,0.25;3.5,6;;" << PROJECT_NAME_C "\n"
|
||||
<< g_build_info << "\n"
|
||||
<< "path_user = " << wrap_rows(porting::path_user, 20)
|
||||
<< "\n;]";
|
||||
@ -2029,7 +2029,7 @@ bool Game::createClient(const std::string &playername,
|
||||
|
||||
/* Set window caption
|
||||
*/
|
||||
std::wstring str = narrow_to_wide(PROJECT_NAME);
|
||||
std::wstring str = narrow_to_wide(PROJECT_NAME_C);
|
||||
str += L" [";
|
||||
str += driver->getName();
|
||||
str += L"]";
|
||||
@ -2054,7 +2054,7 @@ bool Game::initGui()
|
||||
{
|
||||
// First line of debug text
|
||||
guitext = guienv->addStaticText(
|
||||
narrow_to_wide(PROJECT_NAME).c_str(),
|
||||
narrow_to_wide(PROJECT_NAME_C).c_str(),
|
||||
core::rect<s32>(0, 0, 0, 0),
|
||||
false, false, guiroot);
|
||||
|
||||
@ -4018,7 +4018,7 @@ void Game::updateGui(float *statustext_time, const RunStats &stats,
|
||||
|
||||
std::ostringstream os(std::ios_base::binary);
|
||||
os << std::fixed
|
||||
<< PROJECT_NAME " " << g_version_hash
|
||||
<< PROJECT_NAME_C " " << g_version_hash
|
||||
<< " FPS = " << fps
|
||||
<< " (R: range_all=" << draw_control->range_all << ")"
|
||||
<< std::setprecision(0)
|
||||
@ -4034,7 +4034,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 << PROJECT_NAME " " << g_version_hash;
|
||||
os << PROJECT_NAME_C " " << g_version_hash;
|
||||
guitext->setText(narrow_to_wide(os.str()).c_str());
|
||||
guitext->setVisible(true);
|
||||
} else {
|
||||
@ -4267,7 +4267,7 @@ void the_game(bool *kill,
|
||||
} catch (SerializationError &e) {
|
||||
error_message = std::string("A serialization error occurred:\n")
|
||||
+ e.what() + "\n\nThe server is probably "
|
||||
" running a different version of " PROJECT_NAME ".";
|
||||
" running a different version of " PROJECT_NAME_C ".";
|
||||
errorstream << error_message << std::endl;
|
||||
} catch (ServerError &e) {
|
||||
error_message = e.what();
|
||||
|
@ -172,7 +172,7 @@ GUIEngine::GUIEngine( irr::IrrlichtDevice* dev,
|
||||
m_sound_manager = &dummySoundManager;
|
||||
|
||||
//create topleft header
|
||||
std::wstring t = narrow_to_wide(std::string(PROJECT_NAME " ") +
|
||||
std::wstring t = narrow_to_wide(std::string(PROJECT_NAME_C " ") +
|
||||
g_version_hash);
|
||||
|
||||
core::rect<s32> rect(0, 0, g_fontengine->getTextWidth(t), g_fontengine->getTextHeight());
|
||||
@ -572,7 +572,7 @@ bool GUIEngine::downloadFile(std::string url, std::string target)
|
||||
/******************************************************************************/
|
||||
void GUIEngine::setTopleftText(std::string append)
|
||||
{
|
||||
std::wstring toset = narrow_to_wide(std::string(PROJECT_NAME " ") +
|
||||
std::wstring toset = narrow_to_wide(std::string(PROJECT_NAME_C " ") +
|
||||
g_version_hash);
|
||||
|
||||
if (append != "")
|
||||
|
@ -47,7 +47,7 @@ HTTPFetchRequest::HTTPFetchRequest()
|
||||
connect_timeout = timeout;
|
||||
multipart = false;
|
||||
|
||||
useragent = std::string(PROJECT_NAME "/") + g_version_hash + " (" + porting::get_sysinfo() + ")";
|
||||
useragent = std::string(PROJECT_NAME_C "/") + g_version_hash + " (" + porting::get_sysinfo() + ")";
|
||||
}
|
||||
|
||||
|
||||
|
@ -347,7 +347,7 @@ static void print_allowed_options(const OptionList &allowed_options)
|
||||
|
||||
static void print_version()
|
||||
{
|
||||
dstream << PROJECT_NAME " " << g_version_hash << std::endl;
|
||||
dstream << PROJECT_NAME_C " " << g_version_hash << std::endl;
|
||||
#ifndef SERVER
|
||||
dstream << "Using Irrlicht " << IRRLICHT_SDK_VERSION << std::endl;
|
||||
#endif
|
||||
|
@ -479,7 +479,7 @@ bool setSystemPaths()
|
||||
DWORD 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 + lowercase(PROJECT_NAME);
|
||||
path_user = std::string(buf) + DIR_DELIM + PROJECT_NAME;
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -511,7 +511,7 @@ bool setSystemPaths()
|
||||
trylist.push_back(static_sharedir);
|
||||
|
||||
trylist.push_back(bindir + DIR_DELIM ".." DIR_DELIM "share"
|
||||
DIR_DELIM + lowercase(PROJECT_NAME));
|
||||
DIR_DELIM + PROJECT_NAME);
|
||||
trylist.push_back(bindir + DIR_DELIM "..");
|
||||
|
||||
#ifdef __ANDROID__
|
||||
@ -540,7 +540,7 @@ bool setSystemPaths()
|
||||
|
||||
#ifndef __ANDROID__
|
||||
path_user = std::string(getenv("HOME")) + DIR_DELIM "."
|
||||
+ lowercase(PROJECT_NAME);
|
||||
+ PROJECT_NAME;
|
||||
#endif
|
||||
|
||||
return true;
|
||||
@ -565,7 +565,7 @@ bool setSystemPaths()
|
||||
|
||||
path_user = std::string(getenv("HOME"))
|
||||
+ "/Library/Application Support/"
|
||||
+ lowercase(PROJECT_NAME);
|
||||
+ PROJECT_NAME;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user