[vlc-commits] macOS package: Simplify installation of locales
David Fuhrmann
git at videolan.org
Sat Feb 3 17:56:18 CET 2018
vlc | branch: master | David Fuhrmann <dfuhrmann at videolan.org> | Sat Feb 3 17:51:45 2018 +0100| [4a410a2a255f8bcce0e86f1b3e253f91c613c0cd] | committer: David Fuhrmann
macOS package: Simplify installation of locales
The prefix already contains the correct directory structure for
locale, just copy this one over. Also, remove lots of xx.lproj
folders inside Resources, and install the untranslated xibs into
Base.lproj, as it is recommended by apple.
Instead, set a key in Info.plist, which fixes translation of system
dialogs, behaviour is the same as before.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4a410a2a255f8bcce0e86f1b3e253f91c613c0cd
---
extras/package/macosx/package.mak | 14 ++++----------
share/Info.plist.in | 2 ++
2 files changed, 6 insertions(+), 10 deletions(-)
diff --git a/extras/package/macosx/package.mak b/extras/package/macosx/package.mak
index 5a4f8ef3c9..c8ad0557f1 100644
--- a/extras/package/macosx/package.mak
+++ b/extras/package/macosx/package.mak
@@ -5,7 +5,7 @@ endif
# Symlink a pseudo-bundle
pseudo-bundle:
$(MKDIR_P) $(top_builddir)/bin/Contents/Resources/
- $(LN_S) -hf $(abs_top_builddir)/modules/gui/macosx/UI $(top_builddir)/bin/Contents/Resources/English.lproj
+ $(LN_S) -hf $(abs_top_builddir)/modules/gui/macosx/UI $(top_builddir)/bin/Contents/Resources/Base.lproj
$(LN_S) -hf $(abs_top_builddir)/share/macosx/Info.plist $(top_builddir)/bin/Contents/Info.plist
$(LN_S) -hf $(CONTRIB_DIR)/Frameworks
cd $(top_builddir)/bin/Contents/Resources/ && find $(abs_top_srcdir)/modules/gui/macosx/Resources/ -type f -exec $(LN_S) -f {} \;
@@ -17,7 +17,7 @@ VLC.app: install
## Copy Contents
cp -R $(prefix)/share/macosx/ $@
## Copy .strings file and .nib files
- cp -R $(top_builddir)/modules/gui/macosx/UI $@/Contents/Resources/English.lproj
+ cp -R $(top_builddir)/modules/gui/macosx/UI $@/Contents/Resources/Base.lproj
## Copy Info.plist and convert to binary
cp -R $(top_builddir)/share/macosx/Info.plist $@/Contents/
xcrun plutil -convert binary1 $@/Contents/Info.plist
@@ -30,7 +30,7 @@ endif
if HAVE_BREAKPAD
cp -R $(CONTRIB_DIR)/Frameworks/Breakpad.framework $@/Contents/Frameworks
endif
- mkdir -p $@/Contents/MacOS/share/locale/
+ mkdir -p $@/Contents/MacOS/share/
if BUILD_LUA
## Copy lua scripts
cp -r "$(prefix)/share/vlc/lua" $@/Contents/MacOS/share/
@@ -42,13 +42,7 @@ endif
mkdir -p $@/Contents/MacOS/include/
(cd "$(prefix)/include" && $(AMTAR) -c --exclude "plugins" vlc) | $(AMTAR) -x -C $@/Contents/MacOS/include/
## Copy translations
- cat $(top_srcdir)/po/LINGUAS | while read i; do \
- $(INSTALL) -d $@/Contents/MacOS/share/locale/$${i}/LC_MESSAGES ; \
- $(INSTALL) $(srcdir)/po/$${i}.gmo $@/Contents/MacOS/share/locale/$${i}/LC_MESSAGES/vlc.mo; \
- mkdir -p $@/Contents/Resources/$${i}.lproj/ ; \
- $(LN_S) -f ../English.lproj/InfoPlist.strings ../English.lproj/MainMenu.nib \
- $@/Contents/Resources/$${i}.lproj/ ; \
- done
+ cp -r "$(prefix)/share/locale" $@/Contents/MacOS/share/
printf "APPLVLC#" >| $@/Contents/PkgInfo
## Copy libs
mkdir -p $@/Contents/MacOS/lib
diff --git a/share/Info.plist.in b/share/Info.plist.in
index 83d90da709..43abf1c942 100644
--- a/share/Info.plist.in
+++ b/share/Info.plist.in
@@ -4,6 +4,8 @@
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
+ <key>CFBundleAllowMixedLocalizations</key>
+ <true/>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
More information about the vlc-commits
mailing list