diff options
author | Perttu Ahola <celeron55@gmail.com> | 2011-08-13 14:05:01 +0300 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2011-08-13 14:05:01 +0300 |
commit | 9e35fe8c37b87e2746d9368d273a54bf4a3ba65a (patch) | |
tree | 50d0dfecbb56f3a66a882e5af9eaadc7c7ee5c6f /src | |
parent | 385904d75ae35484b76f48992e9c99840539aec3 (diff) | |
parent | 94b42a79d78115277392c7d4b50e520a4b0c98ac (diff) | |
download | minetest-9e35fe8c37b87e2746d9368d273a54bf4a3ba65a.tar.gz minetest-9e35fe8c37b87e2746d9368d273a54bf4a3ba65a.tar.bz2 minetest-9e35fe8c37b87e2746d9368d273a54bf4a3ba65a.zip |
Merge remote-tracking branch 'speedprog/fixedNotFindingData'
Diffstat (limited to 'src')
-rw-r--r-- | src/constants.h | 2 | ||||
-rw-r--r-- | src/porting.cpp | 18 | ||||
-rw-r--r-- | src/porting.h | 6 |
3 files changed, 12 insertions, 14 deletions
diff --git a/src/constants.h b/src/constants.h index 14ca58b43..21ab2a64c 100644 --- a/src/constants.h +++ b/src/constants.h @@ -28,8 +28,6 @@ with this program; if not, write to the Free Software Foundation, Inc., //#define HAXMODE 0 -#define APPNAME "minetest" - #define DEBUGFILE "debug.txt" #define WATER_ALPHA 160 diff --git a/src/porting.cpp b/src/porting.cpp index 3dd9b43c3..39b2c5705 100644 --- a/src/porting.cpp +++ b/src/porting.cpp @@ -189,12 +189,12 @@ void initializePaths() // Use "./bin/../data" path_data = std::string(buf) + "/../data"; - //path_data = std::string(buf) + "/../share/" + APPNAME; + //path_data = std::string(buf) + "/../share/" + PROJECT_NAME; - // Use "C:\Documents and Settings\user\Application Data\<APPNAME>" + // Use "C:\Documents and Settings\user\Application Data\<PROJECT_NAME>" len = GetEnvironmentVariable("APPDATA", buf, buflen); assert(len < buflen); - path_userdata = std::string(buf) + "/" + APPNAME; + path_userdata = std::string(buf) + "/" + PROJECT_NAME; /* Linux @@ -209,15 +209,15 @@ void initializePaths() pathRemoveFile(buf, '/'); - path_data = std::string(buf) + "/../share/" + APPNAME; - //path_data = std::string(INSTALL_PREFIX) + "/share/" + APPNAME; + path_data = std::string(buf) + "/../share/" + PROJECT_NAME; + //path_data = std::string(INSTALL_PREFIX) + "/share/" + PROJECT_NAME; if (!fs::PathExists(path_data)) { dstream<<"WARNING: data path " << path_data << " not found!"; path_data = std::string(buf) + "/../data"; dstream<<" Trying " << path_data << std::endl; } - path_userdata = std::string(getenv("HOME")) + "/." + APPNAME; + path_userdata = std::string(getenv("HOME")) + "/." + PROJECT_NAME; /* OS X @@ -243,12 +243,12 @@ void initializePaths() } CFRelease(resources_url); - path_userdata = std::string(getenv("HOME")) + "/Library/Application Support/" + APPNAME; + path_userdata = std::string(getenv("HOME")) + "/Library/Application Support/" + PROJECT_NAME; #elif defined(__FreeBSD__) - path_data = std::string(INSTALL_PREFIX) + "/share/" + APPNAME; - path_userdata = std::string(getenv("HOME")) + "/." + APPNAME; + path_data = std::string(INSTALL_PREFIX) + "/share/" + PROJECT_NAME; + path_userdata = std::string(getenv("HOME")) + "/." + PROJECT_NAME; #endif diff --git a/src/porting.h b/src/porting.h index 3cf8df594..3f9486b63 100644 --- a/src/porting.h +++ b/src/porting.h @@ -63,9 +63,9 @@ extern std::string path_data; /* Directory for storing user data. Examples: - Windows: "C:\Documents and Settings\user\Application Data\<APPNAME>" - Linux: "~/.<APPNAME>" - Mac: "~/Library/Application Support/<APPNAME>" + Windows: "C:\Documents and Settings\user\Application Data\<PROJECT_NAME>" + Linux: "~/.<PROJECT_NAME>" + Mac: "~/Library/Application Support/<PROJECT_NAME>" */ extern std::string path_userdata; |