Skip to content

Commit 36056e0

Browse files
authored
Don't use WMI (#114)
* Use `kernel32.dll` instead of WMI for better compatibility Use compile-time platform detection instead of runtime * Properly fetch process args on Linux * Properly credit Linux solution
1 parent 3d1588d commit 36056e0

File tree

5 files changed

+434
-187
lines changed

5 files changed

+434
-187
lines changed

RLBotCS/Main.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
if (args.Length > 0 && args[0] == "--version")
1010
{
11-
Console.WriteLine("RLBotServer v5.beta.6.8");
11+
Console.WriteLine("RLBotServer v5.beta.6.9");
1212
Environment.Exit(0);
1313
}
1414

RLBotCS/ManagerTools/ConfigParser.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,10 +201,11 @@ private string GetRunCommand(TomlTable runnableSettings)
201201
""
202202
);
203203

204-
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
205-
return runCommandWindows;
206-
204+
#if WINDOWS
205+
return runCommandWindows;
206+
#else
207207
return GetValue(runnableSettings, Fields.AgentRunCommandLinux, runCommandWindows);
208+
#endif
208209
}
209210

210211
private ScriptConfigurationT LoadScriptConfig(string scriptConfigPath)

0 commit comments

Comments
 (0)