Using libweston with GTK/GDK
ppaalanen at gmail.com
Mon Jun 3 11:17:21 UTC 2019
On Mon, 3 Jun 2019 08:38:12 +0100
adlo <adloconwy at gmail.com> wrote:
> How do I ensure my client will still launch no matter what directory
> I run my compositor from? How do I get the absolute path of my client?
you install the client to a specific path. You get the path from your
> Also, how do I ensure it will still launch correctly no matter
> whether I am running it from the builddir or the installdir? The
> locally built version should launch the locally built client and the
> installed version should launch the installed client.
That is always tricky, and IMO there is no good and nice solution. For
a test suite, you could use an environment variable to override the
default search path, but for a manual launch that is a bit more
inconvenient. Maybe you could generate a script with the env var. Maybe
always search in the build dir and hope that it is not found when
properly installed. Maybe have your install script modify the binaries
to not search in build dir anymore... all solutions have some
disadvantages. There is no magic to it, just complications.
FWIW, Weston uses environment variables for the test suite, and
otherwise requires you to have installed first. You can easily track
what Weston does by grepping for the callers of the appropriate
This is a fundamental problem for every project that installs files it
needs to find at runtime.
Also mind that if you set LD_LIBRARY_PATH, depending on things, that
may get libraries loaded from a place you didn't intend to, e.g.
running a test suite and getting installed vs. freshly built libraries.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 833 bytes
Desc: OpenPGP digital signature
More information about the wayland-devel