diff options
author | Didier 'OdyX' Raboud <didier@raboud.com> | 2013-11-08 10:41:50 +0100 |
---|---|---|
committer | Didier 'OdyX' Raboud <didier@raboud.com> | 2013-11-13 09:35:32 +0100 |
commit | aeefdbd1bed4d0670b1e860e900eebb9d70b3543 (patch) | |
tree | bce47b28fbe4d47d10399e821a6b990932ab25b4 /src/app/system_macosx.cpp | |
parent | b32f87bac7cde826db2502422b0696c0d08f0822 (diff) | |
download | colobot-aeefdbd1bed4d0670b1e860e900eebb9d70b3543.tar.gz colobot-aeefdbd1bed4d0670b1e860e900eebb9d70b3543.tar.bz2 colobot-aeefdbd1bed4d0670b1e860e900eebb9d70b3543.zip |
On MacOSX, define the LangPath as being i18n in the Resources path of the bundle
Diffstat (limited to 'src/app/system_macosx.cpp')
-rw-r--r-- | src/app/system_macosx.cpp | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/app/system_macosx.cpp b/src/app/system_macosx.cpp index d452fe6..68f5c79 100644 --- a/src/app/system_macosx.cpp +++ b/src/app/system_macosx.cpp @@ -76,22 +76,25 @@ void CSystemUtilsMacOSX::Init() // Make sure the directory exists boost::filesystem::create_directories(m_ASPath.c_str()); -} -std::string CSystemUtilsMacOSX::GetDataPath() -{ - std::string dataPath; // Get the Resources bundle URL CFBundleRef mainBundle = CFBundleGetMainBundle(); CFURLRef resourcesURL = CFBundleCopyBundleURL(mainBundle); CFStringRef str = CFURLCopyFileSystemPath( resourcesURL, kCFURLPOSIXPathStyle ); CFRelease(resourcesURL); - dataPath = CFStringRefToStdString(str); - dataPath += "/Contents/Resources"; - GetLogger()->Trace("dataPath is %s\n", dataPath.c_str()); + m_dataPath = CFStringRefToStdString(str); + m_dataPath += "/Contents/Resources"; +} - return dataPath; +std::string CSystemUtilsMacOSX::GetDataPath() +{ + return m_dataPath; +} + +std::string CSystemUtilsMacOSX::GetLangPath() +{ + return m_dataPath + "/i18n"; } std::string CSystemUtilsMacOSX::GetProfileFileLocation() |