diff options
| author | Luke <luke.pulverenti@gmail.com> | 2016-11-11 15:37:53 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-11-11 15:37:53 -0500 |
| commit | b4c6cad2fa9256c4af83752a34679d2533c96b11 (patch) | |
| tree | 43e25b4ed64a535823e21128ee74f3e0a1245069 /MediaBrowser.ServerApplication | |
| parent | 00316bc8ca9791f2ad68e84e29f2fbc6b1af2173 (diff) | |
| parent | 2b19df9544315603673ff034e8fd621cf0b85a4b (diff) | |
Merge pull request #2281 from MediaBrowser/dev
Dev
Diffstat (limited to 'MediaBrowser.ServerApplication')
7 files changed, 91 insertions, 32 deletions
diff --git a/MediaBrowser.ServerApplication/MainStartup.cs b/MediaBrowser.ServerApplication/MainStartup.cs index a3f4096367..09c948a4a8 100644 --- a/MediaBrowser.ServerApplication/MainStartup.cs +++ b/MediaBrowser.ServerApplication/MainStartup.cs @@ -1,7 +1,6 @@ using MediaBrowser.Model.Logging; using MediaBrowser.Server.Implementations; using MediaBrowser.Server.Startup.Common; -using MediaBrowser.Server.Startup.Common.Browser; using MediaBrowser.ServerApplication.Native; using MediaBrowser.ServerApplication.Splash; using MediaBrowser.ServerApplication.Updates; @@ -18,10 +17,17 @@ using System.Text; using System.Threading; using System.Threading.Tasks; 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 { @@ -61,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(); @@ -316,13 +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"); + "emby.windows.zip", + 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>(); @@ -363,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() diff --git a/MediaBrowser.ServerApplication/MediaBrowser.ServerApplication.csproj b/MediaBrowser.ServerApplication/MediaBrowser.ServerApplication.csproj index eaf4f31489..f6aef57443 100644 --- a/MediaBrowser.ServerApplication/MediaBrowser.ServerApplication.csproj +++ b/MediaBrowser.ServerApplication/MediaBrowser.ServerApplication.csproj @@ -67,6 +67,9 @@ <Reference Include="Emby.Common.Implementations"> <HintPath>..\ThirdParty\emby\Emby.Common.Implementations.dll</HintPath> </Reference> + <Reference Include="Emby.Server.Core"> + <HintPath>..\ThirdParty\emby\Emby.Server.Core.dll</HintPath> + </Reference> <Reference Include="ImageMagickSharp, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> <HintPath>..\packages\ImageMagickSharp.1.0.0.18\lib\net45\ImageMagickSharp.dll</HintPath> @@ -75,12 +78,17 @@ <HintPath>..\packages\NLog.4.4.0-betaV15\lib\net45\NLog.dll</HintPath> <Private>True</Private> </Reference> - <Reference Include="Patterns.Logging, Version=1.0.6151.30227, Culture=neutral, processorArchitecture=MSIL"> - <HintPath>..\packages\Patterns.Logging.1.0.0.6\lib\portable-net45+win8\Patterns.Logging.dll</HintPath> + <Reference Include="ServiceStack.Text, Version=4.5.4.0, Culture=neutral, processorArchitecture=MSIL"> + <HintPath>..\packages\ServiceStack.Text.4.5.4\lib\net45\ServiceStack.Text.dll</HintPath> + <Private>True</Private> + </Reference> + <Reference Include="SharpCompress, Version=0.14.0.0, Culture=neutral, processorArchitecture=MSIL"> + <HintPath>..\packages\SharpCompress.0.14.0\lib\net45\SharpCompress.dll</HintPath> <Private>True</Private> </Reference> - <Reference Include="ServiceStack.Interfaces"> - <HintPath>..\ThirdParty\ServiceStack\ServiceStack.Interfaces.dll</HintPath> + <Reference Include="SimpleInjector, Version=3.2.4.0, Culture=neutral, PublicKeyToken=984cb50dea722e99, processorArchitecture=MSIL"> + <HintPath>..\packages\SimpleInjector.3.2.4\lib\net45\SimpleInjector.dll</HintPath> + <Private>True</Private> </Reference> <Reference Include="System" /> <Reference Include="System.Configuration" /> @@ -105,7 +113,7 @@ <Reference Include="System.Xml" /> </ItemGroup> <ItemGroup> - <Compile Include="..\MediaBrowser.Server.Implementations\Persistence\SqliteExtensions.cs"> + <Compile Include="..\MediaBrowser.Server.Startup.Common\Persistence\SqliteExtensions.cs"> <Link>Native\SqliteExtensions.cs</Link> </Compile> <Compile Include="..\SharedVersion.cs"> @@ -1057,10 +1065,38 @@ <Content Include="Resources\Images\mb3logo800.png" /> </ItemGroup> <ItemGroup> + <ProjectReference Include="..\BDInfo\BDInfo.csproj"> + <Project>{88ae38df-19d7-406f-a6a9-09527719a21e}</Project> + <Name>BDInfo</Name> + </ProjectReference> + <ProjectReference Include="..\DvdLib\DvdLib.csproj"> + <Project>{713f42b5-878e-499d-a878-e4c652b1d5e8}</Project> + <Name>DvdLib</Name> + </ProjectReference> + <ProjectReference Include="..\Emby.Dlna\Emby.Dlna.csproj"> + <Project>{805844ab-e92f-45e6-9d99-4f6d48d129a5}</Project> + <Name>Emby.Dlna</Name> + </ProjectReference> + <ProjectReference Include="..\Emby.Drawing.ImageMagick\Emby.Drawing.ImageMagick.csproj"> + <Project>{6cfee013-6e7c-432b-ac37-cabf0880c69a}</Project> + <Name>Emby.Drawing.ImageMagick</Name> + </ProjectReference> + <ProjectReference Include="..\Emby.Drawing.Net\Emby.Drawing.Net.csproj"> + <Project>{c97a239e-a96c-4d64-a844-ccf8cc30aecb}</Project> + <Name>Emby.Drawing.Net</Name> + </ProjectReference> <ProjectReference Include="..\Emby.Drawing\Emby.Drawing.csproj"> <Project>{08fff49b-f175-4807-a2b5-73b0ebd9f716}</Project> <Name>Emby.Drawing</Name> </ProjectReference> + <ProjectReference Include="..\Emby.Photos\Emby.Photos.csproj"> + <Project>{89ab4548-770d-41fd-a891-8daff44f452c}</Project> + <Name>Emby.Photos</Name> + </ProjectReference> + <ProjectReference Include="..\Emby.Server.Implementations\Emby.Server.Implementations.csproj"> + <Project>{e383961b-9356-4d5d-8233-9a1079d03055}</Project> + <Name>Emby.Server.Implementations</Name> + </ProjectReference> <ProjectReference Include="..\MediaBrowser.Api\MediaBrowser.Api.csproj"> <Project>{4fd51ac5-2c16-4308-a993-c3a84f3b4582}</Project> <Name>MediaBrowser.Api</Name> @@ -1105,8 +1141,23 @@ <Project>{23499896-b135-4527-8574-c26e926ea99e}</Project> <Name>MediaBrowser.XbmcMetadata</Name> </ProjectReference> + <ProjectReference Include="..\OpenSubtitlesHandler\OpenSubtitlesHandler.csproj"> + <Project>{4a4402d4-e910-443b-b8fc-2c18286a2ca0}</Project> + <Name>OpenSubtitlesHandler</Name> + </ProjectReference> + <ProjectReference Include="..\RSSDP\RSSDP.csproj"> + <Project>{21002819-c39a-4d3e-be83-2a276a77fb1f}</Project> + <Name>RSSDP</Name> + </ProjectReference> + <ProjectReference Include="..\ServiceStack\ServiceStack.csproj"> + <Project>{680a1709-25eb-4d52-a87f-ee03ffd94baa}</Project> + <Name>ServiceStack</Name> + </ProjectReference> + <ProjectReference Include="..\SocketHttpListener.Portable\SocketHttpListener.Portable.csproj"> + <Project>{4f26d5d8-a7b0-42b3-ba42-7cb7d245934e}</Project> + <Name>SocketHttpListener.Portable</Name> + </ProjectReference> </ItemGroup> - <ItemGroup /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <PropertyGroup> <PostBuildEvent> diff --git a/MediaBrowser.ServerApplication/Native/DbConnector.cs b/MediaBrowser.ServerApplication/Native/DbConnector.cs index f403ce2ce4..986bc1850e 100644 --- a/MediaBrowser.ServerApplication/Native/DbConnector.cs +++ b/MediaBrowser.ServerApplication/Native/DbConnector.cs @@ -1,7 +1,7 @@ using System.Data; using System.Threading.Tasks; +using Emby.Server.Core.Data; using MediaBrowser.Model.Logging; -using MediaBrowser.Server.Implementations.Persistence; namespace MediaBrowser.ServerApplication.Native { diff --git a/MediaBrowser.ServerApplication/Native/WindowsApp.cs b/MediaBrowser.ServerApplication/Native/WindowsApp.cs index 5bed8556e2..babe952d6d 100644 --- a/MediaBrowser.ServerApplication/Native/WindowsApp.cs +++ b/MediaBrowser.ServerApplication/Native/WindowsApp.cs @@ -8,13 +8,12 @@ using System.Diagnostics; using System.IO; using System.Reflection; using System.Windows.Forms; +using Emby.Server.Core; +using Emby.Server.Core.Data; +using Emby.Server.Core.FFMpeg; using MediaBrowser.Common.IO; using MediaBrowser.Controller.IO; using MediaBrowser.Model.IO; -using MediaBrowser.Model.System; -using MediaBrowser.Server.Implementations.Persistence; -using MediaBrowser.Server.Startup.Common.FFMpeg; -using OperatingSystem = MediaBrowser.Server.Startup.Common.OperatingSystem; namespace MediaBrowser.ServerApplication.Native { @@ -48,19 +47,6 @@ namespace MediaBrowser.ServerApplication.Native ServerAuthorization.AuthorizeServer(udpPort, httpServerPort, httpsPort, applicationPath, tempDirectory); } - public NativeEnvironment Environment - { - get - { - return new NativeEnvironment - { - OperatingSystem = OperatingSystem.Windows, - SystemArchitecture = System.Environment.Is64BitOperatingSystem ? Architecture.X64 : Architecture.X86, - OperatingSystemVersionString = System.Environment.OSVersion.VersionString - }; - } - } - public bool SupportsLibraryMonitor { get { return true; } diff --git a/MediaBrowser.ServerApplication/Networking/NetworkManager.cs b/MediaBrowser.ServerApplication/Networking/NetworkManager.cs index 7b4379abf0..ed99dcc061 100644 --- a/MediaBrowser.ServerApplication/Networking/NetworkManager.cs +++ b/MediaBrowser.ServerApplication/Networking/NetworkManager.cs @@ -13,7 +13,7 @@ namespace MediaBrowser.ServerApplication.Networking /// <summary> /// Class NetUtils /// </summary> - public class NetworkManager : Server.Startup.Common.Networking.NetworkManager + public class NetworkManager : Emby.Common.Implementations.Networking.NetworkManager { public NetworkManager(ILogger logger) : base(logger) diff --git a/MediaBrowser.ServerApplication/ServerNotifyIcon.cs b/MediaBrowser.ServerApplication/ServerNotifyIcon.cs index bbf2b785c7..139961e6f3 100644 --- a/MediaBrowser.ServerApplication/ServerNotifyIcon.cs +++ b/MediaBrowser.ServerApplication/ServerNotifyIcon.cs @@ -1,10 +1,10 @@ using MediaBrowser.Controller; using MediaBrowser.Controller.Configuration; using MediaBrowser.Model.Logging; -using MediaBrowser.Server.Startup.Common.Browser; using System; using System.ComponentModel; using System.Windows.Forms; +using Emby.Server.Core.Browser; using MediaBrowser.Model.Globalization; namespace MediaBrowser.ServerApplication diff --git a/MediaBrowser.ServerApplication/packages.config b/MediaBrowser.ServerApplication/packages.config index 8dbcaa2b98..e93f13bee7 100644 --- a/MediaBrowser.ServerApplication/packages.config +++ b/MediaBrowser.ServerApplication/packages.config @@ -2,6 +2,8 @@ <packages> <package id="ImageMagickSharp" version="1.0.0.18" targetFramework="net45" /> <package id="NLog" version="4.4.0-betaV15" targetFramework="net462" /> - <package id="Patterns.Logging" version="1.0.0.6" targetFramework="net462" /> + <package id="ServiceStack.Text" version="4.5.4" targetFramework="net462" /> + <package id="SharpCompress" version="0.14.0" targetFramework="net462" /> + <package id="SimpleInjector" version="3.2.4" targetFramework="net462" /> <package id="System.Data.SQLite.Core" version="1.0.103" targetFramework="net462" /> </packages>
\ No newline at end of file |
