Report CPU arch in logs and sysinfo.
This commit is contained in:
@@ -321,7 +321,7 @@ namespace OpenRA
|
||||
if (!string.IsNullOrEmpty(supportDirArg))
|
||||
Platform.OverrideSupportDir(supportDirArg);
|
||||
|
||||
Console.WriteLine($"Platform is {Platform.CurrentPlatform}");
|
||||
Console.WriteLine($"Platform is {Platform.CurrentPlatform} ({Platform.CurrentArchitecture})");
|
||||
|
||||
// Load the engine version as early as possible so it can be written to exception logs
|
||||
try
|
||||
|
||||
@@ -13,6 +13,7 @@ using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace OpenRA
|
||||
{
|
||||
@@ -23,6 +24,7 @@ namespace OpenRA
|
||||
public static class Platform
|
||||
{
|
||||
public static PlatformType CurrentPlatform => LazyCurrentPlatform.Value;
|
||||
public static Architecture CurrentArchitecture => RuntimeInformation.ProcessArchitecture;
|
||||
public static readonly Guid SessionGUID = Guid.NewGuid();
|
||||
|
||||
static readonly Lazy<PlatformType> LazyCurrentPlatform = Exts.Lazy(GetCurrentPlatform);
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace OpenRA
|
||||
}
|
||||
|
||||
Log.Write("exception", $"Date: {DateTime.UtcNow:u}");
|
||||
Log.Write("exception", $"Operating System: {Platform.CurrentPlatform} ({Environment.OSVersion})");
|
||||
Log.Write("exception", $"Operating System: {Platform.CurrentPlatform} ({Platform.CurrentArchitecture}, {Environment.OSVersion})");
|
||||
Log.Write("exception", $"Runtime Version: {Platform.RuntimeVersion}", Platform.RuntimeVersion);
|
||||
Log.Write("exception", $"Installed Language: {CultureInfo.InstalledUICulture.TwoLetterISOLanguageName} (Installed) {CultureInfo.CurrentCulture.TwoLetterISOLanguageName} (Current) {CultureInfo.CurrentUICulture.TwoLetterISOLanguageName} (Current UI)");
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
public class SystemInfoPromptLogic : ChromeLogic
|
||||
{
|
||||
// Increment the version number when adding new stats
|
||||
const int SystemInformationVersion = 4;
|
||||
const int SystemInformationVersion = 5;
|
||||
|
||||
static Dictionary<string, (string Label, string Value)> GetSystemInformation()
|
||||
{
|
||||
@@ -29,6 +29,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
{ "id", ("Anonymous ID", Game.Settings.Debug.UUID) },
|
||||
{ "platform", ("OS Type", Platform.CurrentPlatform.ToString()) },
|
||||
{ "arch", ("Architecture", Platform.CurrentArchitecture.ToString()) },
|
||||
{ "os", ("OS Version", Environment.OSVersion.ToString()) },
|
||||
{ "x64", ("OS is 64 bit", Environment.Is64BitOperatingSystem.ToString()) },
|
||||
{ "x64process", ("Process is 64 bit", Environment.Is64BitProcess.ToString()) },
|
||||
|
||||
Reference in New Issue
Block a user