aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2015-04-27 16:17:10 +0200
committersfan5 <sfan5@live.de>2015-04-27 16:24:49 +0200
commit4ea5a96fffb1a0300f73e97d4c85bb5c32e3786d (patch)
tree4cb19102443b8ea6f566522c964ba92c905a55a8
parent558d715bf62b000c9b10b44a0e3591ed4e669fa5 (diff)
downloadminetest-4ea5a96fffb1a0300f73e97d4c85bb5c32e3786d.tar.gz
minetest-4ea5a96fffb1a0300f73e97d4c85bb5c32e3786d.tar.bz2
minetest-4ea5a96fffb1a0300f73e97d4c85bb5c32e3786d.zip
Revert the upper-case PROJECT_NAME nonsense that was part of #2402
-rw-r--r--CMakeLists.txt14
-rw-r--r--misc/winresource.rc8
-rw-r--r--src/CMakeLists.txt43
-rw-r--r--src/client/clientlauncher.cpp4
-rw-r--r--src/cmake_config.h.in1
-rw-r--r--src/config.h3
-rw-r--r--src/defaultsettings.cpp2
-rw-r--r--src/emerge.cpp2
-rw-r--r--src/game.cpp12
-rw-r--r--src/guiEngine.cpp4
-rw-r--r--src/httpfetch.cpp2
-rw-r--r--src/main.cpp2
-rw-r--r--src/porting.cpp8
13 files changed, 53 insertions, 52 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2561d1917..639c07077 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -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()
diff --git a/misc/winresource.rc b/misc/winresource.rc
index 5f214391a..6b82e261b 100644
--- a/misc/winresource.rc
+++ b/misc/winresource.rc
@@ -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
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 3a8a432ea..66c8170cb 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -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}
diff --git a/src/client/clientlauncher.cpp b/src/client/clientlauncher.cpp
index 5307ccd4b..d6327e259 100644
--- a/src/client/clientlauncher.cpp
+++ b/src/client/clientlauncher.cpp
@@ -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
diff --git a/src/cmake_config.h.in b/src/cmake_config.h.in
index 7d446d178..c5ca2c803 100644
--- a/src/cmake_config.h.in
+++ b/src/cmake_config.h.in
@@ -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@
diff --git a/src/config.h b/src/config.h
index df7429be0..0955ea8f5 100644
--- a/src/config.h
+++ b/src/config.h
@@ -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
diff --git a/src/defaultsettings.cpp b/src/defaultsettings.cpp
index 7f3122314..e629377ee 100644
--- a/src/defaultsettings.cpp
+++ b/src/defaultsettings.cpp
@@ -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");
diff --git a/src/emerge.cpp b/src/emerge.cpp
index 9c5ee452e..de9a16ac7 100644
--- a/src/emerge.cpp
+++ b/src/emerge.cpp
@@ -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());
}
diff --git a/src/game.cpp b/src/game.cpp
index 706f118cb..af68a2571 100644
--- a/src/game.cpp
+++ b/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();
diff --git a/src/guiEngine.cpp b/src/guiEngine.cpp
index 6989ffa35..752f9ddd2 100644
--- a/src/guiEngine.cpp
+++ b/src/guiEngine.cpp
@@ -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 != "")
diff --git a/src/httpfetch.cpp b/src/httpfetch.cpp
index 50ad9e4af..c60e141fc 100644
--- a/src/httpfetch.cpp
+++ b/src/httpfetch.cpp
@@ -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() + ")";
}
diff --git a/src/main.cpp b/src/main.cpp
index 7223522cc..79daa7b8c 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -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
diff --git a/src/porting.cpp b/src/porting.cpp
index 1fa451d10..29c82fe24 100644
--- a/src/porting.cpp
+++ b/src/porting.cpp
@@ -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;
}