summaryrefslogtreecommitdiff
path: root/cui/source/dialogs/about.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2022-10-24 15:36:01 +0200
committerStephan Bergmann <sbergman@redhat.com>2022-10-24 18:20:47 +0200
commit76601f1e935ec7cebbfec26c988bf6f77c638052 (patch)
tree46ebe1a29123f993d8a33bb48a87cee6006da767 /cui/source/dialogs/about.cxx
parent341a048611a0314374bd8f051eb04378ee41f9b5 (diff)
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 <sbergman@redhat.com>
Diffstat (limited to 'cui/source/dialogs/about.cxx')
-rw-r--r--cui/source/dialogs/about.cxx14
1 files 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 <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";