mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
0d89d511bb
commit
04c5e65b8c
5 changed files with 42 additions and 24 deletions
14
macos.c
14
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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue