Hi,
Does anybody have an idea how we can determine at runtime where the
LibreOffice installation root is?
The difficulty we are having with firebird is that is needs to find a
"security3.fdb" file. So we put it in instdir/share/ and we want
firebird to look there.
But now, when running from the instdir in the source dir, that will be
something like
/home/username/sources/libreoffice/.../instdir/share
but after a "real" installation the exact same binary will be in
something like
/opt/libreoffice5.3/share
/usr/lib/libreoffice
/usr/local/lib/libreoffice
So we need to determine at _runtime_ where LibreOffice is being run
from... I see that the "soffice" script has a "sd_prog" variable; if
we just export it, we could use that, something like the
concatenation of getenv("sd_prog") and "../share/".
Is it OK if we do that? Will it work on other platforms than Unixy
systems? Is there already another mechanism to achieve the same result
in LibreOffice that I don't know about?
Thanks in advance,
Lionel
Context
- find at runtime where LibreOffice is being executed from · Lionel Elie Mamane
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.