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 +++++++- win/CS/HandBrakeWPF/Installer/MakeNightly.nsi | 2 +- win/CS/HandBrakeWPF/Installer/MakeNightly64.nsi | 2 +- 4 files changed, 19 insertions(+), 3 deletions(-) (limited to 'win/CS') 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); } /// diff --git a/win/CS/HandBrakeWPF/Installer/MakeNightly.nsi b/win/CS/HandBrakeWPF/Installer/MakeNightly.nsi index 4ae8fd1e6..a39055fe3 100644 --- a/win/CS/HandBrakeWPF/Installer/MakeNightly.nsi +++ b/win/CS/HandBrakeWPF/Installer/MakeNightly.nsi @@ -9,7 +9,7 @@ ; HM NIS Edit Wizard helper defines !define PRODUCT_NAME "HandBrake" !define PRODUCT_VERSION "Nightly" -!define PRODUCT_VERSION_NUMBER "0.10.3.Nightly" +!define PRODUCT_VERSION_NUMBER "Nightly" !define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\HandBrake.exe" !define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" !define PRODUCT_UNINST_ROOT_KEY "HKLM" diff --git a/win/CS/HandBrakeWPF/Installer/MakeNightly64.nsi b/win/CS/HandBrakeWPF/Installer/MakeNightly64.nsi index 1459a52cd..76746b032 100644 --- a/win/CS/HandBrakeWPF/Installer/MakeNightly64.nsi +++ b/win/CS/HandBrakeWPF/Installer/MakeNightly64.nsi @@ -9,7 +9,7 @@ ; HM NIS Edit Wizard helper defines !define PRODUCT_NAME "HandBrake" !define PRODUCT_VERSION "Nightly" -!define PRODUCT_VERSION_NUMBER "0.10.3.Nightly" +!define PRODUCT_VERSION_NUMBER "Nightly" !define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\HandBrake.exe" !define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" !define PRODUCT_UNINST_ROOT_KEY "HKLM" -- cgit v1.2.3