Tweaked the assembly blacklisting for linux. Building stuff on linux does now work without crashing mono.

This commit is contained in:
SND\eagleeyestudios_cp 2013-06-03 20:12:07 +00:00 committed by Konstantin Koch
parent 3446b428fc
commit c134042d56
4 changed files with 26 additions and 6 deletions

View File

@ -11,6 +11,7 @@
<RootNamespace>ANX.Framework.Content.Pipeline</RootNamespace> <RootNamespace>ANX.Framework.Content.Pipeline</RootNamespace>
<AssemblyName>ANX.Framework.Content.Pipeline</AssemblyName> <AssemblyName>ANX.Framework.Content.Pipeline</AssemblyName>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<ReleaseVersion>4.0</ReleaseVersion>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>True</DebugSymbols> <DebugSymbols>True</DebugSymbols>
@ -218,11 +219,11 @@
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\ANX.Framework\ANX.Framework_Linux.csproj"> <ProjectReference Include="..\ANX.Framework\ANX.Framework_Linux.csproj">
<Project>{6899F0C9-70B9-4EB0-9DD3-E598D4BE3E35}</Project> <Project>{6899F0C9-70B9-4EB0-9DD3-E598D4BE3E35}</Project>
<Name>ANX.Framework</Name> <Name>ANX.Framework_Linux</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\Support\WaveUtils\WaveUtils_Linux.csproj"> <ProjectReference Include="..\Support\WaveUtils\WaveUtils_Linux.csproj">
<Project>{1986B0ED-3D28-4FEE-82D0-BCC39C87C18C}</Project> <Project>{1986B0ED-3D28-4FEE-82D0-BCC39C87C18C}</Project>
<Name>WaveUtils</Name> <Name>WaveUtils_Linux</Name>
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup /> <ItemGroup />

View File

@ -157,6 +157,12 @@ namespace ANX.Framework.Content.Pipeline.Serialization.Compiler
public void AddContentWriterAssembly(Assembly assembly) public void AddContentWriterAssembly(Assembly assembly)
{ {
#if LINUX
//Apparently these Assemblies are bad juju, so lets blacklist them as we don't need to check them anyway
if (assembly.FullName == "MonoDevelop.Core, Version=2.6.0.0, Culture=neutral, PublicKeyToken=null" || assembly.FullName == "pango-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f"
|| assembly.FullName == "Mono.TextEditor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" || assembly.FullName == "MonoDevelop.Ide, Version=2.6.0.0, Culture=neutral, PublicKeyToken=null")
return;
#endif
foreach (Type type in assembly.GetTypes()) foreach (Type type in assembly.GetTypes())
{ {
ContentTypeWriterAttribute[] value = (ContentTypeWriterAttribute[])type.GetCustomAttributes(typeof(ContentTypeWriterAttribute), true); ContentTypeWriterAttribute[] value = (ContentTypeWriterAttribute[])type.GetCustomAttributes(typeof(ContentTypeWriterAttribute), true);

View File

@ -25,8 +25,11 @@ namespace ANX.Framework.Content.Pipeline.Tasks
{ {
#if LINUX #if LINUX
//Apparently these Assemblies are bad juju, so lets blacklist them as we don't need to check them anyway //Apparently these Assemblies are bad juju, so lets blacklist them as we don't need to check them anyway
if (assembly.FullName == "MonoDevelop.Core, Version=2.6.0.0, Culture=neutral, PublicKeyToken=null" || assembly.FullName == "pango-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f") if (assembly.FullName == "MonoDevelop.Core, Version=2.6.0.0, Culture=neutral, PublicKeyToken=null" || assembly.FullName == "pango-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f"
|| assembly.FullName == "Mono.TextEditor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" || assembly.FullName == "MonoDevelop.Ide, Version=2.6.0.0, Culture=neutral, PublicKeyToken=null")
return; return;
Console.WriteLine("ImporterManager: Checking " + assembly.FullName);
#endif #endif
foreach (Type type in TypeHelper.SafelyExtractTypesFrom(assembly)) foreach (Type type in TypeHelper.SafelyExtractTypesFrom(assembly))
{ {

View File

@ -21,11 +21,16 @@ namespace ANX.Framework.Content.Pipeline.Tasks
{ {
foreach (Assembly assembly in AppDomain.CurrentDomain.GetAssemblies()) foreach (Assembly assembly in AppDomain.CurrentDomain.GetAssemblies())
{ {
#if LINUX #if LINUX
//Apparently these Assemblies are bad juju, so lets blacklist them as we don't need to check them anyway //Apparently these Assemblies are bad juju, so lets blacklist them as we don't need to check them anyway
if (assembly.FullName == "MonoDevelop.Core, Version=2.6.0.0, Culture=neutral, PublicKeyToken=null" || assembly.FullName == "pango-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f") if (assembly.FullName == "MonoDevelop.Core, Version=2.6.0.0, Culture=neutral, PublicKeyToken=null" || assembly.FullName == "pango-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f"
|| assembly.FullName == "Mono.TextEditor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" || assembly.FullName == "MonoDevelop.Ide, Version=2.6.0.0, Culture=neutral, PublicKeyToken=null")
return; return;
#endif
Console.WriteLine("ProcessorManager: Checking " + assembly.FullName);
#endif
try
{
foreach (Type type in assembly.GetTypes()) foreach (Type type in assembly.GetTypes())
{ {
ContentProcessorAttribute[] value = (ContentProcessorAttribute[]) type.GetCustomAttributes(typeof(ContentProcessorAttribute), true); ContentProcessorAttribute[] value = (ContentProcessorAttribute[]) type.GetCustomAttributes(typeof(ContentProcessorAttribute), true);
@ -34,6 +39,11 @@ namespace ANX.Framework.Content.Pipeline.Tasks
processors[type.Name] = (IContentProcessor)Activator.CreateInstance(type); processors[type.Name] = (IContentProcessor)Activator.CreateInstance(type);
} }
} }
}
catch(Exception ex)
{
Console.WriteLine(assembly.FullName);
}
} }
} }