build/install: fall back to Unix desktop

Instead of enumerating every Unix assume Freedesktop-compliant behavior.
In future Android may want to define its own flavor like OSX.
This commit is contained in:
Jan Beich
2015-06-07 14:13:00 +00:00
parent 5483384e44
commit fc7edb536d
2 changed files with 6 additions and 13 deletions

View File

@@ -36,10 +36,10 @@ namespace OpenRA
psi.RedirectStandardOutput = true;
var p = Process.Start(psi);
var kernelName = p.StandardOutput.ReadToEnd();
if (kernelName.Contains("Linux") || kernelName.Contains("BSD"))
return PlatformType.Linux;
if (kernelName.Contains("Darwin"))
return PlatformType.OSX;
else
return PlatformType.Linux;
}
catch { }