}\r
\r
/// <summary>\r
+ /// Check to make sure that the user has an up to date version of the CLI installed.\r
+ /// </summary>\r
+ public static void CheckForValidCliVersion()\r
+ {\r
+ // Make sure we have a recent version for svn builds\r
+ string version = Properties.Settings.Default.hb_version;\r
+ if (version.Contains("svn"))\r
+ {\r
+ version = version.Replace("svn", string.Empty).Trim();\r
+ int build;\r
+ int.TryParse(version, out build);\r
+ if (build < Properties.Settings.Default.hb_min_cli)\r
+ {\r
+ MessageBox.Show(\r
+ "It appears you are trying to use a CLI executable that is too old for this version of the HandBrake GUI.\n" +\r
+ "Please update the HandBrakeCLI.exe to a newer build.\n\n" +\r
+ "HandBrake Detected: " + Properties.Settings.Default.hb_version,\r
+ "Error",\r
+ MessageBoxButtons.OK,\r
+ MessageBoxIcon.Error);\r
+ return;\r
+ }\r
+ }\r
+ }\r
+\r
+ /// <summary>\r
/// Check if the queue recovery file contains records.\r
/// If it does, it means the last queue did not complete before HandBrake closed.\r
/// So, return a boolean if true. \r
return;\r
}\r
\r
- // Make sure we have a recent version for svn builds\r
- string version = Properties.Settings.Default.hb_version;\r
- if (version.Contains("svn"))\r
- {\r
- version = version.Replace("svn", string.Empty).Trim();\r
- int build;\r
- int.TryParse(version, out build);\r
- if (build < Properties.Settings.Default.hb_min_cli)\r
- {\r
- MessageBox.Show(\r
- "It appears you are trying to use a CLI executable that is too old for this version of the HandBrake GUI.\n" + \r
- "Please update the HandBrakeCLI.exe to a newer build. ",\r
- "Error",\r
- MessageBoxButtons.OK,\r
- MessageBoxIcon.Error);\r
- return;\r
- }\r
- }\r
-\r
// Check were not running on a screen that's going to cause some funnies to happen.\r
Screen scr = Screen.PrimaryScreen;\r
if ((scr.Bounds.Width < 1024) || (scr.Bounds.Height < 620))\r
InitializeComponent();\r
\r
// Update the users config file with the CLI version data.\r
- lblStatus.Text = "Setting Version Data ...";\r
+ lblStatus.Text = "Updating and Checking CLI Version Data ...";\r
Application.DoEvents();\r
Main.SetCliVersionData();\r
+ Main.CheckForValidCliVersion();\r
\r
// Show the form, but leave disabled until preloading is complete then show the main form\r
this.Enabled = false;\r