From 7e8233fc97e2a1ef3b66c4b9ff0f9be5c887da99 Mon Sep 17 00:00:00 2001 From: Juan Diego Herrera Date: Wed, 2 Nov 2022 12:57:06 -0700 Subject: [PATCH] Add Extended Version info to XamMac Having an easy way to access the SDK's is convenient since this information is retrieved by the IDE. --- Xamarin.MacDev/ExtendedVersion.cs | 2 +- Xamarin.MacDev/XamMacSdk.cs | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/Xamarin.MacDev/ExtendedVersion.cs b/Xamarin.MacDev/ExtendedVersion.cs index 0011ee9..5a7e42d 100644 --- a/Xamarin.MacDev/ExtendedVersion.cs +++ b/Xamarin.MacDev/ExtendedVersion.cs @@ -33,7 +33,7 @@ namespace Xamarin.MacDev { case "Branch": rv.Branch = value; break; - case "BuildDate": + case "Build date": rv.BuildDate = value; break; } diff --git a/Xamarin.MacDev/XamMacSdk.cs b/Xamarin.MacDev/XamMacSdk.cs index 13cc502..c8b6348 100644 --- a/Xamarin.MacDev/XamMacSdk.cs +++ b/Xamarin.MacDev/XamMacSdk.cs @@ -27,6 +27,7 @@ namespace Xamarin.MacDev { string monoMacAppLauncherPath; PDictionary versions; + ExtendedVersion extended_version; public bool IsInstalled { get; private set; } @@ -303,5 +304,17 @@ namespace Xamarin.MacDev { public bool SupportsSiriIntents { get { return CheckSupportsFeature ("siri-intents"); } } + + public ExtendedVersion ExtendedVersion + { + get + { + if (extended_version == null) + { + extended_version = ExtendedVersion.Read(Path.Combine(FrameworkDirectory, "buildinfo")); + } + return extended_version; + } + } } }