Patch: Adjust locale path
Henrik Brautaset Aronsen
subsurface at henrik.synth.no
Tue Oct 16 12:21:11 PDT 2012
gtk-mac-bundler uses Contents/Resources/share/locale, and the
install-macosx target should do the same.
H
(The commit message of my last commit (13cc5afb7f) looks weird, probably
because I send my patches as attachments. So this time I've prefixed
the subject with Patch: instead of [PATCH], maybe that does the trick?)
-------------- next part --------------
>From d010463ed2b18de65029f9e3fc7ba4f89774d482 Mon Sep 17 00:00:00 2001
From: Henrik Brautaset Aronsen <subsurface at henrik.synth.no>
Date: Tue, 16 Oct 2012 21:16:57 +0200
Subject: [PATCH] Adjust locale path for install-macosx target
gtk-mac-bundler uses Contents/Resources/share/locale, and
the install-macosx target should do the same.
Signed-off-by: Henrik Brautaset Aronsen <subsurface at henrik.synth.no>
---
Makefile | 6 +++---
macos.c | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/Makefile b/Makefile
index 5c81460..34247e7 100644
--- a/Makefile
+++ b/Makefile
@@ -158,8 +158,8 @@ install-macosx: $(NAME)
$(INSTALL) $(ICONFILE) $(MACOSXINSTALL)/Contents/Resources/
$(INSTALL) $(MACOSXFILES)/Subsurface.icns $(MACOSXINSTALL)/Contents/Resources/
for LOC in $(wildcard locale/*/LC_MESSAGES); do \
- $(INSTALL) -d -m 755 $(MACOSXINSTALL)/Contents/Resources/$$LOC; \
- $(INSTALL) $$LOC/subsurface.mo $(MACOSXINSTALL)/Contents/Resources/$$LOC/subsurface.mo; \
+ $(INSTALL) -d -m 755 $(MACOSXINSTALL)/Contents/Resources/share/$$LOC; \
+ $(INSTALL) $$LOC/subsurface.mo $(MACOSXINSTALL)/Contents/Resources/share/$$LOC/subsurface.mo; \
done
install-cross-windows: $(NAME)
@@ -235,7 +235,7 @@ $(OSSUPPORT).o: $(OSSUPPORT).c display-gtk.h
locale/%.UTF-8/LC_MESSAGES/subsurface.mo: po/%.po
mkdir -p $(dir $@)
msgfmt -c -o $@ po/$*.po
- if test -s po/$*.aliases; then \
+ @-if test -s po/$*.aliases; then \
for ALIAS in `cat po/$*.aliases`; do \
mkdir -p locale/$$ALIAS/LC_MESSAGES; \
cp $@ locale/$$ALIAS/LC_MESSAGES; \
diff --git a/macos.c b/macos.c
index 3d9c9b5..bb10baa 100644
--- a/macos.c
+++ b/macos.c
@@ -107,7 +107,7 @@ const char *subsurface_default_filename()
const char *subsurface_gettext_domainpath()
{
CFBundleRef mainBundle = CFBundleGetMainBundle();
- CFURLRef localeURL = CFBundleCopyResourceURL(mainBundle, CFSTR("locale"), CFSTR(""), NULL);
+ CFURLRef localeURL = CFBundleCopyResourceURL(mainBundle, CFSTR("share/locale"), CFSTR(""), NULL);
if (localeURL) {
CFStringRef localePath = CFURLCopyFileSystemPath(localeURL, kCFURLPOSIXPathStyle);
CFStringEncoding encodingMethod = CFStringGetSystemEncoding();
--
1.7.12.3
More information about the subsurface
mailing list