Linux: add launcher script to fix issue launching on Steam

The steam environment sets LD_LIBRARY_PATH with a libtbb.so.2 that is
incompatible with our own. This wrapper scripts gives our own library
priority.

There is a more modern "Steam Linux Runtime" that can be used instead of
the "LD_LIBRARY_PATH Steam Runtime" and which launches Blender, but it
fails to detect GPU compute libraries. So that was not an option.

Ref #107385

Pull Request: https://projects.blender.org/blender/blender/pulls/109169
This commit is contained in:
Brecht Van Lommel
2023-06-21 14:49:27 +02:00
committed by Brecht Van Lommel
parent 9f30555faf
commit 17fa168a3d
3 changed files with 14 additions and 1 deletions

12
release/bin/blender-launcher Executable file
View File

@@ -0,0 +1,12 @@
#!/bin/sh
BF_DIST_BIN=$(dirname "$0")
BF_PROGRAM="blender"
# Add own lib folder first, because Steam or other environments may set an
# LD_LIBRARY_PATH that has priority over the runpath in the Blender excutable,
# but contains incompatible libraries.
LD_LIBRARY_PATH=${BF_DIST_BIN}/lib:${LD_LIBRARY_PATH}
export LD_LIBRARY_PATH
exec "$BF_DIST_BIN/$BF_PROGRAM" ${1+"$@"}