Skip to content

Commit 9b0fccd

Browse files
committed
Merge remote-tracking branch 'origin/release-20221201' into release-20221201
2 parents 59dd113 + 46603be commit 9b0fccd

File tree

2 files changed

+15
-7
lines changed

2 files changed

+15
-7
lines changed

src/windows/title_editor.py

+9-1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
import os
3030
import re
3131
import shutil
32+
import sys
3233
import functools
3334
import subprocess
3435
import tempfile
@@ -88,6 +89,13 @@ def __init__(self, *args, edit_file_path=None, duplicate=False, **kwargs):
8889
# Track metrics
8990
track_metric_screen("title-screen")
9091

92+
# Get environment variables needed for launching a process without trying to load libraries
93+
# from our frozen app bundle
94+
self.env = dict(os.environ)
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')
98+
9199
# Initialize variables
92100
self.template_name = ""
93101
imp = minidom.getDOMImplementation()
@@ -624,7 +632,7 @@ def btnAdvanced_clicked(self):
624632
try:
625633
# launch advanced title editor
626634
log.info("Advanced title editor command: %s", str([prog, self.filename]))
627-
p = subprocess.Popen([prog, self.filename])
635+
p = subprocess.Popen([prog, self.filename], env=self.env)
628636
# wait for process to finish, then update preview
629637
p.communicate()
630638
self.load_svg_template(filename_field=filename_text)

src/windows/views/blender_listview.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -751,13 +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/'
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')
761761

762762
self.startupinfo = None
763763
if sys.platform == 'win32':

0 commit comments

Comments
 (0)