summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorsr55 <[email protected]>2010-04-21 18:37:11 +0000
committersr55 <[email protected]>2010-04-21 18:37:11 +0000
commit1c106d66f67ea968caffbc83d57438e7956e63c7 (patch)
tree493bf89501ea96a33fc3249dd9efe9baa976a32e /win
parent886e890be333a392ca64047cf59f211f5d31f136 (diff)
WinGui:
- enforce a minimum CLI revision for svn builds. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3247 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win')
-rw-r--r--win/C#/Program.cs19
-rw-r--r--win/C#/Properties/Settings.Designer.cs12
-rw-r--r--win/C#/Properties/Settings.settings3
-rw-r--r--win/C#/app.config3
4 files changed, 37 insertions, 0 deletions
diff --git a/win/C#/Program.cs b/win/C#/Program.cs
index 2bd66db5b..bf4f317c2 100644
--- a/win/C#/Program.cs
+++ b/win/C#/Program.cs
@@ -42,6 +42,25 @@ namespace Handbrake
return;
}
+ // Make sure we have a recent version for svn builds
+ string version = Properties.Settings.Default.hb_version;
+ if (version.Contains("svn"))
+ {
+ version = version.Replace("svn", string.Empty).Trim();
+ int build;
+ int.TryParse(version, out build);
+ if (build < Properties.Settings.Default.hb_min_cli)
+ {
+ 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. ",
+ "Error",
+ MessageBoxButtons.OK,
+ MessageBoxIcon.Error);
+ return;
+ }
+ }
+
// Check were not running on a screen that's going to cause some funnies to happen.
Screen scr = Screen.PrimaryScreen;
if ((scr.Bounds.Width < 1024) || (scr.Bounds.Height < 620))
diff --git a/win/C#/Properties/Settings.Designer.cs b/win/C#/Properties/Settings.Designer.cs
index c911a94cc..757344c75 100644
--- a/win/C#/Properties/Settings.Designer.cs
+++ b/win/C#/Properties/Settings.Designer.cs
@@ -524,5 +524,17 @@ namespace Handbrake.Properties {
this["AutoNameRemoveUnderscore"] = value;
}
}
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("3240")]
+ public int hb_min_cli {
+ get {
+ return ((int)(this["hb_min_cli"]));
+ }
+ set {
+ this["hb_min_cli"] = value;
+ }
+ }
}
}
diff --git a/win/C#/Properties/Settings.settings b/win/C#/Properties/Settings.settings
index 1e4b9387a..bab3f7db1 100644
--- a/win/C#/Properties/Settings.settings
+++ b/win/C#/Properties/Settings.settings
@@ -128,5 +128,8 @@
<Setting Name="AutoNameRemoveUnderscore" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
+ <Setting Name="hb_min_cli" Type="System.Int32" Scope="User">
+ <Value Profile="(Default)">3240</Value>
+ </Setting>
</Settings>
</SettingsFile> \ No newline at end of file
diff --git a/win/C#/app.config b/win/C#/app.config
index 1c4e60392..73fd12e1f 100644
--- a/win/C#/app.config
+++ b/win/C#/app.config
@@ -134,6 +134,9 @@
<setting name="AutoNameRemoveUnderscore" serializeAs="String">
<value>False</value>
</setting>
+ <setting name="hb_min_cli" serializeAs="String">
+ <value>3240</value>
+ </setting>
</Handbrake.Properties.Settings>
</userSettings>
<startup />