diff options
Diffstat (limited to 'MediaBrowser.ServerApplication/MainStartup.cs')
| -rw-r--r-- | MediaBrowser.ServerApplication/MainStartup.cs | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/MediaBrowser.ServerApplication/MainStartup.cs b/MediaBrowser.ServerApplication/MainStartup.cs index adfc0a588..09c948a4a 100644 --- a/MediaBrowser.ServerApplication/MainStartup.cs +++ b/MediaBrowser.ServerApplication/MainStartup.cs @@ -20,11 +20,14 @@ using System.Windows.Forms; using Emby.Common.Implementations.EnvironmentInfo; using Emby.Common.Implementations.IO; using Emby.Common.Implementations.Logging; +using Emby.Common.Implementations.Networking; +using Emby.Common.Implementations.Security; using Emby.Server.Core; using Emby.Server.Core.Browser; using Emby.Server.Implementations.IO; using ImageMagickSharp; using MediaBrowser.Common.Net; +using MediaBrowser.Server.Startup.Common.IO; namespace MediaBrowser.ServerApplication { @@ -64,8 +67,8 @@ namespace MediaBrowser.ServerApplication return false; } /// <summary> - /// Defines the entry point of the application. - /// </summary> + /// Defines the entry point of the application. + /// </summary> public static void Main() { var options = new StartupOptions(); @@ -319,14 +322,22 @@ namespace MediaBrowser.ServerApplication IsRunningAsService = runService }; + var imageEncoder = ImageEncoderHelper.GetImageEncoder(_logger, logManager, fileSystem, options, () => _appHost.HttpClient, appPaths); + _appHost = new ApplicationHost(appPaths, logManager, options, fileSystem, - nativeApp, + nativeApp, new PowerManagement(), "emby.windows.zip", - new EnvironmentInfo()); + new EnvironmentInfo(), + imageEncoder, + new Server.Startup.Common.SystemEvents(logManager.GetLogger("SystemEvents")), + new RecyclableMemoryStreamProvider(), + new NetworkManager(logManager.GetLogger("NetworkManager")), + GenerateCertificate, + () => Environment.UserDomainName); var initProgress = new Progress<double>(); @@ -367,6 +378,11 @@ namespace MediaBrowser.ServerApplication } } + private static void GenerateCertificate(string certPath, string certHost) + { + CertificateGenerator.CreateSelfSignCertificatePfx(certPath, certHost, _logger); + } + private static ServerNotifyIcon _serverNotifyIcon; private static TaskScheduler _mainTaskScheduler; private static void ShowTrayIcon() |
