From 6c5355d45d27064ff4fed566d07041e0c6c372e9 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Thu, 14 Nov 2024 13:48:51 +0100 Subject: [PATCH] Fix Linux cppuhelper_detail_findSofficePath ...so that it looks for the /usr/bin/ symlink with the name with which it is created by sysui/CustomTarget_share.mk via sysui/desktop/share/create_tree.sh Change-Id: I46c2bb9d8df936fd5c7bd52bbee86da959d5c6cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176597 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- config_host/config_version.h.in | 7 +++++-- cppuhelper/source/findsofficepath.c | 4 +++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/config_host/config_version.h.in b/config_host/config_version.h.in index 40c7dad24cd8..9a685827baea 100644 --- a/config_host/config_version.h.in +++ b/config_host/config_version.h.in @@ -15,9 +15,12 @@ Version settings #undef LIBO_VERSION_PATCH #undef LIBO_THIS_YEAR -#define LIBO_VERSION_DOTTED \ +#define LIBO_VERSION_DOTTED_2 \ LIBO_VERSION_STRINGIFY(LIBO_VERSION_MAJOR) "." \ - LIBO_VERSION_STRINGIFY(LIBO_VERSION_MINOR) "." \ + LIBO_VERSION_STRINGIFY(LIBO_VERSION_MINOR) + +#define LIBO_VERSION_DOTTED \ + LIBO_VERSION_DOTTED_2 "." \ LIBO_VERSION_STRINGIFY(LIBO_VERSION_MICRO) "." \ LIBO_VERSION_STRINGIFY(LIBO_VERSION_PATCH) diff --git a/cppuhelper/source/findsofficepath.c b/cppuhelper/source/findsofficepath.c index a46cfb88a1e7..e22e0a582ef1 100644 --- a/cppuhelper/source/findsofficepath.c +++ b/cppuhelper/source/findsofficepath.c @@ -22,6 +22,7 @@ #include #include +#include #include #if defined(_WIN32) @@ -136,7 +137,8 @@ static char* platformSpecific(void) const int SEPARATOR = '/'; const char* PATHSEPARATOR = ":"; const char* PATHVARNAME = "PATH"; - const char* APPENDIX = "/libreoffice"; + const char* APPENDIX = "/libreoffice" LIBO_VERSION_DOTTED_2; + // must match the product's UNIXFILENAME.* in sysui/productlist.mk char* path = NULL; char* str = NULL;