diff options
| author | SulfurNitride <SulfurNitride@users.noreply.github.com> | 2026-03-31 12:56:24 -0500 |
|---|---|---|
| committer | SulfurNitride <SulfurNitride@users.noreply.github.com> | 2026-03-31 12:56:24 -0500 |
| commit | 50d5566021badb77582da7fe501ba1902a8786ab (patch) | |
| tree | e5caf9c9c2c50ef632fdd2dbbf5144b681fa7d40 /src | |
| parent | 9278985013ce92992b7e3d89eea240af4b72d84e (diff) | |
Fix zenity symbol lookup errors when launching winetricks
The restoreOrig lambda only restored env vars when FLUORINE_ORIG_* was
set, with no fallback. If those vars were missing, bundled library paths
leaked into winetricks/zenity causing FcConfigSetDefaultSubstitute
symbol errors. Now uses the same restoreOrStrip pattern as
protonlauncher.cpp — strip paths containing "fluorine" as fallback.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'src')
| -rw-r--r-- | src/src/settingsdialogproton.cpp | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/src/src/settingsdialogproton.cpp b/src/src/settingsdialogproton.cpp index 96906fa..5efc7c6 100644 --- a/src/src/settingsdialogproton.cpp +++ b/src/src/settingsdialogproton.cpp @@ -470,8 +470,9 @@ void ProtonSettingsTab::onWinetricks() // 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) { + // bundled Qt libraries, which cause symbol-lookup errors. + // Uses the same restore-or-strip logic as protonlauncher.cpp. + auto restoreOrStrip = [&](const QString& var, const QString& origVar) { if (env.contains(origVar)) { const QString orig = env.value(origVar); if (orig.isEmpty()) @@ -479,11 +480,27 @@ void ProtonSettingsTab::onWinetricks() else env.insert(var, orig); env.remove(origVar); + } else { + // Fallback: strip Fluorine's bundled library paths by pattern. + const QString value = env.value(var); + if (value.isEmpty()) return; + QStringList kept; + for (const QString& p : value.split(':')) { + if (p.contains("fluorine") || p.contains(".mount_Fluori")) { + continue; + } + kept.append(p); + } + if (kept.isEmpty()) { + env.remove(var); + } else { + env.insert(var, kept.join(':')); + } } }; - 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"); + restoreOrStrip("LD_LIBRARY_PATH", "FLUORINE_ORIG_LD_LIBRARY_PATH"); + restoreOrStrip("LD_PRELOAD", "FLUORINE_ORIG_LD_PRELOAD"); + restoreOrStrip("QT_PLUGIN_PATH", "FLUORINE_ORIG_QT_PLUGIN_PATH"); env.remove("QT_QPA_PLATFORM_PLUGIN_PATH"); for (const QString& flag : envFlags) { |
