add fixes for .net core

This commit is contained in:
Luke Pulverenti
2017-08-17 16:19:02 -04:00
parent a57c887f7f
commit a7dcf7191a
16 changed files with 132 additions and 120 deletions

View File

@@ -236,18 +236,16 @@ namespace MediaBrowser.ServerApplication
var resourcesPath = Path.GetDirectoryName(applicationPath);
Action<string> createDirectoryFn = s => Directory.CreateDirectory(s);
if (runAsService)
{
var systemPath = Path.GetDirectoryName(applicationPath);
var programDataPath = Path.GetDirectoryName(systemPath);
return new ServerApplicationPaths(programDataPath, appFolderPath, resourcesPath, createDirectoryFn);
return new ServerApplicationPaths(programDataPath, appFolderPath, resourcesPath);
}
return new ServerApplicationPaths(ApplicationPathHelper.GetProgramDataPath(applicationPath), appFolderPath, resourcesPath, createDirectoryFn);
return new ServerApplicationPaths(ApplicationPathHelper.GetProgramDataPath(applicationPath), appFolderPath, resourcesPath);
}
/// <summary>
@@ -316,10 +314,7 @@ namespace MediaBrowser.ServerApplication
environmentInfo,
new NullImageEncoder(),
new SystemEvents(logManager.GetLogger("SystemEvents")),
new MemoryStreamProvider(),
new Networking.NetworkManager(logManager.GetLogger("NetworkManager")),
GenerateCertificate,
() => Environment.UserDomainName);
new Networking.NetworkManager(logManager.GetLogger("NetworkManager")));
var initProgress = new Progress<double>();
@@ -366,11 +361,6 @@ namespace MediaBrowser.ServerApplication
}
}
private static void GenerateCertificate(string certPath, string certHost, string certPassword)
{
CertificateGenerator.CreateSelfSignCertificatePfx(certPath, certHost, certPassword, _logger);
}
private static ServerNotifyIcon _serverNotifyIcon;
private static TaskScheduler _mainTaskScheduler;
private static void ShowTrayIcon()