remove core plugin output from source control

pull/702/head
LukePulverenti 12 years ago
parent 767cdc1f6f
commit 509156cbc3

1
.gitignore vendored

@ -31,6 +31,7 @@ local.properties
################# #################
## Media Browser ## Media Browser
################# #################
CorePlugins*/
ProgramData*/ ProgramData*/
ProgramData-Server*/ ProgramData-Server*/
ProgramData-UI*/ ProgramData-UI*/

@ -1,49 +0,0 @@
# use glob syntax
syntax: glob
*.obj
*.pdb
*.user
*.aps
*.pch
*.vspscc
*.vssscc
*_i.c
*_p.c
*.ncb
*.suo
*.tlb
*.tlh
*.bak
*.cache
*.ilk
*.log
*.lib
*.sbr
*.scc
*.psess
*.vsp
*.vspx
*.orig
*.rej
*.sdf
*.opensdf
*.ipch
[Bb]in
[Dd]ebug*/
obj/
[Rr]elease*/
ProgramData*/
ProgramData-Server*/
ProgramData-UI*/
_ReSharper*/
[Tt]humbs.db
[Tt]est[Rr]esult*
[Bb]uild[Ll]og.*
*.[Pp]ublish.xml
*.resharper
# ncrunch files
*.ncrunchsolution
*.ncrunchproject
Setup/*

@ -1,5 +0,0 @@
811bcaa9490681194bd72a01c4b0f91d78a0ec97 CO Version 0.12.12.25
811bcaa9490681194bd72a01c4b0f91d78a0ec97 CO Version 0.12.12.25
0000000000000000000000000000000000000000 CO Version 0.12.12.25
0000000000000000000000000000000000000000 CO Version 0.12.12.25
e98137e38224a0d82cd7d98a71264e0cddc91ca4 CO Version 0.12.12.25

@ -148,7 +148,7 @@
<ItemGroup /> <ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup> <PropertyGroup>
<PostBuildEvent>xcopy "$(TargetPath)" "$(SolutionDir)\MediaBrowser.ServerApplication\" /y</PostBuildEvent> <PostBuildEvent>xcopy "$(TargetPath)" "$(SolutionDir)\MediaBrowser.ServerApplication\CorePlugins\" /y</PostBuildEvent>
</PropertyGroup> </PropertyGroup>
<Import Project="$(SolutionDir)\.nuget\nuget.targets" /> <Import Project="$(SolutionDir)\.nuget\nuget.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.

@ -102,7 +102,7 @@
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup> <PropertyGroup>
<PostBuildEvent>xcopy "$(TargetPath)" "$(SolutionDir)\MediaBrowser.ServerApplication\" /y</PostBuildEvent> <PostBuildEvent>xcopy "$(TargetPath)" "$(SolutionDir)\MediaBrowser.ServerApplication\CorePlugins\" /y</PostBuildEvent>
</PropertyGroup> </PropertyGroup>
<Import Project="$(SolutionDir)\.nuget\nuget.targets" /> <Import Project="$(SolutionDir)\.nuget\nuget.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.

@ -3,7 +3,6 @@ using MediaBrowser.Common.IO;
using MediaBrowser.Common.Localization; using MediaBrowser.Common.Localization;
using MediaBrowser.Common.Mef; using MediaBrowser.Common.Mef;
using MediaBrowser.Common.Net; using MediaBrowser.Common.Net;
using MediaBrowser.Common.Net.Handlers;
using MediaBrowser.Common.Plugins; using MediaBrowser.Common.Plugins;
using MediaBrowser.Common.ScheduledTasks; using MediaBrowser.Common.ScheduledTasks;
using MediaBrowser.Common.Serialization; using MediaBrowser.Common.Serialization;
@ -17,7 +16,6 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel.Composition; using System.ComponentModel.Composition;
using System.ComponentModel.Composition.Hosting; using System.ComponentModel.Composition.Hosting;
using System.ComponentModel.Composition.Primitives;
using System.Deployment.Application; using System.Deployment.Application;
using System.Diagnostics; using System.Diagnostics;
using System.IO; using System.IO;
@ -517,6 +515,31 @@ namespace MediaBrowser.Common.Kernel
yield return pluginAssembly; yield return pluginAssembly;
} }
var runningDirectory = Path.GetDirectoryName(Process.GetCurrentProcess().MainModule.FileName);
var corePluginDirectory = Path.Combine(runningDirectory, "CorePlugins");
// This will prevent the .dll file from getting locked, and allow us to replace it when needed
pluginAssemblies = Directory.EnumerateFiles(corePluginDirectory, "*.dll", SearchOption.TopDirectoryOnly)
.Select(file =>
{
try
{
return Assembly.Load(File.ReadAllBytes((file)));
}
catch (Exception ex)
{
_failedPluginAssemblies.Add(file);
Logger.ErrorException("Error loading {0}", ex, file);
return null;
}
}).Where(a => a != null);
foreach (var pluginAssembly in pluginAssemblies)
{
yield return pluginAssembly;
}
// Include composable parts in the Model assembly // Include composable parts in the Model assembly
yield return typeof (SystemInfo).Assembly; yield return typeof (SystemInfo).Assembly;

@ -209,56 +209,52 @@ namespace MediaBrowser.Common.Net
RaiseReceiveWebRequest(context); RaiseReceiveWebRequest(context);
Task.Run(() => try
{ {
try ProcessRequest(context);
{ }
ProcessRequest(context); catch (InvalidOperationException ex)
} {
catch (InvalidOperationException ex) HandleException(context.Response, ex, 422);
{
HandleException(context.Response, ex, 422);
throw;
}
catch (ResourceNotFoundException ex)
{
HandleException(context.Response, ex, 404);
throw; throw;
} }
catch (FileNotFoundException ex) catch (ResourceNotFoundException ex)
{ {
HandleException(context.Response, ex, 404); HandleException(context.Response, ex, 404);
throw; throw;
} }
catch (DirectoryNotFoundException ex) catch (FileNotFoundException ex)
{ {
HandleException(context.Response, ex, 404); HandleException(context.Response, ex, 404);
throw; throw;
} }
catch (UnauthorizedAccessException ex) catch (DirectoryNotFoundException ex)
{ {
HandleException(context.Response, ex, 401); HandleException(context.Response, ex, 404);
throw; throw;
} }
catch (ArgumentException ex) catch (UnauthorizedAccessException ex)
{ {
HandleException(context.Response, ex, 400); HandleException(context.Response, ex, 401);
throw; throw;
} }
catch (Exception ex) catch (ArgumentException ex)
{ {
HandleException(context.Response, ex, 500); HandleException(context.Response, ex, 400);
throw; throw;
} }
catch (Exception ex)
{
HandleException(context.Response, ex, 500);
}); throw;
}
} }
/// <summary> /// <summary>

@ -412,18 +412,6 @@ namespace MediaBrowser.Controller
await Task.WhenAll(itemRepoTask, userRepoTask, userDataRepoTask, displayPreferencesRepoTask).ConfigureAwait(false); await Task.WhenAll(itemRepoTask, userRepoTask, userDataRepoTask, displayPreferencesRepoTask).ConfigureAwait(false);
} }
protected override IEnumerable<Assembly> GetComposablePartAssemblies()
{
var runningDirectory = Path.GetDirectoryName(Process.GetCurrentProcess().MainModule.FileName);
return base.GetComposablePartAssemblies().Concat(new[] {
Assembly.Load(File.ReadAllBytes(Path.Combine(runningDirectory, "MediaBrowser.Api.dll"))),
Assembly.Load(File.ReadAllBytes(Path.Combine(runningDirectory, "MediaBrowser.ApiInteraction.Javascript.dll"))),
Assembly.Load(File.ReadAllBytes(Path.Combine(runningDirectory, "MediaBrowser.WebDashboard.dll")))
});
}
/// <summary> /// <summary>
/// Gets a repository by name from a list, and returns the default if not found /// Gets a repository by name from a list, and returns the default if not found
/// </summary> /// </summary>

@ -314,13 +314,13 @@
</BootstrapperPackage> </BootstrapperPackage>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="MediaBrowser.Api.dll"> <Content Include="CorePlugins\MediaBrowser.Api.dll">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content> </Content>
<Content Include="MediaBrowser.ApiInteraction.Javascript.dll"> <Content Include="CorePlugins\MediaBrowser.ApiInteraction.Javascript.dll">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content> </Content>
<Content Include="MediaBrowser.WebDashboard.dll"> <Content Include="CorePlugins\MediaBrowser.WebDashboard.dll">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content> </Content>
<Content Include="x64\SQLite.Interop.dll"> <Content Include="x64\SQLite.Interop.dll">

@ -400,7 +400,7 @@
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup> <PropertyGroup>
<PostBuildEvent>xcopy "$(TargetPath)" "$(SolutionDir)\MediaBrowser.ServerApplication\" /y</PostBuildEvent> <PostBuildEvent>xcopy "$(TargetPath)" "$(SolutionDir)\MediaBrowser.ServerApplication\CorePlugins\" /y</PostBuildEvent>
</PropertyGroup> </PropertyGroup>
<Import Project="$(SolutionDir)\.nuget\nuget.targets" /> <Import Project="$(SolutionDir)\.nuget\nuget.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.

Loading…
Cancel
Save