diff options
author | sr55 <[email protected]> | 2010-07-31 19:26:05 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2010-07-31 19:26:05 +0000 |
commit | 2f3fe64a4c9fcdcca221ee9b9a38dde176a19225 (patch) | |
tree | 831b88c814aa5bf5333e5691bf332696afadaad7 /win/C#/Functions/Main.cs | |
parent | 1137c419d3a1d4d0e53aba2ae6baaf48e1e33d0b (diff) |
WinGui:
- Simply the versioning of the Windows GUI so it's less confusing.
- GUI now only displays the CLI Version. The GUI will however check that it's own executable build revision is not greater than the CLI and report an error if it is.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3463 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/Functions/Main.cs')
-rw-r--r-- | win/C#/Functions/Main.cs | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/win/C#/Functions/Main.cs b/win/C#/Functions/Main.cs index 4d82fb13b..ebc3f3836 100644 --- a/win/C#/Functions/Main.cs +++ b/win/C#/Functions/Main.cs @@ -10,6 +10,7 @@ namespace Handbrake.Functions using System.Diagnostics;
using System.IO;
using System.Net;
+ using System.Reflection;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
@@ -345,18 +346,21 @@ namespace Handbrake.Functions public static void CheckForValidCliVersion()
{
// Make sure we have a recent version for svn builds
- string version = Properties.Settings.Default.hb_version;
- if (version.Contains("svn"))
+ string cli_version = Properties.Settings.Default.hb_version;
+ Version gui_version = Assembly.GetExecutingAssembly().GetName().Version;
+
+ if (cli_version.Contains("svn") || gui_version.Revision > 0)
{
- version = version.Replace("svn", string.Empty).Trim();
- int build;
- int.TryParse(version, out build);
- if (build < Properties.Settings.Default.hb_min_cli)
+ int gui_build, cli_build;
+ int.TryParse(gui_version.Revision.ToString(), out gui_build);
+ int.TryParse(Properties.Settings.Default.hb_version.Replace("svn", string.Empty), out cli_build);
+
+ if (gui_build > cli_build)
{
MessageBox.Show(
"It appears you are trying to use a CLI executable that is too old for this version of the HandBrake GUI.\n" +
"Please update the HandBrakeCLI.exe to a newer build.\n\n" +
- "HandBrake build Detected: " + Properties.Settings.Default.hb_version,
+ "HandBrake build Detected: " + cli_build,
"Error",
MessageBoxButtons.OK,
MessageBoxIcon.Error);
|