diff options
author | sfan5 <sfan5@live.de> | 2015-04-26 22:24:48 +0200 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2015-04-27 16:24:49 +0200 |
commit | 558d715bf62b000c9b10b44a0e3591ed4e669fa5 (patch) | |
tree | 0af3b864b553ec876a956797d3097829ef4f6986 | |
parent | 415167b228dea8b4108d7fe164c7fec8c061dcf5 (diff) | |
download | minetest-558d715bf62b000c9b10b44a0e3591ed4e669fa5.tar.gz minetest-558d715bf62b000c9b10b44a0e3591ed4e669fa5.tar.bz2 minetest-558d715bf62b000c9b10b44a0e3591ed4e669fa5.zip |
Revert "Only lowercase project name at compile time"
This reverts commit 3be9787e64362b8a5020746220c65abbe31f8097.
-rw-r--r-- | src/cmake_config.h.in | 1 | ||||
-rw-r--r-- | src/config.h | 1 | ||||
-rw-r--r-- | src/gettext.cpp | 5 | ||||
-rw-r--r-- | src/porting.cpp | 15 |
4 files changed, 11 insertions, 11 deletions
diff --git a/src/cmake_config.h.in b/src/cmake_config.h.in index c37858509..7d446d178 100644 --- a/src/cmake_config.h.in +++ b/src/cmake_config.h.in @@ -4,7 +4,6 @@ #define CMAKE_CONFIG_H #define PROJECT_NAME "@PROJECT_NAME@" -#define PROJECT_NAME_LOWER "@PROJECT_NAME_LOWER@" #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 8f475fce4..df7429be0 100644 --- a/src/config.h +++ b/src/config.h @@ -14,7 +14,6 @@ #include "cmake_config.h" #elif defined (__ANDROID__) || defined (ANDROID) #define PROJECT_NAME "Minetest" - #define PROJECT_NAME_LOWER "minetest" #define STATIC_SHAREDIR "" #include "android_version.h" #ifdef NDEBUG diff --git a/src/gettext.cpp b/src/gettext.cpp index 85455ad3c..509d506d4 100644 --- a/src/gettext.cpp +++ b/src/gettext.cpp @@ -236,8 +236,9 @@ void init_gettext(const char *path, const std::string &configured_language) { #endif #endif - bindtextdomain(PROJECT_NAME_LOWER, path); - textdomain(PROJECT_NAME_LOWER); + static std::string name = lowercase(PROJECT_NAME); + bindtextdomain(name.c_str(), path); + textdomain(name.c_str()); #if defined(_WIN32) // Set character encoding for Win32 diff --git a/src/porting.cpp b/src/porting.cpp index ce35fe577..1fa451d10 100644 --- a/src/porting.cpp +++ b/src/porting.cpp @@ -475,11 +475,11 @@ bool setSystemPaths() // Use ".\bin\.." path_share = std::string(buf) + "\\.."; - // Use "C:\Documents and Settings\user\Application Data\<PROJECT_NAME_LOWER>" + // Use "C:\Documents and Settings\user\Application Data\<PROJECT_NAME>" 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 PROJECT_NAME_LOWER; + path_user = std::string(buf) + DIR_DELIM + lowercase(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 PROJECT_NAME_LOWER); + DIR_DELIM + lowercase(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 "." - PROJECT_NAME_LOWER; + + lowercase(PROJECT_NAME); #endif return true; @@ -563,8 +563,9 @@ bool setSystemPaths() } CFRelease(resources_url); - path_user = std::string(getenv("HOME")) + - "/Library/Application Support/" PROJECT_NAME_LOWER; + path_user = std::string(getenv("HOME")) + + "/Library/Application Support/" + + lowercase(PROJECT_NAME); return true; } @@ -575,7 +576,7 @@ bool setSystemPaths() { path_share = STATIC_SHAREDIR; path_user = std::string(getenv("HOME")) + DIR_DELIM "." - PROJECT_NAME_LOWER; + + lowercase(PROJECT_NAME); return true; } |