[Libreoffice-commits] core.git: Branch 'private/tml/lov-7.0.4' - configure.ac sysui/desktop
Tor Lillqvist (via logerrit)
logerrit at kemper.freedesktop.org
Sun Dec 20 10:38:02 UTC 2020
configure.ac | 22 ++++++++++++++++++++++
sysui/desktop/macosx/Info.plist.in | 4 ++--
2 files changed, 24 insertions(+), 2 deletions(-)
New commits:
commit 86854cc6f33e285facadff0644b2db752e193d8c
Author: Tor Lillqvist <tml at collabora.com>
AuthorDate: Tue Sep 8 13:19:48 2020 +0300
Commit: Tor Lillqvist <tml at iki.fi>
CommitDate: Sun Dec 20 12:29:06 2020 +0200
Follow the rules when building for the App Store
Apple does enforce that CFBundleVersion and CFBundleShortVersionString
consist of three integers. So make sure that is the case when building
for the App Store. (We infer that when using --enable-macosx-sandbox
we are building for the App Store. So far that is true.)
Change-Id: I677b28f65aa9be9466811a982023e0932dce0893
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102237
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist <tml at collabora.com>
diff --git a/configure.ac b/configure.ac
index 10c1227b2c12..be1a90166366 100644
--- a/configure.ac
+++ b/configure.ac
@@ -209,6 +209,7 @@ LIBO_VERSION_MICRO=$3
LIBO_VERSION_PATCH=$4
LIBO_VERSION_SUFFIX=$5
+
# Split out LIBO_VERSION_SUFFIX_SUFFIX... horrible crack. But apparently wanted separately in
# openoffice.lst as ABOUTBOXPRODUCTVERSIONSUFFIX. Note that the double brackets are for m4's sake,
# they get undoubled before actually passed to sed.
@@ -217,12 +218,33 @@ test -n "$LIBO_VERSION_SUFFIX_SUFFIX" && LIBO_VERSION_SUFFIX="${LIBO_VERSION_SUF
# LIBO_VERSION_SUFFIX, if non-empty, should include the period separator
test -n "$LIBO_VERSION_SUFFIX" && LIBO_VERSION_SUFFIX=".$LIBO_VERSION_SUFFIX"
+# The value for key CFBundleVersion in the Info.plist file must be a period-separated list of at most
+# three non-negative integers. Please find more information about CFBundleVersion at
+# https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleversion
+
+# The value for key CFBundleShortVersionString in the Info.plist file must be a period-separated list
+# of at most three non-negative integers. Please find more information about
+# CFBundleShortVersionString at
+# https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleshortversionstring
+
+# But that is enforced only in the App Store, and we apparently want to break the rules otherwise.
+
+if test "$enable_macosx_sandbox" = yes; then
+ MACOSX_BUNDLE_SHORTVERSION=$LIBO_VERSION_MAJOR.$LIBO_VERSION_MINOR.`expr $LIBO_VERSION_MICRO '*' 1000 + $LIBO_VERSION_PATCH`
+ MACOSX_BUNDLE_VERSION=$MACOSX_BUNDLE_SHORTVERSION
+else
+ MACOSX_BUNDLE_SHORTVERSION=$LIBO_VERSION_MAJOR.$LIBO_VERSION_MINOR.$LIBO_VERSION_MICRO.$LIBO_VERSION_PATCH
+ MACOSX_BUNDLE_VERSION=$MACOSX_BUNDLE_SHORTVERSION$LIBO_VERSION_SUFFIX
+fi
+
AC_SUBST(LIBO_VERSION_MAJOR)
AC_SUBST(LIBO_VERSION_MINOR)
AC_SUBST(LIBO_VERSION_MICRO)
AC_SUBST(LIBO_VERSION_PATCH)
AC_SUBST(LIBO_VERSION_SUFFIX)
AC_SUBST(LIBO_VERSION_SUFFIX_SUFFIX)
+AC_SUBST(MACOSX_BUNDLE_SHORTVERSION)
+AC_SUBST(MACOSX_BUNDLE_VERSION)
AC_DEFINE_UNQUOTED(LIBO_VERSION_MAJOR,$LIBO_VERSION_MAJOR)
AC_DEFINE_UNQUOTED(LIBO_VERSION_MINOR,$LIBO_VERSION_MINOR)
diff --git a/sysui/desktop/macosx/Info.plist.in b/sysui/desktop/macosx/Info.plist.in
index a1bf34a8abda..2d43aac38e92 100644
--- a/sysui/desktop/macosx/Info.plist.in
+++ b/sysui/desktop/macosx/Info.plist.in
@@ -1861,9 +1861,9 @@
<key>CFBundleIconFile</key>
<string>main.icns</string>
<key>CFBundleShortVersionString</key>
- <string>@LIBO_VERSION_MAJOR at .@LIBO_VERSION_MINOR at .@LIBO_VERSION_MICRO at .@LIBO_VERSION_PATCH@</string>
+ <string>@MACOSX_BUNDLE_SHORTVERSION@</string>
<key>CFBundleVersion</key>
- <string>@LIBO_VERSION_MAJOR at .@LIBO_VERSION_MINOR at .@LIBO_VERSION_MICRO at .@LIBO_VERSION_PATCH@@LIBO_VERSION_SUFFIX@</string>
+ <string>@MACOSX_BUNDLE_VERSION@</string>
<key>CFBundleIdentifier</key>
<string>@MACOSX_BUNDLE_IDENTIFIER@</string>
<key>CFBundleInfoDictionaryVersion</key>
More information about the Libreoffice-commits
mailing list