On Mon, 3 Jun 2019 08:38:12 +0100 adlo <adloco...@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?
Hi, you install the client to a specific path. You get the path from your build system. > 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 functions. 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. Thanks, pq
pgpSxrh1LqjvR.pgp
Description: OpenPGP digital signature
_______________________________________________ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel