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