Skip to content

Commit

Permalink
Really fix old mono compilers
Browse files Browse the repository at this point in the history
  • Loading branch information
UnknownShadow200 committed Oct 9, 2024
1 parent 29e205e commit 3401665
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions MCGalaxy/Modules/Compiling/CompilerBackends.cs
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,12 @@ protected override string GetExecutable() {
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)
Expand Down

0 comments on commit 3401665

Please sign in to comment.