rquinio / PortraitBuilder

:art: Portrait Builder tool for Crusader Kings II
http://www.ckiiwiki.com/Portrait_Builder
GNU Lesser General Public License v3.0
15 stars 3 forks source link

Support build on Linux with Mono #3

Open rquinio opened 7 years ago

rquinio commented 7 years ago

cf failed build https://travis-ci.org/rquinio/PortraitBuilder/builds/141745957

Cannot read symbol file StackTrace: at Mono.CompilerServices.SymbolWriter.MonoSymbolFile..ctor (System.IO.Stream stream) <0x41314510 + 0x006b9> in :0 at Mono.CompilerServices.SymbolWriter.MonoSymbolFile.ReadSymbolFile (System.IO.Stream stream) <0x413144c0 + 0x00037> in :0 at Mono.Cecil.Mdb.MdbReaderProvider.GetSymbolReader (Mono.Cecil.ModuleDefinition module, System.IO.Stream symbolStream) <0x413bbd30 + 0x00036> in :0 at Mono.Cecil.ModuleReader.ReadSymbols (Mono.Cecil.ModuleDefinition module, Mono.Cecil.ReaderParameters parameters) <0x41313f80 + 0x000ca> in :0 at Mono.Cecil.ModuleReader.CreateModuleFrom (Mono.Cecil.PE.Image image, Mono.Cecil.ReaderParameters parameters) <0x41310960 + 0x001b3> in :0 at Mono.Cecil.ModuleDefinition.ReadModule (System.IO.Stream stream, Mono.Cecil.ReaderParameters parameters) <0x4130b400 + 0x0007a> in :0 at ModuleWeaver.GetTemplateModuleDefinition () <0x413b99f0 + 0x00135> in :0 at ModuleWeaver.ImportAssemblyLoader (Boolean createTemporaryAssemblies) <0x413b9100 + 0x0002e> in :0 at ModuleWeaver.Execute () <0x41364d60 + 0x000ea> in :0 at (wrapper dynamic-method) System.Object:lambda_method (System.Runtime.CompilerServices.Closure,object) at InnerWeaver.ExecuteWeavers () <0x41364690 + 0x00241> in :0 at InnerWeaver.Execute () <0x41306370 + 0x0012a> in :0 `

rquinio commented 7 years ago

CSharpImageLibrary is not portable to Mono. Exception at runtime:

System.TypeInitializationException: The type initializer for 'CSharpImageLibrary.General.ImageEngine' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies.
  at CSharpImageLibrary.General.ImageEngine..cctor () [0x00001] in <3dc04d04432f426a9b607a579ef3b5a7>:0 
   --- End of inner exception stack trace ---
  at CSharpImageLibrary.General.ImageEngineImage.LoadFromFile (System.String imagePath, System.Int32 desiredMaxDimension, System.Boolean enforceResize) [0x00013] in <3dc04d04432f426a9b607a579ef3b5a7>:0 
  at CSharpImageLibrary.General.ImageEngineImage..ctor (System.String imagePath) [0x00008] in <3dc04d04432f426a9b607a579ef3b5a7>:0 
  at PortraitBuilder.Model.Portrait.Sprite.Load (System.String filePath) [0x00011] in C:\Users\Romain\git\PortraitBuilder\PortraitBuilder\Model\Portrait\Sprite.cs:33 
  at PortraitBuilder.Engine.PortraitRenderer.LoadSprite (PortraitBuilder.Model.Portrait.Sprite sprite, System.Collections.Generic.List`1[T] activeContents) [0x000d5] in C:\Users\Romain\git\PortraitBuilder\PortraitBuilder\Engine\PortraitRenderer.cs:151 
  at PortraitBuilder.Engine.PortraitRenderer.DrawLayer (PortraitBuilder.Model.Portrait.Layer layer, System.Drawing.Graphics g, PortraitBuilder.Model.Portrait.Portrait portrait, System.Collections.Generic.List`1[T] activeContents, System.Collections.Generic.Dictionary`2[TKey,TValue] sprites) [0x00053] in C:\Users\Romain\git\PortraitBuilder\PortraitBuilder\Engine\PortraitRenderer.cs:63 
rquinio commented 6 years ago

Ubuntu (on Windows) with Mono 5.14: 3 0-rc 2-linux

MacOS with Mono 5.8: 3 0-rc 2-mac

It now starts on Linux and MacOS. But there's still a big issue with the portrait being blank (though the dds portrait frames strangely render fine)... Also some dropdown size issues, plus some panel overflows.