diff options
author | DarkWind <darkwindmsn@hotmail.com> | 2011-02-15 20:05:02 +0100 |
---|---|---|
committer | Bernd Wachter <bwachter-tmw@lart.info> | 2011-02-15 21:16:50 +0200 |
commit | 3c93bde383fad59972ae3004471b2bb567438b9d (patch) | |
tree | 743cca5bcf5a4e2b12ecccf544c0ca5ff6dcd0ae /src | |
parent | 377d5160cbaa40a4a8e83dd35d74bec6aeb208e0 (diff) | |
download | Mana-3c93bde383fad59972ae3004471b2bb567438b9d.tar.gz Mana-3c93bde383fad59972ae3004471b2bb567438b9d.tar.bz2 Mana-3c93bde383fad59972ae3004471b2bb567438b9d.tar.xz Mana-3c93bde383fad59972ae3004471b2bb567438b9d.zip |
Fix compilation on Haiku and set config and data paths for it.
Diffstat (limited to 'src')
-rw-r--r-- | src/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/client.cpp | 7 | ||||
-rw-r--r-- | src/main.h | 2 |
3 files changed, 10 insertions, 1 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f0c988dd..79dd72cc 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -54,7 +54,7 @@ ENDIF() IF (WIN32) SET(EXTRA_LIBRARIES ws2_32 winmm) FIND_PACKAGE(LibIntl REQUIRED) -ELSEIF (CMAKE_SYSTEM_NAME STREQUAL "Darwin") +ELSEIF (CMAKE_SYSTEM_NAME STREQUAL "Darwin" OR BEOS) FIND_PACKAGE(LibIntl REQUIRED) ELSEIF (CMAKE_SYSTEM_NAME STREQUAL SunOS) # explicit linking to libintl is required on Solaris diff --git a/src/client.cpp b/src/client.cpp index f61b5612..71e2885d 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -1167,6 +1167,9 @@ void Client::initHomeDir() mLocalDataDir = std::string(PHYSFS_getUserDir()) + "/Library/Application Support/" + branding.getValue("appName", "Mana"); +#elif defined __HAIKU__ + mLocalDataDir = std::string(PHYSFS_getUserDir()) + + "/config/data/Mana"; #elif defined WIN32 mLocalDataDir = getSpecialFolderLocation(CSIDL_LOCAL_APPDATA); if (mLocalDataDir.empty()) @@ -1189,6 +1192,10 @@ void Client::initHomeDir() if (mConfigDir.empty()){ #ifdef __APPLE__ mConfigDir = mLocalDataDir + "/" + branding.getValue("appShort", "mana"); +#elif defined __HAIKU__ + mConfigDir = std::string(PHYSFS_getUserDir()) + + "/config/settings/Mana" + + branding.getValue("appName", "Mana"); #elif defined WIN32 mConfigDir = getSpecialFolderLocation(CSIDL_APPDATA); if (mConfigDir.empty()) @@ -78,6 +78,8 @@ #define PACKAGE_OS "Linux" #elif defined __GNU__ #define PACKAGE_OS "GNU Hurd" +#elif defined __HAIKU__ +#define PACKAGE_OS "Haiku" #elif defined WIN32 || defined _WIN32 || defined __WIN32__ || defined __NT__ \ || defined WIN64 || defined _WIN64 || defined __WIN64__ #define PACKAGE_OS "Windows" |