Formatted all files.
Automatically formatted all files via VS. This generally corrects indentation, removes trailing whitespace and corrects misplaced tabs or spaces. Manually tweaked a few files where required.
This commit is contained in:
@@ -26,24 +26,24 @@ namespace OpenRA
|
||||
|
||||
static PlatformType GetCurrentPlatform()
|
||||
{
|
||||
if (Environment.OSVersion.Platform == PlatformID.Win32NT)
|
||||
return PlatformType.Windows;
|
||||
if (Environment.OSVersion.Platform == PlatformID.Win32NT)
|
||||
return PlatformType.Windows;
|
||||
|
||||
try
|
||||
{
|
||||
var psi = new ProcessStartInfo("uname", "-s");
|
||||
psi.UseShellExecute = false;
|
||||
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;
|
||||
}
|
||||
catch { }
|
||||
try
|
||||
{
|
||||
var psi = new ProcessStartInfo("uname", "-s");
|
||||
psi.UseShellExecute = false;
|
||||
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;
|
||||
}
|
||||
catch { }
|
||||
|
||||
return PlatformType.Unknown;
|
||||
return PlatformType.Unknown;
|
||||
}
|
||||
|
||||
public static string RuntimeVersion
|
||||
@@ -58,7 +58,7 @@ namespace OpenRA
|
||||
if (version == null)
|
||||
return "Mono (unknown version) CLR {0}".F(Environment.Version);
|
||||
|
||||
return "Mono {0} CLR {1}".F(version.Invoke(null, null), Environment.Version);
|
||||
return "Mono {0} CLR {1}".F(version.Invoke(null, null), Environment.Version);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,16 +75,16 @@ namespace OpenRA
|
||||
|
||||
switch (CurrentPlatform)
|
||||
{
|
||||
case PlatformType.Windows:
|
||||
dir += Path.DirectorySeparatorChar + "OpenRA";
|
||||
break;
|
||||
case PlatformType.OSX:
|
||||
dir += "/Library/Application Support/OpenRA";
|
||||
break;
|
||||
case PlatformType.Linux:
|
||||
default:
|
||||
dir += "/.openra";
|
||||
break;
|
||||
case PlatformType.Windows:
|
||||
dir += Path.DirectorySeparatorChar + "OpenRA";
|
||||
break;
|
||||
case PlatformType.OSX:
|
||||
dir += "/Library/Application Support/OpenRA";
|
||||
break;
|
||||
case PlatformType.Linux:
|
||||
default:
|
||||
dir += "/.openra";
|
||||
break;
|
||||
}
|
||||
|
||||
if (!Directory.Exists(dir))
|
||||
|
||||
Reference in New Issue
Block a user