[Libreoffice-commits] core.git: configure.ac sysui/desktop

Tor Lillqvist (via logerrit) logerrit at kemper.freedesktop.org
Tue Sep 8 13:26:14 UTC 2020


 configure.ac                       |   22 ++++++++++++++++++++++
 sysui/desktop/macosx/Info.plist.in |    4 ++--
 2 files changed, 24 insertions(+), 2 deletions(-)

New commits:
commit 271297d4fa4a8e045b6dc04942966a1058bed45c
Author:     Tor Lillqvist <tml at collabora.com>
AuthorDate: Tue Sep 8 13:19:48 2020 +0300
Commit:     Tor Lillqvist <tml at collabora.com>
CommitDate: Tue Sep 8 15:25:27 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 d4e6caa84aae..4a48eea2de28 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_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 d3051905058d..a87895078135 100644
--- a/sysui/desktop/macosx/Info.plist.in
+++ b/sysui/desktop/macosx/Info.plist.in
@@ -1921,9 +1921,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