summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <stephan.bergmann@allotropia.de>2024-11-14 13:48:51 +0100
committerStephan Bergmann <stephan.bergmann@allotropia.de>2024-11-14 16:11:59 +0100
commit6c5355d45d27064ff4fed566d07041e0c6c372e9 (patch)
tree32f7a7b7163aabb8c946c49253cf26e70b8648b6
parent80cea922912ba83baf2e2415a0328abb9edc6a00 (diff)
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 <stephan.bergmann@allotropia.de>
-rw-r--r--config_host/config_version.h.in7
-rw-r--r--cppuhelper/source/findsofficepath.c4
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 <stdlib.h>
#include <string.h>
+#include <config_version.h>
#include <cppuhelper/findsofficepath.h>
#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;