[vlc-commits] macOS package: Simplify installation of locales
David Fuhrmann
git at videolan.org
Mon Dec 7 11:47:49 UTC 2020
vlc/vlc-3.0 | branch: master | David Fuhrmann <dfuhrmann at videolan.org> | Sat Feb 3 17:51:45 2018 +0100| [be20a6e399738a2575bb6ccd8b7cc5a32439563a] | 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.
(cherry picked from commit 4a410a2a255f8bcce0e86f1b3e253f91c613c0cd)
(edited)
Signed-off-by: David Fuhrmann <dfuhrmann at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=be20a6e399738a2575bb6ccd8b7cc5a32439563a
---
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 b56d68b372..2d6b3ff962 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 68fd5e71e1..378c0fd70b 100644
--- a/share/Info.plist.in
+++ b/share/Info.plist.in
@@ -6,6 +6,8 @@
<string>English</string>
<key>NSRequiresAquaSystemAppearance</key>
<true/>
+ <key>CFBundleAllowMixedLocalizations</key>
+ <true/>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
More information about the vlc-commits
mailing list