Some Linux/Mac players get libgdiplus DLL-not-found error when mod loads PNG
Pathoschild opened this issue · 2 comments
When the content API added by #257 is used to load a PNG, some Linux/Mac users get this error:
A mod failed handling the ControlEvents.KeyPressed event:
Microsoft.Xna.Framework.Content.ContentLoadException: Stardewponics failed loading content asset 'assets/greenhouse.png' from ModFolder.
---> System.InvalidOperationException: This image format is not supported
---> System.TypeInitializationException: The type initializer for 'System.Drawing.GDIPlus' threw an exception.
---> System.DllNotFoundException: libgdiplus.dylib
This isn't unique to SMAPI — many players have reported the same problem with the GetDressed mod on Linux/Mac. The problem happens because the libgdiplus library isn't included in the game's local version of Mono, though it doesn't affect all players.
Based on testing with one affected player, copying libgdiplus.dylib
into the game folder seems to work. We'll need to see if the same file works for others; if so, we can just add it to the install package for Linux/Mac players.