From 76601f1e935ec7cebbfec26c988bf6f77c638052 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Mon, 24 Oct 2022 15:36:01 +0200 Subject: [PATCH] Always include target CPU architecture in About dialog Version Information ...not just for Windows. This information is occasionally useful also on other platforms that can run executables targeting different CPU architectures (like Linux x86 and x86-64, or macOS Aarch64 and x86-64), e.g. when trying to track down why a bug reporter's system doesn't find a JRE matching the architecture of their LibreOffice installation. For simplicity, use the existing _ARCH bootstrap variable, even if its values differ from the hardcoded "x64" and "x86" that have been used here so far. Change-Id: I76b40dd044397bf19e014d8a56d0314f455bc8ac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141768 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- cui/source/dialogs/about.cxx | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx index 9e5be496881e..150298ee1618 100644 --- a/cui/source/dialogs/about.cxx +++ b/cui/source/dialogs/about.cxx @@ -17,9 +17,14 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include + +#include + #include #include //osl_getProcessLocale +#include #include //SAL_WARN #include //GetSettings #include //Application:: @@ -148,11 +153,10 @@ bool AboutDialog::IsStringValidGitHash(std::u16string_view hash) { OUString AboutDialog::GetVersionString() { OUString sVersion = CuiResId(TranslateId(nullptr, "%ABOUTBOXPRODUCTVERSION%ABOUTBOXPRODUCTVERSIONSUFFIX")); -#ifdef _WIN64 - sVersion += " (x64)"; -#elif defined(_WIN32) - sVersion += " (x86)"; -#endif + OUString arch; + auto const ok = rtl::Bootstrap::get("_ARCH", arch); + assert(ok); (void) ok; + sVersion += " (" + arch + ")"; #if HAVE_FEATURE_COMMUNITY_FLAVOR sVersion += " / LibreOffice Community";