diff options
author | sr55 <[email protected]> | 2010-04-02 19:43:46 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2010-04-02 19:43:46 +0000 |
commit | 1f5db943d17f047eed1675323410f0645c6b229f (patch) | |
tree | 0915509d361d3acbb6b9dcc9154c42f6b710d0af /win/C#/Program.cs | |
parent | a0a4b5d5f7ff9db5e943b956a8caa23625eae913 (diff) |
WinGui:
- Put in some checks on ui launch to make sure the cli and it's dll are present.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3191 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/Program.cs')
-rw-r--r-- | win/C#/Program.cs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/win/C#/Program.cs b/win/C#/Program.cs index 805d339af..9596676eb 100644 --- a/win/C#/Program.cs +++ b/win/C#/Program.cs @@ -21,6 +21,31 @@ namespace Handbrake [STAThread]
public static void Main()
{
+ const string failedInstall = "HandBrake is not installed properly. Please reinstall HandBrake. \n\n";
+ const string nightlyCLIMissing =
+ "If you have downloaded the \"HandBrakeGUI\" nightly, " +
+ "please make sure you have also downloaded the \"HandBrakeCLI\" nightly and extracted it's contents to the same folder. ";
+ string missingFiles = string.Empty;
+
+ // Verify HandBrakeCLI.exe and ilibgcc_s_sjlj-1.dll exists
+ if (!File.Exists(Path.Combine(Application.StartupPath, "HandBrakeCLI.exe")))
+ {
+ missingFiles += "\"HandBrakeCLI.exe\" was not found.";
+ }
+
+ if (!File.Exists(Path.Combine(Application.StartupPath, "libgcc_s_sjlj-1.dll")))
+ {
+ missingFiles += "\n\"libgcc_s_sjlj-1.dll\" was not found.";
+ }
+
+ if (missingFiles != string.Empty)
+ {
+ MessageBox.Show(failedInstall + missingFiles + "\n\n"+ nightlyCLIMissing, "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))
MessageBox.Show("Your system does not meet the minimum requirements for HandBrake. \n" + "Your screen is running at: " + scr.Bounds.Width + "x" + scr.Bounds.Height + " \nScreen resolution is too Low. Must be 1024x620 or greater", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|