diff options
author | DarkWind <darkwindmsn@hotmail.com> | 2011-02-15 20:05:02 +0100 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-02-15 21:30:12 +0200 |
commit | 1d41d39f60b7183b70180c0ad9d2cb3bc9c88599 (patch) | |
tree | b4a0281e5e9f10557af714e0056d90bbbd1d55f0 /src | |
parent | f7c1149be85d90f05d55bc2c975432a6d9d6012e (diff) | |
download | ManaVerse-1d41d39f60b7183b70180c0ad9d2cb3bc9c88599.tar.gz ManaVerse-1d41d39f60b7183b70180c0ad9d2cb3bc9c88599.tar.bz2 ManaVerse-1d41d39f60b7183b70180c0ad9d2cb3bc9c88599.tar.xz ManaVerse-1d41d39f60b7183b70180c0ad9d2cb3bc9c88599.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 | 9 | ||||
-rw-r--r-- | src/main.h | 2 |
3 files changed, 11 insertions, 2 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index d807e9a1c..0b1575ffc 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -48,7 +48,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 5f86ad4a3..429180abe 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -1301,6 +1301,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()) @@ -1325,6 +1328,10 @@ void Client::initHomeDir() #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()) @@ -2014,4 +2021,4 @@ void Client::closeDialogs() BuySellDialog::closeAll(); NpcDialog::closeAll(); SellDialog::closeAll(); -}
\ No newline at end of file +} diff --git a/src/main.h b/src/main.h index db01c4d04..20ac9126e 100644 --- a/src/main.h +++ b/src/main.h @@ -70,6 +70,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__ \ || defined __MINGW32__ || defined _MSC_VER |