Added arm64 Windows build output for FreeImage dependency #10
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
FreeImage is used by the mgcb task to pack images into xnb content packages. It doesn't currently support arm64, which means that some notebook computers (GalaxyBook, some recent Surface products, etc.) aren't able to build MonoGame projects. This PR adds arm64 support for the FreeImage dependency, which is one step in the road to supporting these devices.
Added an arm64 configuration to the freeimage submodule
I added an arm64 configuration to the vs2017 solution and project files. for The build rules were copied verbatim from the x64, except that
RandomizedBaseAddress
had to be set to true as arm64 doesn't support otherwise. Additionally, I had to change the#define
check in infsimd.h to avoid including mmintrin.h on arm64, and it's not supported.Added an arm64 output to BuildWindowsTask.cs
I modified BuildWindowsTask.cs to create an additional build output for arm64. The previous x64 DLL is now copied to a subfolder, which will be a slight compatibility break. Let me know if there's a better way to d othis.
Testing
I have verified that if I manually copy the arm64 FreeImage.dll built with these changes into a local copy of the dotnet-mgcb package, I the mgcb task builds a content pack containing images on my GalaxyBook. Additionally, I have verified that it continues to produce the same output in its x64 folder after the change as it did before.
Expected Impact
There will not be any end-product features enabled by this PR alone. The remaining work is:
After that, it will be possible to build (but not modify) mgcb files on arm64 devices.