#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@
#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
#endif
#endif
- static std::string name = lowercase(PROJECT_NAME);
- bindtextdomain(name.c_str(), path);
- textdomain(name.c_str());
+ bindtextdomain(PROJECT_NAME_LOWER, path);
+ textdomain(PROJECT_NAME_LOWER);
#if defined(_WIN32)
// Set character encoding for Win32
// Use ".\bin\.."
path_share = std::string(buf) + "\\..";
- // Use "C:\Documents and Settings\user\Application Data\<PROJECT_NAME>"
+ // Use "C:\Documents and Settings\user\Application Data\<PROJECT_NAME_LOWER>"
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_LOWER;
return true;
}
trylist.push_back(static_sharedir);
trylist.push_back(bindir + DIR_DELIM ".." DIR_DELIM "share"
- DIR_DELIM + lowercase(PROJECT_NAME));
+ DIR_DELIM PROJECT_NAME_LOWER);
trylist.push_back(bindir + DIR_DELIM "..");
#ifdef __ANDROID__
#ifndef __ANDROID__
path_user = std::string(getenv("HOME")) + DIR_DELIM "."
- + lowercase(PROJECT_NAME);
+ PROJECT_NAME_LOWER;
#endif
return true;
}
CFRelease(resources_url);
- path_user = std::string(getenv("HOME"))
- + "/Library/Application Support/"
- + lowercase(PROJECT_NAME);
+ path_user = std::string(getenv("HOME")) +
+ "/Library/Application Support/" PROJECT_NAME_LOWER;
return true;
}
{
path_share = STATIC_SHAREDIR;
path_user = std::string(getenv("HOME")) + DIR_DELIM "."
- + lowercase(PROJECT_NAME);
+ PROJECT_NAME_LOWER;
return true;
}