From f8d99c4f4d03348eb477f812c1769e670a19eb42 Mon Sep 17 00:00:00 2001 From: SulfurNitride Date: Wed, 11 Mar 2026 04:07:39 -0500 Subject: Fix LOOT launch: clean QT_PLUGIN_PATH and LD_LIBRARY_PATH from env MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit LOOT's AppImage bundles its own Qt — inheriting Fluorine's QT_PLUGIN_PATH caused incompatible Qt plugin loading (exit code 6). Also clean LD_LIBRARY_PATH when the original was empty. Co-Authored-By: Claude Opus 4.6 --- src/src/loot.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/src/loot.cpp b/src/src/loot.cpp index 00c66e2..794cc9b 100644 --- a/src/src/loot.cpp +++ b/src/src/loot.cpp @@ -1381,12 +1381,21 @@ static bool launchLootGui(QWidget* parent, OrganizerCore& core) lootProcess.setProgram(appImage); lootProcess.setArguments(args); - // Restore the original environment if running from AppImage so LOOT - // doesn't inherit Fluorine's bundled library paths. + // Restore the original environment so LOOT's AppImage doesn't inherit + // Fluorine's bundled library/plugin paths (which are incompatible with + // LOOT's own bundled Qt). QProcessEnvironment env = QProcessEnvironment::systemEnvironment(); QString origLdPath = env.value("FLUORINE_ORIG_LD_LIBRARY_PATH"); if (!origLdPath.isEmpty()) { env.insert("LD_LIBRARY_PATH", origLdPath); + } else { + env.remove("LD_LIBRARY_PATH"); + } + QString origQtPluginPath = env.value("FLUORINE_ORIG_QT_PLUGIN_PATH"); + if (!origQtPluginPath.isEmpty()) { + env.insert("QT_PLUGIN_PATH", origQtPluginPath); + } else { + env.remove("QT_PLUGIN_PATH"); } QString origPath = env.value("FLUORINE_ORIG_PATH"); if (!origPath.isEmpty()) { -- cgit v1.3.1