diff options
| author | SulfurNitride <SulfurNitride@users.noreply.github.com> | 2026-03-28 16:32:48 -0500 |
|---|---|---|
| committer | SulfurNitride <SulfurNitride@users.noreply.github.com> | 2026-03-28 16:32:48 -0500 |
| commit | 659891db4f26d52ee58e18c470a45522087bee83 (patch) | |
| tree | 4553b152c065882e49f03a4e7eb0b7ee4de1fd3e /src | |
| parent | 14e1301e55a16b238be291627509ad72870ef24a (diff) | |
Clean bundled library paths before launching winetricks
Winetricks spawns kdialog/zenity for its GUI, which inherit
Fluorine's LD_LIBRARY_PATH pointing at bundled Qt .so files.
On SteamOS (Steam Deck) this causes symbol lookup errors in
the system kdialog. Restore the original host library paths
from FLUORINE_ORIG_* env vars before launching winetricks.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'src')
| -rw-r--r-- | src/src/settingsdialogproton.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/src/settingsdialogproton.cpp b/src/src/settingsdialogproton.cpp index bd14944..96906fa 100644 --- a/src/src/settingsdialogproton.cpp +++ b/src/src/settingsdialogproton.cpp @@ -467,6 +467,25 @@ void ProtonSettingsTab::onWinetricks() arguments << QStringLiteral("--gui"); QProcessEnvironment env = QProcessEnvironment::systemEnvironment(); + + // Restore the original host LD_LIBRARY_PATH so that winetricks (and any + // GUI helpers it spawns, e.g. kdialog/zenity) don't pick up Fluorine's + // bundled Qt libraries, which cause symbol-lookup errors on SteamOS. + auto restoreOrig = [&](const QString& var, const QString& origVar) { + if (env.contains(origVar)) { + const QString orig = env.value(origVar); + if (orig.isEmpty()) + env.remove(var); + else + env.insert(var, orig); + env.remove(origVar); + } + }; + restoreOrig("LD_LIBRARY_PATH", "FLUORINE_ORIG_LD_LIBRARY_PATH"); + restoreOrig("LD_PRELOAD", "FLUORINE_ORIG_LD_PRELOAD"); + restoreOrig("QT_PLUGIN_PATH", "FLUORINE_ORIG_QT_PLUGIN_PATH"); + env.remove("QT_QPA_PLATFORM_PLUGIN_PATH"); + for (const QString& flag : envFlags) { const int eq = flag.indexOf('='); if (eq > 0) { |
