Thanks a lot, I didn’t know about those packages! I am now using 3.8.1.210-develop
by referring to a local nuget feed and the game runs! I didn’t have to build to modify the bundled SDL or OpenAL, so that version is all working on M1!
However, content cannot build. I made sure to install the ones from GitHub, so these are my dotnet tools…
╰─❯ dotnet tool list -g ╯
Package Id Version Commands
------------------------------------------------------------------
dotnet-mgcb 3.8.1.210-develop mgcb
dotnet-mgcb-editor-mac 3.8.1.210-develop mgcb-editor-mac
dotnet-mgfxc 3.8.1.210-develop mgfxc
…along with the project references
Project 'KyoobGame' has the following package references
[net6.0]:
Top-level Package Requested Resolved
> MonoGame.Content.Builder.Task 3.8.1.210-develop 3.8.1.210-develop
> MonoGame.Framework.DesktopGL 3.8.1.210-develop 3.8.1.210-develop
Project 'KyoobLibrary' has the following package references
[net6.0]:
Top-level Package Requested Resolved
> LibNoise.NetStandart 0.2.0 0.2.0
> MonoGame.Framework.DesktopGL 3.8.1.210-develop 3.8.1.210-develop
> Newtonsoft.Json 13.0.1 13.0.1
However when the content pipeline is involved the dotnet mgcb
command fails. I tried it separately on the terminal and this was my result:
Could not execute because the specified command or file was not found.
Possible reasons for this include:
* You misspelled a built-in dotnet command.
* You intended to execute a .NET program, but dotnet-mgcb does not exist.
* You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.
Running the same command but without the dotnet
prefix works (I added dotnet global tools to my PATH) but now fails with a whole bunch of new errors! (I haven’t had the time to setup the wine installation so I get that one, the other two I feel like they should work)
Build started 2022-06-01 8:10:27 PM
/Users/lancelot/Developer/Clone/kyoob/source/KyoobGame/Content/arial.spritefont
Building Font /System/Library/Fonts/Supplemental/Arial.ttf
/Users/lancelot/Developer/Clone/kyoob/source/KyoobGame/Content/arial.spritefont: error: Processor 'FontDescriptionProcessor' had unexpected failure!
System.DllNotFoundException: Unable to load shared library 'freetype6' or one of its dependencies. In order to help diagnose loading problems, consider setting the DYLD_PRINT_LIBRARIES environment variable: dlopen(libfreetype6, 0x0001): tried: 'libfreetype6' (no such file), '/usr/local/lib/libfreetype6' (no such file), '/usr/lib/libfreetype6' (no such file), '/Users/lancelot/Developer/Clone/kyoob/source/KyoobGame/libfreetype6' (no such file)
at SharpFont.FT.FT_Init_FreeType(IntPtr& alibrary)
at SharpFont.Library..ctor()
at Microsoft.Xna.Framework.Content.Pipeline.Graphics.SharpFontImporter.Import(FontDescription options, String fontName) in /home/runner/work/MonoGame/MonoGame/MonoGame.Framework.Content.Pipeline/Graphics/Font/SharpFontImporter.cs:line 29
at Microsoft.Xna.Framework.Content.Pipeline.Processors.FontDescriptionProcessor.ImportFont(FontDescription options, Single& lineSpacing, Int32& yOffsetMin, ContentProcessorContext context, String fontName) in /home/runner/work/MonoGame/MonoGame/MonoGame.Framework.Content.Pipeline/Processors/FontDescriptionProcessor.cs:line 194
at Microsoft.Xna.Framework.Content.Pipeline.Processors.FontDescriptionProcessor.Process(FontDescription input, ContentProcessorContext context) in /home/runner/work/MonoGame/MonoGame/MonoGame.Framework.Content.Pipeline/Processors/FontDescriptionProcessor.cs:line 80
at Microsoft.Xna.Framework.Content.Pipeline.ContentProcessor`2.Microsoft.Xna.Framework.Content.Pipeline.IContentProcessor.Process(Object input, ContentProcessorContext context) in /home/runner/work/MonoGame/MonoGame/MonoGame.Framework.Content.Pipeline/ContentProcessor.cs:line 60
at MonoGame.Framework.Content.Pipeline.Builder.PipelineManager.ProcessContent(PipelineBuildEvent pipelineEvent) in /home/runner/work/MonoGame/MonoGame/MonoGame.Framework.Content.Pipeline/Builder/PipelineManager.cs:line 717
/Users/lancelot/Developer/Clone/kyoob/source/KyoobGame/Content/block_render.fx
/Users/lancelot/Developer/Clone/kyoob/source/KyoobGame/Content/block_render.fx: MGFXC effect compiler requires a valid Wine installation to be able to compile shaders.
Setup instructions:
- Create 64 bit wine prefix
- Install d3dcompiler_47 using winetricks
- Install .NET 6
- Setup MGFXC_WINE_PATH environmental variable to point to a valid wine prefix
/Users/lancelot/Developer/Clone/kyoob/source/KyoobGame/Content/spritesheet.png
/Users/lancelot/Developer/Clone/kyoob/source/KyoobGame/Content/spritesheet.png: error: Importer 'TextureImporter' had unexpected failure!
System.DllNotFoundException: Unable to load shared library 'FreeImage' or one of its dependencies. In order to help diagnose loading problems, consider setting the DYLD_PRINT_LIBRARIES environment variable: dlopen(libFreeImage, 0x0001): tried: 'libFreeImage' (no such file), '/usr/local/lib/libFreeImage' (no such file), '/usr/lib/libFreeImage' (no such file), '/Users/lancelot/Developer/Clone/kyoob/source/KyoobGame/libFreeImage' (no such file)
at FreeImageAPI.FreeImage.GetFileTypeS(String filename, Int32 size)
at FreeImageAPI.FreeImage.GetFileType(String filename, Int32 size) in /home/runner/work/MonoGame/MonoGame/MonoGame.Framework.Content.Pipeline/Utilities/FreeImageAPI.cs:line 122
at Microsoft.Xna.Framework.Content.Pipeline.TextureImporter.Import(String filename, ContentImporterContext context) in /home/runner/work/MonoGame/MonoGame/MonoGame.Framework.Content.Pipeline/TextureImporter.cs:line 83
at Microsoft.Xna.Framework.Content.Pipeline.ContentImporter`1.Microsoft.Xna.Framework.Content.Pipeline.IContentImporter.Import(String filename, ContentImporterContext context) in /home/runner/work/MonoGame/MonoGame/MonoGame.Framework.Content.Pipeline/ContentImporter.cs:line 45
at MonoGame.Framework.Content.Pipeline.Builder.PipelineManager.ProcessContent(PipelineBuildEvent pipelineEvent) in /home/runner/work/MonoGame/MonoGame/MonoGame.Framework.Content.Pipeline/Builder/PipelineManager.cs:line 669
Build 0 succeeded, 3 failed.
Time elapsed 00:00:00.29.