From d06dd9bf82040ad67a6f12fb92fb411770d63f28 Mon Sep 17 00:00:00 2001 From: SulfurNitride Date: Sat, 25 Apr 2026 20:27:53 -0500 Subject: Detect native-Linux Stardew Valley, default executables to no-Proton MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add IPluginGame::isNativeLinux() (virtual, default false) so a plugin can advertise that the discovered installation is a native Linux build. Bound through the Python plugin trampoline so basic_games subclasses can override it. Stardew Valley plugin: when the install dir contains the StardewValley launcher script and no Stardew Valley.exe, report isNativeLinux=true and return Linux-side binary names (StardewValley, StardewModdingAPI). Also fix GameDataPath to "Mods" — Linux ships the SMAPI mods dir with a capital M. ExecutablesList::getPluginExecutables: skip the UseProton flag when the plugin reports native Linux, so the spawn path falls into launchDirect() and the game runs without a Wine prefix. --- src/src/executableslist.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/src/executableslist.cpp b/src/src/executableslist.cpp index f12a74c..459d25c 100644 --- a/src/src/executableslist.cpp +++ b/src/src/executableslist.cpp @@ -150,12 +150,21 @@ ExecutablesList::getPluginExecutables(MOBase::IPluginGame const* game) const std::vector v; + // Native Linux installs (e.g. native Stardew Valley) launch directly without + // Proton. Their executables default to UseProton=false so the user doesn't + // have to flip every entry by hand after instance creation. + const bool nativeLinux = game->isNativeLinux(); + for (const ExecutableInfo& info : game->executables()) { if (!info.isValid()) { continue; } - v.push_back({info, Executable::UseApplicationIcon | Executable::UseProton}); + Executable::Flags flags = Executable::UseApplicationIcon; + if (!nativeLinux) { + flags |= Executable::UseProton; + } + v.push_back({info, flags}); } const QFileInfo eppBin(QCoreApplication::applicationDirPath() + -- cgit v1.3.1