diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-11-26 14:30:04 -0500 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-11-26 14:30:04 -0500 |
| commit | 43ce4438320dd9025898dbb2fafa01bd1be72fb0 (patch) | |
| tree | a1ac47e6ee1c70641c5421ba5d6a5a15f65fc537 /MediaBrowser.Server.Mac/Main.cs | |
| parent | dfed3a11bcbce756277606c08f11253b447d455d (diff) | |
| parent | 13cef31b4f52ff61595bd2e4a12e217b022a2705 (diff) | |
Merge branch 'master' of https://github.com/MediaBrowser/MediaBrowser
Diffstat (limited to 'MediaBrowser.Server.Mac/Main.cs')
| -rw-r--r-- | MediaBrowser.Server.Mac/Main.cs | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/MediaBrowser.Server.Mac/Main.cs b/MediaBrowser.Server.Mac/Main.cs index 88b9497ea..6b76a63f1 100644 --- a/MediaBrowser.Server.Mac/Main.cs +++ b/MediaBrowser.Server.Mac/Main.cs @@ -15,7 +15,6 @@ using MediaBrowser.Common.Implementations.IO; using MediaBrowser.Common.Implementations.Logging; using MediaBrowser.Model.Logging; using MediaBrowser.Server.Implementations; -using MediaBrowser.Server.Mono.Native; using MediaBrowser.Server.Startup.Common; using MediaBrowser.Server.Startup.Common.Browser; using Microsoft.Win32; @@ -54,26 +53,23 @@ namespace MediaBrowser.Server.Mac AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException; StartApplication(appPaths, logManager, options); - RunNSApp (args); - } - - private static void RunNSApp(string[] args) { - NSApplication.Init (); - - AppController.Instance.AppHost = _appHost; - AppController.Instance.Logger = _logger; - AppController.Instance.ConfigurationManager = _appHost.ServerConfigurationManager; - AppController.Instance.Localization = _appHost.LocalizationManager; - NSApplication.Main (args); + var b = true; + } + + public static void AddDependencies(AppController appController){ + appController.AppHost = _appHost; + appController.Logger = _logger; + appController.ConfigurationManager = _appHost.ServerConfigurationManager; + appController.Localization = _appHost.LocalizationManager; } private static ServerApplicationPaths CreateApplicationPaths(string applicationPath, string programDataPath) { if (string.IsNullOrEmpty(programDataPath)) { - return new ServerApplicationPaths(applicationPath); + programDataPath = Path.Combine(Environment.GetFolderPath (Environment.SpecialFolder.ApplicationData), "mediabrowser"); } return new ServerApplicationPaths(programDataPath, applicationPath); |
