mirror of
git://git.savannah.nongnu.org/eliot.git
synced 2025-01-28 19:58:35 +01:00
On Mac, retrieve the locales in the bundle
This commit is contained in:
parent
f2e3e64bc0
commit
eb9f7bb8d5
1 changed files with 8 additions and 0 deletions
|
@ -28,6 +28,10 @@
|
|||
#ifdef WIN32
|
||||
# include <windows.h>
|
||||
#endif
|
||||
#ifdef __APPLE__
|
||||
# include <CoreFoundation/CFURL.h>
|
||||
# include <CoreFoundation/CFBundle.h>
|
||||
#endif
|
||||
|
||||
using std::string;
|
||||
|
||||
|
@ -52,6 +56,10 @@ int main(int argc, char **argv)
|
|||
if (pos)
|
||||
*pos = '\0';
|
||||
const string localeDir = baseDir + string("\\locale");
|
||||
#elif defined(__APPLE__)
|
||||
const char *bundlePath = CFStringGetCStringPtr(CFURLCopyFileSystemPath(
|
||||
CFBundleCopyBundleURL(CFBundleGetMainBundle()), kCFURLPOSIXPathStyle), CFStringGetSystemEncoding());
|
||||
const string localeDir = string(bundlePath) + "/Contents/Resources/locale";
|
||||
#else
|
||||
static const string localeDir = LOCALEDIR;
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue