From d573f1a2e6e3a347e1bc9e6ff00d0d3f26605459 Mon Sep 17 00:00:00 2001 From: sr55 Date: Sat, 6 Nov 2010 20:20:45 +0000 Subject: [PATCH] WinGui: - Remove the Caliburn / Service Locator references. Not going to put this in the upcoming release. No need to bloat the installer with the dlls when they are not currently used. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3652 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- .../HandBrake.ApplicationServices.csproj | 13 ------- .../Services/Encode.cs | 5 +++ .../WindsorInstaller.cs | 35 ------------------- .../HandBrake.Framework.csproj | 13 ------- .../HandBrake.Framework/WindsorInstaller.cs | 34 ------------------ win/C#/HandBrakeCS.csproj | 28 --------------- win/C#/Installer/Installer.nsi | 14 ++++---- win/C#/Installer/MakeNightly.nsi.tmpl | 14 ++++---- win/C#/Program.cs | 18 ---------- 9 files changed, 19 insertions(+), 155 deletions(-) delete mode 100644 win/C#/HandBrake.ApplicationServices/WindsorInstaller.cs delete mode 100644 win/C#/HandBrake.Framework/WindsorInstaller.cs diff --git a/win/C#/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj b/win/C#/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj index 81c1eb040..ba0e3a64e 100644 --- a/win/C#/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj +++ b/win/C#/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj @@ -44,18 +44,6 @@ prompt - - False - ..\libraries\caliburn\Castle.Core.dll - - - False - ..\libraries\caliburn\Castle.MicroKernel.dll - - - False - ..\libraries\caliburn\Castle.Windsor.dll - False ..\libraries\Growl.Connector.dll @@ -117,7 +105,6 @@ - diff --git a/win/C#/HandBrake.ApplicationServices/Services/Encode.cs b/win/C#/HandBrake.ApplicationServices/Services/Encode.cs index a0340c656..11e896768 100644 --- a/win/C#/HandBrake.ApplicationServices/Services/Encode.cs +++ b/win/C#/HandBrake.ApplicationServices/Services/Encode.cs @@ -330,6 +330,11 @@ namespace HandBrake.ApplicationServices.Services /// private void HbProcess_Exited(object sender, EventArgs e) { + if (HbProcess != null && HbProcess.ExitCode != 0) + { + errorService.ShowError("It appears that HandBrakeCLI has crashed. You can check the Activity Log for further information.", string.Format("Exit Code was: {0}", HbProcess.ExitCode)); + } + IsEncoding = false; if (this.EncodeEnded != null) this.EncodeEnded(this, new EventArgs()); diff --git a/win/C#/HandBrake.ApplicationServices/WindsorInstaller.cs b/win/C#/HandBrake.ApplicationServices/WindsorInstaller.cs deleted file mode 100644 index a9bc473a2..000000000 --- a/win/C#/HandBrake.ApplicationServices/WindsorInstaller.cs +++ /dev/null @@ -1,35 +0,0 @@ -/* WindsorInstaller.cs $ - This file is part of the HandBrake source code. - Homepage: . - It may be used under the terms of the GNU General Public License. */ - -namespace HandBrake.ApplicationServices -{ - using Castle.MicroKernel; - using Castle.Windsor; - - using HandBrake.ApplicationServices.Services; - using HandBrake.ApplicationServices.Services.Interfaces; - - /// - /// This is the Windsor Installer class. - /// - public class WindsorInstaller : IWindsorInstaller - { - /// - /// Setup the Services for this Library - /// - /// - /// The container. - /// - /// - /// The store. - /// - public void Install(IWindsorContainer container, IConfigurationStore store) - { - container.AddComponent(); - container.AddComponent(); - container.AddComponent(); - } - } -} diff --git a/win/C#/HandBrake.Framework/HandBrake.Framework.csproj b/win/C#/HandBrake.Framework/HandBrake.Framework.csproj index b050abcb7..30c5ea6d6 100644 --- a/win/C#/HandBrake.Framework/HandBrake.Framework.csproj +++ b/win/C#/HandBrake.Framework/HandBrake.Framework.csproj @@ -44,18 +44,6 @@ prompt - - False - ..\libraries\caliburn\Castle.Core.dll - - - False - ..\libraries\caliburn\Castle.MicroKernel.dll - - - False - ..\libraries\caliburn\Castle.Windsor.dll - @@ -98,7 +86,6 @@ UpdateInfo.cs - diff --git a/win/C#/HandBrake.Framework/WindsorInstaller.cs b/win/C#/HandBrake.Framework/WindsorInstaller.cs deleted file mode 100644 index 87bdbf008..000000000 --- a/win/C#/HandBrake.Framework/WindsorInstaller.cs +++ /dev/null @@ -1,34 +0,0 @@ -/* WindsorInstaller.cs $ - This file is part of the HandBrake source code. - Homepage: . - It may be used under the terms of the GNU General Public License. */ - -namespace HandBrake.Framework -{ - using Castle.MicroKernel; - using Castle.Windsor; - - using HandBrake.Framework.Services; - using HandBrake.Framework.Services.Interfaces; - - /// - /// This is the Windsor Installer class. - /// - public class WindsorInstaller : IWindsorInstaller - { - /// - /// Setup the Services for this Library - /// - /// - /// The container. - /// - /// - /// The store. - /// - public void Install(IWindsorContainer container, IConfigurationStore store) - { - container.AddComponent(); - container.AddComponent(); - } - } -} diff --git a/win/C#/HandBrakeCS.csproj b/win/C#/HandBrakeCS.csproj index f4fd4fb61..1d2a139bc 100644 --- a/win/C#/HandBrakeCS.csproj +++ b/win/C#/HandBrakeCS.csproj @@ -144,29 +144,6 @@ true - - False - libraries\caliburn\Caliburn.Castle.dll - - - False - libraries\caliburn\Caliburn.Core.dll - - - False - libraries\caliburn\Castle.Core.dll - True - - - False - libraries\caliburn\Castle.MicroKernel.dll - True - - - False - libraries\caliburn\Castle.Windsor.dll - True - False libraries\Growl.Connector.dll @@ -177,10 +154,6 @@ libraries\Growl.CoreLibrary.dll True - - False - libraries\caliburn\Microsoft.Practices.ServiceLocation.dll - 3.0 @@ -204,7 +177,6 @@ 3.0 - diff --git a/win/C#/Installer/Installer.nsi b/win/C#/Installer/Installer.nsi index 1b8320ef5..0ea0cb9d0 100644 --- a/win/C#/Installer/Installer.nsi +++ b/win/C#/Installer/Installer.nsi @@ -139,13 +139,13 @@ Section "Handbrake" SEC01 File "Microsoft.WindowsAPICodePack.Shell.dll" File "Microsoft.WindowsAPICodePack.dll" - File "Caliburn.Castle.dll" - File "Caliburn.Core.dll" - File "Castle.Core.dll" - File "Castle.DynamicProxy2.dll" - File "Castle.MicroKernel.dll" - File "Castle.Windsor.dll" - File "Microsoft.Practices.ServiceLocation.dll" + ;File "Caliburn.Castle.dll" + ;File "Caliburn.Core.dll" + ;File "Castle.Core.dll" + ;File "Castle.DynamicProxy2.dll" + ;File "Castle.MicroKernel.dll" + ;File "Castle.Windsor.dll" + ;File "Microsoft.Practices.ServiceLocation.dll" SetOutPath "$INSTDIR\doc" SetOverwrite ifnewer diff --git a/win/C#/Installer/MakeNightly.nsi.tmpl b/win/C#/Installer/MakeNightly.nsi.tmpl index ef9f6666f..55db341f5 100644 --- a/win/C#/Installer/MakeNightly.nsi.tmpl +++ b/win/C#/Installer/MakeNightly.nsi.tmpl @@ -137,13 +137,13 @@ Section "Handbrake" SEC01 File "Microsoft.WindowsAPICodePack.Shell.dll" File "Microsoft.WindowsAPICodePack.dll" - File "Caliburn.Castle.dll" - File "Caliburn.Core.dll" - File "Castle.Core.dll" - File "Castle.DynamicProxy2.dll" - File "Castle.MicroKernel.dll" - File "Castle.Windsor.dll" - File "Microsoft.Practices.ServiceLocation.dll" + ;File "Caliburn.Castle.dll" + ;File "Caliburn.Core.dll" + ;File "Castle.Core.dll" + ;File "Castle.DynamicProxy2.dll" + ;File "Castle.MicroKernel.dll" + ;File "Castle.Windsor.dll" + ;File "Microsoft.Practices.ServiceLocation.dll" ; Copy the standard doc set into the doc folder SetOutPath "$INSTDIR\doc" diff --git a/win/C#/Program.cs b/win/C#/Program.cs index e81ffd66c..24d1507f6 100644 --- a/win/C#/Program.cs +++ b/win/C#/Program.cs @@ -8,23 +8,13 @@ namespace Handbrake using System; using System.Diagnostics; using System.IO; - using System.Reflection; using System.Windows.Forms; - using Caliburn.Castle; - - using Castle.MicroKernel; - using Castle.Windsor; - using HandBrake.ApplicationServices; - using HandBrake.Framework.Services; - using HandBrake.Framework.Services.Interfaces; using Handbrake.Presets; using Handbrake.Properties; - using Microsoft.Practices.ServiceLocation; - /// /// HandBrake Starts Here /// @@ -39,14 +29,6 @@ namespace Handbrake [STAThread] public static void Main(string[] args) { - // WindsorContainer container = new WindsorContainer(new XmlInterpreter(new ConfigResource("castle"))); - WindsorContainer container = new WindsorContainer(); - // TODO Would be nice to find a way to do this automatically without having to reference the libraries specifically. - container.Install(new HandBrake.Framework.WindsorInstaller()); - container.Install(new HandBrake.ApplicationServices.WindsorInstaller()); - - ServiceLocator.SetLocatorProvider(() => new WindsorAdapter(container)); - InstanceId = Process.GetProcessesByName("HandBrake").Length; // Handle any unhandled exceptions -- 2.40.0