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. --- libs/plugin_python/src/mobase/wrappers/pyplugins.cpp | 1 + libs/plugin_python/src/mobase/wrappers/pyplugins.h | 4 ++++ 2 files changed, 5 insertions(+) (limited to 'libs/plugin_python/src/mobase') diff --git a/libs/plugin_python/src/mobase/wrappers/pyplugins.cpp b/libs/plugin_python/src/mobase/wrappers/pyplugins.cpp index bcce0df..c744c7b 100644 --- a/libs/plugin_python/src/mobase/wrappers/pyplugins.cpp +++ b/libs/plugin_python/src/mobase/wrappers/pyplugins.cpp @@ -52,6 +52,7 @@ namespace mo2::python { "settings"_a) .def("listSaves", &IPluginGame::listSaves, "folder"_a) .def("isInstalled", &IPluginGame::isInstalled) + .def("isNativeLinux", &IPluginGame::isNativeLinux) .def("gameIcon", &IPluginGame::gameIcon) .def("gameDirectory", &IPluginGame::gameDirectory) .def("dataDirectory", &IPluginGame::dataDirectory) diff --git a/libs/plugin_python/src/mobase/wrappers/pyplugins.h b/libs/plugin_python/src/mobase/wrappers/pyplugins.h index 17f7ab5..ce9a911 100644 --- a/libs/plugin_python/src/mobase/wrappers/pyplugins.h +++ b/libs/plugin_python/src/mobase/wrappers/pyplugins.h @@ -385,6 +385,10 @@ namespace mo2::python { { PYBIND11_OVERRIDE_PURE(bool, IPluginGame, isInstalled, ); } + bool isNativeLinux() const override + { + PYBIND11_OVERRIDE(bool, IPluginGame, isNativeLinux, ); + } QIcon gameIcon() const override { PYBIND11_OVERRIDE_PURE(QIcon, IPluginGame, gameIcon, ); -- cgit v1.3.1