using System.Diagnostics;\r
using System.IO;\r
using System.Net;\r
+ using System.Reflection;\r
using System.Text;\r
using System.Text.RegularExpressions;\r
using System.Threading;\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
+ string cli_version = Properties.Settings.Default.hb_version;\r
+ Version gui_version = Assembly.GetExecutingAssembly().GetName().Version;\r
+\r
+ if (cli_version.Contains("svn") || gui_version.Revision > 0)\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
+ int gui_build, cli_build;\r
+ int.TryParse(gui_version.Revision.ToString(), out gui_build);\r
+ int.TryParse(Properties.Settings.Default.hb_version.Replace("svn", string.Empty), out cli_build);\r
+\r
+ if (gui_build > cli_build)\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 build Detected: " + Properties.Settings.Default.hb_version,\r
+ "HandBrake build Detected: " + cli_build,\r
"Error",\r
MessageBoxButtons.OK,\r
MessageBoxIcon.Error);\r
//------------------------------------------------------------------------------\r
// <auto-generated>\r
// This code was generated by a tool.\r
-// Runtime Version:4.0.30319.1\r
+// Runtime Version:2.0.50727.4927\r
//\r
// Changes to this file may cause incorrect behavior and will be lost if\r
// the code is regenerated.\r
\r
\r
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]\r
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]\r
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")]\r
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {\r
\r
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));\r
\r
[global::System.Configuration.UserScopedSettingAttribute()]\r
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
- [global::System.Configuration.DefaultSettingValueAttribute("3378")]\r
- public int hb_min_cli {\r
- get {\r
- return ((int)(this["hb_min_cli"]));\r
- }\r
- set {\r
- this["hb_min_cli"] = value;\r
- }\r
- }\r
- \r
- [global::System.Configuration.UserScopedSettingAttribute()]\r
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
[global::System.Configuration.DefaultSettingValueAttribute("True")]\r
public bool UpdateRequired {\r
get {\r
<Setting Name="AutoNameRemoveUnderscore" Type="System.Boolean" Scope="User">\r
<Value Profile="(Default)">False</Value>\r
</Setting>\r
- <Setting Name="hb_min_cli" Type="System.Int32" Scope="User">\r
- <Value Profile="(Default)">3378</Value>\r
- </Setting>\r
<Setting Name="UpdateRequired" Type="System.Boolean" Scope="User">\r
<Value Profile="(Default)">True</Value>\r
</Setting>\r
<setting name="AutoNameRemoveUnderscore" serializeAs="String">\r
<value>False</value>\r
</setting>\r
- <setting name="hb_min_cli" serializeAs="String">\r
- <value>3378</value>\r
- </setting>\r
<setting name="UpdateRequired" serializeAs="String">\r
<value>True</value>\r
</setting>\r
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmAbout));\r
this.Label3 = new System.Windows.Forms.Label();\r
this.label1 = new System.Windows.Forms.Label();\r
- this.lbl_HBBuild = new System.Windows.Forms.Label();\r
this.PictureBox1 = new System.Windows.Forms.PictureBox();\r
this.btn_close = new System.Windows.Forms.Button();\r
this.richTextBox1 = new System.Windows.Forms.RichTextBox();\r
// label1\r
// \r
this.label1.AutoSize = true;\r
- this.label1.Location = new System.Drawing.Point(125, 64);\r
+ this.label1.Location = new System.Drawing.Point(125, 47);\r
this.label1.Margin = new System.Windows.Forms.Padding(3);\r
this.label1.Name = "label1";\r
this.label1.Size = new System.Drawing.Size(224, 13);\r
this.label1.Text = "Copyright 2003-2010 HandBrake Developers";\r
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;\r
// \r
- // lbl_HBBuild\r
- // \r
- this.lbl_HBBuild.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
- this.lbl_HBBuild.Location = new System.Drawing.Point(125, 35);\r
- this.lbl_HBBuild.Margin = new System.Windows.Forms.Padding(3, 1, 3, 3);\r
- this.lbl_HBBuild.Name = "lbl_HBBuild";\r
- this.lbl_HBBuild.Size = new System.Drawing.Size(224, 13);\r
- this.lbl_HBBuild.TabIndex = 32;\r
- this.lbl_HBBuild.Text = "{CLI Version}";\r
- this.lbl_HBBuild.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;\r
- // \r
// PictureBox1\r
// \r
this.PictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;\r
this.Controls.Add(this.btn_close);\r
this.Controls.Add(this.label1);\r
this.Controls.Add(this.PictureBox1);\r
- this.Controls.Add(this.lbl_HBBuild);\r
this.Controls.Add(this.Label3);\r
this.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;\r
\r
internal System.Windows.Forms.Label Label3;\r
internal System.Windows.Forms.Label label1;\r
- internal System.Windows.Forms.Label lbl_HBBuild;\r
internal System.Windows.Forms.PictureBox PictureBox1;\r
private System.Windows.Forms.Button btn_close;\r
private System.Windows.Forms.RichTextBox richTextBox1;\r
namespace Handbrake\r
{\r
using System;\r
- using System.Reflection;\r
using System.Windows.Forms;\r
\r
/// <summary>\r
public frmAbout()\r
{\r
InitializeComponent();\r
- lbl_HBBuild.Text = "CLI Build: " + Properties.Settings.Default.hb_version + " (" + Properties.Settings.Default.hb_build +\r
- ") - " + Properties.Settings.Default.hb_platform;\r
\r
- Version gui = Assembly.GetExecutingAssembly().GetName().Version;\r
- Version appServices = HandBrake.ApplicationServices.Init.AssemblyVersion();\r
- lbl_GUIBuild.Text = gui.ToString(4) + " (Services: " + appServices.ToString(4) + ")";\r
+ string nightly = Properties.Settings.Default.hb_version.Contains("svn") ? " (SVN / Nightly Build)" : string.Empty;\r
+ lbl_GUIBuild.Text = Properties.Settings.Default.hb_version + " (" + Properties.Settings.Default.hb_build + ") " + nightly;\r
}\r
\r
/// <summary>\r
\r
if (Settings.Default.hb_version.Contains("svn"))\r
{\r
- Version v = Assembly.GetExecutingAssembly().GetName().Version;\r
- this.Text += " " + v.ToString(4);\r
+ this.Text += " " + Settings.Default.hb_version;\r
}\r
\r
// Check for new versions, if update checking is enabled\r