mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-12 19:56:30 +01:00
update mac project
This commit is contained in:
@@ -22,6 +22,7 @@ using MonoMac.ObjCRuntime;
|
||||
using Emby.Server.Core;
|
||||
using Emby.Server.Implementations;
|
||||
using Emby.Common.Implementations.Logging;
|
||||
using Emby.Server.Implementations.Logging;
|
||||
using Emby.Common.Implementations.EnvironmentInfo;
|
||||
using Emby.Server.Mac.Native;
|
||||
using Emby.Server.Implementations.IO;
|
||||
@@ -29,6 +30,8 @@ using Emby.Common.Implementations.Networking;
|
||||
using Emby.Common.Implementations.Security;
|
||||
using Mono.Unix.Native;
|
||||
using MediaBrowser.Model.System;
|
||||
using MediaBrowser.Model.IO;
|
||||
using Emby.Server.Core.Logging;
|
||||
|
||||
namespace MediaBrowser.Server.Mac
|
||||
{
|
||||
@@ -37,6 +40,7 @@ namespace MediaBrowser.Server.Mac
|
||||
internal static MacAppHost AppHost;
|
||||
|
||||
private static ILogger _logger;
|
||||
private static IFileSystem _fileSystem;
|
||||
|
||||
static void Main (string[] args)
|
||||
{
|
||||
@@ -83,7 +87,9 @@ namespace MediaBrowser.Server.Mac
|
||||
// Within the mac bundle, go uo two levels then down into Resources folder
|
||||
var resourcesPath = Path.Combine(Path.GetDirectoryName(appFolderPath), "Resources");
|
||||
|
||||
return new ServerApplicationPaths(programDataPath, appFolderPath, resourcesPath);
|
||||
Action<string> createDirectoryFn = (string obj) => Directory.CreateDirectory(obj);
|
||||
|
||||
return new ServerApplicationPaths(programDataPath, appFolderPath, resourcesPath, createDirectoryFn);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -102,6 +108,8 @@ namespace MediaBrowser.Server.Mac
|
||||
var fileSystem = new MonoFileSystem(logManager.GetLogger("FileSystem"), false, false, appPaths.TempDirectory);
|
||||
fileSystem.AddShortcutHandler(new MbLinkShortcutHandler(fileSystem));
|
||||
|
||||
_fileSystem = fileSystem;
|
||||
|
||||
var environmentInfo = GetEnvironmentInfo();
|
||||
|
||||
var imageEncoder = ImageEncoderHelper.GetImageEncoder(_logger,
|
||||
@@ -294,7 +302,9 @@ namespace MediaBrowser.Server.Mac
|
||||
{
|
||||
var exception = (Exception)e.ExceptionObject;
|
||||
|
||||
new UnhandledExceptionWriter(AppHost.ServerConfigurationManager.ApplicationPaths, _logger, AppHost.LogManager).Log(exception);
|
||||
var consoleLogger = new ConsoleLogger();
|
||||
|
||||
new UnhandledExceptionWriter(AppHost.ServerConfigurationManager.ApplicationPaths, _logger, AppHost.LogManager, _fileSystem, consoleLogger).Log(exception);
|
||||
|
||||
if (!Debugger.IsAttached)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user