Skip to content

Commit

Permalink
Improve OS version reporting.
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter-Simpson committed Oct 15, 2024
1 parent c6ae6ea commit d23f47c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1016,14 +1016,19 @@ public virtual void InitialiseTest()
LogTestOnly($"ASCOM Universal Device Conformance Checker Version {this.GetType().Assembly.GetName().Version}, Build time: {lastModifiedTime:ddd dd MMMM yyyy HH:mm:ss}");
LogNewLine(); // Blank line

// Set the architecture and bitness
string architecture = RuntimeInformation.ProcessArchitecture == Architecture.Arm64 ? "ARM" : "Intel";
string osBitness = Environment.Is64BitOperatingSystem ? "64" : "32";
string processBitness = Environment.Is64BitProcess ? "64" : "32"+OperatingSystem.pl;

// Set the OS name depending on whether or not it is Windows
string osName;
#if WINDOWS
osName = ASCOM.Com.PlatformUtilities.OSBuildName();
#else
osName = RuntimeInformation.OSDescription;
#endif
LogTestOnly($"Operating system is {osName} {(Environment.Is64BitOperatingSystem ? "64bit" : "32bit")}, Application is {(Environment.Is64BitProcess ? "64bit" : "32bit")}.");
LogTestOnly($"Operating system is {osName}, Processor is {architecture} {osBitness}bit, Application is {processBitness}bit.");
LogNewLine(); // Blank line

switch (settings.DeviceTechnology)
Expand Down
2 changes: 1 addition & 1 deletion ConformU/Pages/Index.razor
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@

string processBitness = Environment.Is64BitProcess ? "64bit" : "32bit";
string osBitness = Environment.Is64BitOperatingSystem ? "64bit" : "32bit";
string architecture = RuntimeInformation.ProcessArchitecture == Architecture.Arm64 ? "ARM" : "Intel";
string architecture = RuntimeInformation.ProcessArchitecture == Architecture.Arm64 ? "ARM" : "Intel/AMD";
string osName;

// Select the best descriptive name depending on OS.
Expand Down

0 comments on commit d23f47c

Please sign in to comment.