diff options
author | Tor Lillqvist <tml@collabora.com> | 2020-09-08 13:19:48 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2020-09-08 15:25:27 +0200 |
commit | 271297d4fa4a8e045b6dc04942966a1058bed45c (patch) | |
tree | a8160e0818bc42cf0784b6c224e01c1201848fb8 /configure.ac | |
parent | 055c959091e8edcf8396717908b58d87da4c01a3 (diff) |
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@collabora.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 22 |
1 files changed, 22 insertions, 0 deletions
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) |