nowrep / obs-vkcapture

OBS Linux Vulkan/OpenGL game capture
GNU General Public License v2.0
532 stars 25 forks source link

Add LD_LIBRARY_PATH to obs-glcapture #50

Closed SuNNjek closed 2 years ago

SuNNjek commented 2 years ago

This adds the path of the library to LD_LIBRARY_PATH so that libobs-glcapture.so will always be found, even when installed in a non-standard location. See also https://github.com/flathub/flathub/pull/2707#discussion_r776009837, as this is necessary for the flatpak. Currently the flatpak is using a patch that hardcodes the path, so there is no need for a new version for this. This just eliminates the need for the patch in the future.

nowrep commented 2 years ago

This isn't going to work if you have both 32 and 64bit installed (it will only pick the 64bit lib).

SuNNjek commented 2 years ago

Are you sure? From what I can find $LIB gets expanded depending on the runtime platform of the program. See for example https://unix.stackexchange.com/a/494621

nowrep commented 2 years ago

Yes it won't work if you install 32bit and 64bit to completely different locations since there is nothing to ensure you won't do that (32 and 64bit builds are separate).

But alright, it's definitely better than the current code.