From 3401665c6712b25511383c8a068b08f364d36233 Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Wed, 9 Oct 2024 21:19:05 +1100 Subject: [PATCH] Really fix old mono compilers --- MCGalaxy/Modules/Compiling/CompilerBackends.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/MCGalaxy/Modules/Compiling/CompilerBackends.cs b/MCGalaxy/Modules/Compiling/CompilerBackends.cs index 80a123483..cd49859d8 100644 --- a/MCGalaxy/Modules/Compiling/CompilerBackends.cs +++ b/MCGalaxy/Modules/Compiling/CompilerBackends.cs @@ -193,9 +193,12 @@ namespace MCGalaxy.Modules.Compiling string root = RuntimeEnvironment.GetRuntimeDirectory(); string[] paths = new string[] { - Path.Combine(root, "csc.exe"), // C# compiler - Path.Combine(root, @"../bin/mcs"), // old Mono C# compiler - Path.Combine(root, "mcs.exe"), // old Mono C# compiler + // First try new C# compiler + Path.Combine(root, "csc.exe"), + // Then fallback to old Mono C# compiler + Path.Combine(root, @"../../../bin/mcs"), + Path.Combine(root, "mcs.exe"), + "/usr/bin/mcs", }; foreach (string path in paths)