Relinker making some games using XNA 4.0 run with FNA. It goes as far as booting some X360 games on Android.
xbuild
or something that compiles C# code.XnaToFna.exe
into the game directory.FNA.dll
and the native libs into the game directory.XnaToFna.exe
with Mono on Linux / macOS or .NET Framework on Windows.XnaToFna.exe
in the game directory because the game now also links to the XnaToFnaHelper
inside it, whoops.DllImport
s and unsupported, closed-source native libraries.Using MonoMod, it sets up the relinking map in MonoMod to relink all Microsoft.Xna.Framework
references to FNA
instead.
It can also relink from Microsoft.Xna.Framework.Net
and Microsoft.Xna.Framework.GamerServices
to FNA.NetStub
, if it exists in the game directory.
Finally, it applies some optional salt and pepper here and there (XmlIgnore
this, XnaToFnaHelper.GetProxyFormHandle
that).
XnaToFna-Legacy was practically a heavily modified fork of MonoMod, meant to relink and only to relink... and fix the paths, which didn't always work.
This rebuilt version uses "MonoMod neo", which itself is a rebuilt version of MonoMod. It now supports defining a custom relinker and relinking maps for the default relinker.
Before, most relinker fixes ping-ponged between MonoMod and XnaToFna, while some of them weren't even compatible with each other.
Keeping the actual relinking in MonoMod means there's only one relinker to maintain and only one place where it can screw up.