[Mono] Use the same search logic for both MSBuild and dotnet, add custom search paths on macOS.

(cherry picked from commit e304f716c7)
This commit is contained in:
bruvzg 2021-02-04 22:39:38 +02:00 committed by Rémi Verschelde
parent 1749cc4da8
commit 9e4cecc8ea

View file

@ -86,7 +86,7 @@ namespace GodotTools.Build
{
case BuildTool.DotnetCli:
{
string dotnetCliPath = OS.PathWhich("dotnet");
string dotnetCliPath = FindBuildEngineOnUnix("dotnet");
if (!string.IsNullOrEmpty(dotnetCliPath))
return (dotnetCliPath, BuildTool.DotnetCli);
GD.PushError($"Cannot find executable for '{BuildManager.PropNameDotnetCli}'. Fallback to MSBuild from Mono.");
@ -122,7 +122,11 @@ namespace GodotTools.Build
if (OS.IsOSX)
{
result.Add("/Library/Frameworks/Mono.framework/Versions/Current/bin/");
result.Add("/opt/local/bin/");
result.Add("/usr/local/var/homebrew/linked/mono/bin/");
result.Add("/usr/local/bin/");
result.Add("/usr/local/bin/dotnet/");
result.Add("/usr/local/share/dotnet/");
}
result.Add("/opt/novell/mono/bin/");