From 202c2b0ea3f7c196f9da1d8b3fabab388f2c1033 Mon Sep 17 00:00:00 2001 From: VirxEC Date: Mon, 1 Jun 2026 23:20:16 -0500 Subject: [PATCH] Use Wine as fallback for Windows commands on Linux --- RLBotCS/ManagerTools/ConfigParser.cs | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/RLBotCS/ManagerTools/ConfigParser.cs b/RLBotCS/ManagerTools/ConfigParser.cs index 5062421..82712fc 100644 --- a/RLBotCS/ManagerTools/ConfigParser.cs +++ b/RLBotCS/ManagerTools/ConfigParser.cs @@ -225,16 +225,21 @@ private PlayerClass GetAgentType(TomlTable table) private string GetRunCommand(TomlTable runnableSettings) { - string runCommandWindows = GetValue( - runnableSettings, - Fields.AgentRunCommand, - "" - ); + string runCommandWindows = GetValue(runnableSettings, Fields.AgentRunCommand, ""); #if WINDOWS return runCommandWindows; #else - return GetValue(runnableSettings, Fields.AgentRunCommandLinux, runCommandWindows); + string runCommandLinux = GetValue(runnableSettings, Fields.AgentRunCommandLinux, ""); + + if (!string.IsNullOrEmpty(runCommandLinux)) + return runCommandLinux; + + // No Linux run command specified; try to run the Windows command via Wine. + if (!string.IsNullOrEmpty(runCommandWindows)) + return $"wine {runCommandWindows}"; + + return ""; #endif }