Skip to content

Commit 5c45c85

Browse files
committed
Simpler approach to simply remove LD_LIBRARY_PATH from our environment variables before launching our popen process
1 parent ea28817 commit 5c45c85

File tree

2 files changed

+11
-13
lines changed

2 files changed

+11
-13
lines changed

src/windows/title_editor.py

+5-6
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,12 @@ def __init__(self, *args, edit_file_path=None, duplicate=False, **kwargs):
8989
# Track metrics
9090
track_metric_screen("title-screen")
9191

92+
# Get environment variables needed for launching a process without trying to load libraries
93+
# from our frozen app bundle
9294
self.env = dict(os.environ)
93-
if sys.platform == "linux" and os.path.exists('/lib/x86_64-linux-gnu/'):
94-
# If on Linux, verify we have the following LD library path defined.
95-
# This is needed for Inkscape to use the system libraries instead
96-
# of our AppImage libraries
97-
self.env['LD_LIBRARY_PATH'] = '/lib/x86_64-linux-gnu/'
98-
log.debug(f'Appending system path before launching inkscape: {self.env.get("LD_LIBRARY_PATH")}')
95+
if sys.platform == "linux":
96+
self.env.pop('LD_LIBRARY_PATH', None)
97+
log.debug('Removing custom LD_LIBRARY_PATH from environment variables when launching Inkscape')
9998

10099
# Initialize variables
101100
self.template_name = ""

src/windows/views/blender_listview.py

+6-7
Original file line numberDiff line numberDiff line change
@@ -751,14 +751,13 @@ def __init__(self, blend_file_path, target_script, preview_frame=0):
751751
self.version = None
752752
self.process = None
753753
self.canceled = False
754+
755+
# Get environment variables needed for launching a process without trying to load libraries
756+
# from our frozen app bundle
754757
self.env = dict(os.environ)
755-
if sys.platform == "linux" and os.path.exists('/lib/x86_64-linux-gnu/'):
756-
# If on Linux, verify we have the following LD library path defined.
757-
# This is needed for Blender to use the system libraries instead
758-
# of our AppImage libraries (i.e. our libtiff.so.5 is missing symbols,
759-
# compared to libtiff.so.5 on newer distros for some reason).
760-
self.env['LD_LIBRARY_PATH'] = '/lib/x86_64-linux-gnu/'
761-
log.debug(f'Appending system path before launching blender: {self.env.get("LD_LIBRARY_PATH")}')
758+
if sys.platform == "linux":
759+
self.env.pop('LD_LIBRARY_PATH', None)
760+
log.debug('Removing custom LD_LIBRARY_PATH from environment variables when launching Blender')
762761

763762
self.startupinfo = None
764763
if sys.platform == 'win32':

0 commit comments

Comments
 (0)