tdf#74244 Fix version info shown for major release candidates

Previous approach of setting the bundle version made e.g.,
6.4.0.3 show up as version 6.4.3 which was clearly wrong

CFBundleShortVersionString is supposed to be only three integers,
but this does not seem to be enforced by Apple.
Other applications, such as Spotiy, include even more than LO

Removed CFBundleGetInfoString as it's been deprecated since 10.5

Change-Id: I7c64553f6bc2712506062d8f8ec388f5279b333d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94623
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
diff --git a/configure.ac b/configure.ac
index ba2a2d0..911cf72 100644
--- a/configure.ac
+++ b/configure.ac
@@ -208,11 +208,6 @@
LIBO_VERSION_MICRO=$3
LIBO_VERSION_PATCH=$4

# The CFBundleShortVersionString in Info.plist consists of three integers, so encode the third
# as the micro version times 1000 plus the patch number. Unfortunately the LIBO_VERSION_SUFFIX can be anything so
# no way to encode that into an integer in general.
MACOSX_BUNDLE_SHORTVERSION=$LIBO_VERSION_MAJOR.$LIBO_VERSION_MINOR.`expr $LIBO_VERSION_MICRO '*' 1000 + $LIBO_VERSION_PATCH`

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,
@@ -226,7 +221,6 @@
AC_SUBST(LIBO_VERSION_MINOR)
AC_SUBST(LIBO_VERSION_MICRO)
AC_SUBST(LIBO_VERSION_PATCH)
AC_SUBST(MACOSX_BUNDLE_SHORTVERSION)
AC_SUBST(LIBO_VERSION_SUFFIX)
AC_SUBST(LIBO_VERSION_SUFFIX_SUFFIX)

diff --git a/sysui/desktop/macosx/Info.plist.in b/sysui/desktop/macosx/Info.plist.in
index fa3dbed..bac0f97 100644
--- a/sysui/desktop/macosx/Info.plist.in
+++ b/sysui/desktop/macosx/Info.plist.in
@@ -1836,14 +1836,12 @@
    </array>
    <key>CFBundleExecutable</key>
    <string>soffice</string>
    <key>CFBundleGetInfoString</key>
    <string>@PRODUCTNAME@ @LIBO_VERSION_MAJOR@.@LIBO_VERSION_MINOR@.@LIBO_VERSION_MICRO@.@LIBO_VERSION_PATCH@@LIBO_VERSION_SUFFIX@</string>
    <key>CFBundleIconFile</key>
    <string>main.icns</string>
    <key>CFBundleShortVersionString</key>
    <string>@MACOSX_BUNDLE_SHORTVERSION@</string>
    <string>@LIBO_VERSION_MAJOR@.@LIBO_VERSION_MINOR@.@LIBO_VERSION_MICRO@.@LIBO_VERSION_PATCH@</string>
    <key>CFBundleVersion</key>
    <string>@MACOSX_BUNDLE_SHORTVERSION@</string>
    <string>@LIBO_VERSION_MAJOR@.@LIBO_VERSION_MINOR@.@LIBO_VERSION_MICRO@.@LIBO_VERSION_PATCH@@LIBO_VERSION_SUFFIX@</string>
    <key>CFBundleIdentifier</key>
    <string>@MACOSX_BUNDLE_IDENTIFIER@</string>
    <key>CFBundleInfoDictionaryVersion</key>