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>
This commit is contained in:
@@ -17,9 +17,14 @@
|
|||||||
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <sal/config.h>
|
||||||
|
|
||||||
|
#include <cassert>
|
||||||
|
|
||||||
#include <about.hxx>
|
#include <about.hxx>
|
||||||
|
|
||||||
#include <osl/process.h> //osl_getProcessLocale
|
#include <osl/process.h> //osl_getProcessLocale
|
||||||
|
#include <rtl/bootstrap.hxx>
|
||||||
#include <sal/log.hxx> //SAL_WARN
|
#include <sal/log.hxx> //SAL_WARN
|
||||||
#include <vcl/settings.hxx> //GetSettings
|
#include <vcl/settings.hxx> //GetSettings
|
||||||
#include <vcl/svapp.hxx> //Application::
|
#include <vcl/svapp.hxx> //Application::
|
||||||
@@ -148,11 +153,10 @@ bool AboutDialog::IsStringValidGitHash(std::u16string_view hash) {
|
|||||||
OUString AboutDialog::GetVersionString() {
|
OUString AboutDialog::GetVersionString() {
|
||||||
OUString sVersion = CuiResId(TranslateId(nullptr, "%ABOUTBOXPRODUCTVERSION%ABOUTBOXPRODUCTVERSIONSUFFIX"));
|
OUString sVersion = CuiResId(TranslateId(nullptr, "%ABOUTBOXPRODUCTVERSION%ABOUTBOXPRODUCTVERSIONSUFFIX"));
|
||||||
|
|
||||||
#ifdef _WIN64
|
OUString arch;
|
||||||
sVersion += " (x64)";
|
auto const ok = rtl::Bootstrap::get("_ARCH", arch);
|
||||||
#elif defined(_WIN32)
|
assert(ok); (void) ok;
|
||||||
sVersion += " (x86)";
|
sVersion += " (" + arch + ")";
|
||||||
#endif
|
|
||||||
|
|
||||||
#if HAVE_FEATURE_COMMUNITY_FLAVOR
|
#if HAVE_FEATURE_COMMUNITY_FLAVOR
|
||||||
sVersion += " / LibreOffice Community";
|
sVersion += " / LibreOffice Community";
|
||||||
|
Reference in New Issue
Block a user