diff options
author | sr55 <[email protected]> | 2021-02-20 15:46:26 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2021-02-20 15:46:26 +0000 |
commit | c244815a06dedf33b1f5842b1c15522649d8311d (patch) | |
tree | 0cacce6dd87b548204b3f3259a42b980ac742432 /win/CS | |
parent | fc7458d40ee6a575c1a6257ec8f1ffb1fad59efe (diff) |
WinGui: Display an error if hb.dll is missing rather than hanging / crashing the app.
Diffstat (limited to 'win/CS')
-rw-r--r-- | win/CS/HandBrakeWPF/App.xaml.cs | 7 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Properties/Resources.Designer.cs | 9 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Properties/Resources.resx | 3 |
3 files changed, 19 insertions, 0 deletions
diff --git a/win/CS/HandBrakeWPF/App.xaml.cs b/win/CS/HandBrakeWPF/App.xaml.cs index c393dd512..2c4a4578e 100644 --- a/win/CS/HandBrakeWPF/App.xaml.cs +++ b/win/CS/HandBrakeWPF/App.xaml.cs @@ -75,6 +75,13 @@ namespace HandBrakeWPF return;
}
+ if (!File.Exists("hb.dll"))
+ {
+ MessageBox.Show(HandBrakeWPF.Properties.Resources.Startup_HbDllMissing, HandBrakeWPF.Properties.Resources.Error, MessageBoxButton.OK, MessageBoxImage.Error);
+ Application.Current.Shutdown();
+ return;
+ }
+
if (e.Args.Any(f => f.Equals("--reset")))
{
HandBrakeApp.ResetToDefaults();
diff --git a/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs b/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs index e902f2796..922b9f129 100644 --- a/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs +++ b/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs @@ -5791,6 +5791,15 @@ namespace HandBrakeWPF.Properties { } /// <summary> + /// Looks up a localized string similar to Missing file "hb.dll". Please re-install.. + /// </summary> + public static string Startup_HbDllMissing { + get { + return ResourceManager.GetString("Startup_HbDllMissing", resourceCulture); + } + } + + /// <summary> /// Looks up a localized string similar to HandBrake's engine failed to initialise. This is often caused by out of date GPU drivers.\n Please update the GPU drivers for any onboard and discrete graphics your system has.. /// </summary> public static string Startup_InitFailed { diff --git a/win/CS/HandBrakeWPF/Properties/Resources.resx b/win/CS/HandBrakeWPF/Properties/Resources.resx index 918b94e07..f0ee417b4 100644 --- a/win/CS/HandBrakeWPF/Properties/Resources.resx +++ b/win/CS/HandBrakeWPF/Properties/Resources.resx @@ -2454,4 +2454,7 @@ Fields are limited to: <data name="QueueView_JobStatus_WorkerCrash" xml:space="preserve">
<value>Worker Crashed. Check log for details.</value>
</data>
+ <data name="Startup_HbDllMissing" xml:space="preserve">
+ <value>Missing file "hb.dll". Please re-install.</value>
+ </data>
</root>
\ No newline at end of file |