diff --git a/release/bin/blender-launcher b/release/bin/blender-launcher new file mode 100755 index 00000000000..521e2c82199 --- /dev/null +++ b/release/bin/blender-launcher @@ -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+"$@"} diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt index 11f48a72908..b472a60ff9d 100644 --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt @@ -515,6 +515,7 @@ if(UNIX AND NOT APPLE) install( PROGRAMS + ${CMAKE_SOURCE_DIR}/release/bin/blender-launcher ${CMAKE_SOURCE_DIR}/release/bin/blender-softwaregl DESTINATION "." )