mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-20 21:59:12 +08:00
Make sure the plugin runs with LD_LIBRARY_PATH
Not sure why the environment isn't taken over. Contribute to CURA-11356
This commit is contained in:
parent
524a31f02b
commit
f9ad274e28
@ -92,10 +92,13 @@ class BackendPlugin(AdditionalSettingDefinitionsAppender, PluginObject):
|
|||||||
"stderr": subprocess.STDOUT, # Combine stderr and stdout
|
"stderr": subprocess.STDOUT, # Combine stderr and stdout
|
||||||
"env": os.environ
|
"env": os.environ
|
||||||
}
|
}
|
||||||
|
run_prep_cmd = ""
|
||||||
if Platform.isWindows():
|
if Platform.isWindows():
|
||||||
popen_kwargs["creationflags"] = subprocess.CREATE_NO_WINDOW
|
popen_kwargs["creationflags"] = subprocess.CREATE_NO_WINDOW
|
||||||
|
else:
|
||||||
|
run_prep_cmd = f"LD_LIBRARY_PATH={os.environ['LD_LIBRARY_PATH']}:$LD_LIBRARY_PATH "
|
||||||
Logger.info(f"Starting plugin with: {popen_kwargs}")
|
Logger.info(f"Starting plugin with: {popen_kwargs}")
|
||||||
self._process = subprocess.Popen(self._validatePluginCommand(), **popen_kwargs)
|
self._process = subprocess.Popen(f"{run_prep_cmd}{self._validatePluginCommand()}", **popen_kwargs)
|
||||||
self._is_running = True
|
self._is_running = True
|
||||||
return True
|
return True
|
||||||
except PermissionError:
|
except PermissionError:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user