From 32f442e8da91b8766333abc9ba6b69946701d8db Mon Sep 17 00:00:00 2001 From: Scott Date: Sat, 29 Aug 2015 14:51:45 +0100 Subject: WinGui: Update the GUI to handle the version information correctly after the git move. --- .../Interop/Interfaces/IHandBrakeInstance.cs | 10 ++++++++++ .../HandBrake.ApplicationServices/Utilities/VersionHelper.cs | 8 +++++++- 2 files changed, 17 insertions(+), 1 deletion(-) (limited to 'win/CS/HandBrake.ApplicationServices') diff --git a/win/CS/HandBrake.ApplicationServices/Interop/Interfaces/IHandBrakeInstance.cs b/win/CS/HandBrake.ApplicationServices/Interop/Interfaces/IHandBrakeInstance.cs index 8230e6620..0c231cbac 100644 --- a/win/CS/HandBrake.ApplicationServices/Interop/Interfaces/IHandBrakeInstance.cs +++ b/win/CS/HandBrake.ApplicationServices/Interop/Interfaces/IHandBrakeInstance.cs @@ -58,6 +58,16 @@ namespace HandBrake.ApplicationServices.Interop.Interfaces /// JsonScanObject Titles { get; } + /// + /// Gets the HandBrake version string. + /// + string Version { get; } + + /// + /// Gets the HandBrake build number. + /// + int Build { get; } + #endregion #region Public Methods diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/VersionHelper.cs b/win/CS/HandBrake.ApplicationServices/Utilities/VersionHelper.cs index b1a90d3e0..47673c112 100644 --- a/win/CS/HandBrake.ApplicationServices/Utilities/VersionHelper.cs +++ b/win/CS/HandBrake.ApplicationServices/Utilities/VersionHelper.cs @@ -12,6 +12,9 @@ namespace HandBrake.ApplicationServices.Utilities using System; using System.Reflection; + using HandBrake.ApplicationServices.Interop; + using HandBrake.ApplicationServices.Interop.Interfaces; + /// /// Version Utility /// @@ -26,7 +29,10 @@ namespace HandBrake.ApplicationServices.Utilities public static string GetVersion() { Version version = Assembly.GetEntryAssembly().GetName().Version; - return IsNightly() ? string.Format("svn{0} (Nightly Build)", version.Revision) : string.Format("{0}.{1}.{2}.{3}", version.Major, version.Minor, version.Build, version.Revision); + + IHandBrakeInstance instance = HandBrakeInstanceManager.GetScanInstance(1); + + return IsNightly() ? string.Format("Nightly {0} ({1})", instance.Version, instance.Build) : string.Format("{0}.{1}.{2}.{3}", version.Major, version.Minor, version.Build, version.Revision); } /// -- cgit v1.2.3