Plugin Dynamic Library Deployment for Mac

Apologies for such a long delay. I got sidetracked and couldn’t properly test this until now.

The change is very simple: in AddLibraryToRPaths in MacToolChain.cs replace this line:

if (!RelativePath.Contains(LibraryDir) && !RPaths.Contains(RelativePath))

with:

if ((!RelativePath.Contains(LibraryDir) || RelativePath.Contains("/ThirdParty/")) && !RPaths.Contains(RelativePath))

After that, make sure the id of the lib in libfmodL.dylib is using @rpath. You can check that using otool tool. In Terminal, do this:

otool -L libfmodL.dylib

If the first entry on the list is not @rpath/libfmodL.dylib, do this in terminal:

install_name_tool -id @rpath/libfmodL.dylib libfmodL.dylib

Finally, in Mac section of your .Build.cs file, add something like this:

string Path = "../../Binaries/Mac/libfmodL.dylib";
PublicDelayLoadDLLs.Add(Path);
PublicAdditionalShadowFiles.Add(Path);
RuntimeDependencies.Add(new RuntimeDependency(Path));

Let me know if you run into any issues with that.

Also, as you most likely noticed by now, UDN formatting is failing. I hope this is readable enough :confused: