summaryrefslogtreecommitdiffstats
path: root/macos.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2012-10-16 21:24:02 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2012-10-16 21:37:43 -0700
commit04c5e65b8cd52bf10d49375d22ba0908efbaa985 (patch)
tree2b3f25a64e6deb7dfe1e6a771e386a3a1b096388 /macos.c
parent0d89d511bbebd76c9c59da3a2fdd2fd99e72e184 (diff)
downloadsubsurface-04c5e65b8cd52bf10d49375d22ba0908efbaa985.tar.gz
Redoing the Mac bundling
With the right tools in place you can now create a bundle from the Makefile by calling "make create-macos-bundle" In the process of this I also moved the locale directory where we stage our .mo files to share/locale (which is much more logical). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'macos.c')
-rw-r--r--macos.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/macos.c b/macos.c
index bb10baa3c..585e879b0 100644
--- a/macos.c
+++ b/macos.c
@@ -106,15 +106,13 @@ const char *subsurface_default_filename()
const char *subsurface_gettext_domainpath()
{
- CFBundleRef mainBundle = CFBundleGetMainBundle();
- CFURLRef localeURL = CFBundleCopyResourceURL(mainBundle, CFSTR("share/locale"), CFSTR(""), NULL);
- if (localeURL) {
- CFStringRef localePath = CFURLCopyFileSystemPath(localeURL, kCFURLPOSIXPathStyle);
- CFStringEncoding encodingMethod = CFStringGetSystemEncoding();
- const char *path = CFStringGetCStringPtr(localePath, encodingMethod);
- return path;
+ static char buffer[256];
+ const char *resource_path = quartz_application_get_resource_path();
+ if (resource_path) {
+ snprintf(buffer, sizeof(buffer), "%s/share/locale", resource_path);
+ return buffer;
}
- return "./locale";
+ return "./share/locale";
}
static void show_main_window(GtkWidget *w, gpointer data)