HinTak/mono-modification

Bundling .dylibs and Dlls in the macOS app

Closed this issue · 2 comments

Hi,

I am not sure if this is the right place to reach out to you with this particular issue. But, I went through some issues on github where you have commented.

I have been using the https://github.com/mono/Embeddinator-4000 to generate Objective - C framework (macOS) from C# DLLs.

There is a /Library/Frameworks/Mono.framework/Versions/6.12.0/lib/libmonosgen-2.0.1.dylib dependency in the .Framework created by Embeddinator-4000

which I handle it by using the install_name_tool to change the reference path.

However, I am getting this error when the machine has no Mono installed in it
/Library/Frameworks/Mono.framework/Versions/6.12.0/lib/mono/4.5/mscorlib.dll

Is there any way I can bundle the mscorlib.dll inside my macOS app and point the reference to the app bundle? I don't want to force the user install mono in their machine.

Thanks! any help/advice is appreciated.

No, this is not an appropriate use of my own repository issue tracker. The appropriate way is file wherever appropriate, but do an @somebody over there . That said, you probably want to read the documentation of mkbundle, and in particular, the config option and machine-config option to bundle a config file and machine config file, which are about how mono find the runtime files like mscorlib.dll . I think there are a few environment variables to influence where mono looks up files too (PATH certainly, but that's too generic and has some side effects). Those are documented in mono's manpage.

Mono is also responsive to a few environment variables like MONO_DEBUG which you can set to interesting values for it to emit some info about how and where it is retrying to look up files. The documentation is again in the tail end of the mono manpage.