Merge pull request #45715 from bruvzg/mono_dotnet_path

[Mono] Use the same search logic for both `MSBuild` and `dotnet`.
This commit is contained in:
Rémi Verschelde 2021-02-05 09:29:16 +01:00 committed by GitHub
commit a7a51fb326
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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.IsMacOS)
{
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/");