cui/source/dialogs/about.cxx | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-)
New commits: commit 76601f1e935ec7cebbfec26c988bf6f77c638052 Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Mon Oct 24 15:36:01 2022 +0200 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Mon Oct 24 18:20:47 2022 +0200 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 <sberg...@redhat.com> 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 <sal/config.h> + +#include <cassert> + #include <about.hxx> #include <osl/process.h> //osl_getProcessLocale +#include <rtl/bootstrap.hxx> #include <sal/log.hxx> //SAL_WARN #include <vcl/settings.hxx> //GetSettings #include <vcl/svapp.hxx> //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";