Add native plug‑in loading support#86
Add native plug‑in loading support#86rm-NoobInCoding wants to merge 2 commits intoNeighTools:masterfrom rm-NoobInCoding:support-native-plugin
Conversation
| get_env_bool("DOORSTOP_MONO_DEBUG_SUSPEND", &config.mono_debug_suspend); | ||
| try_get_env("DOORSTOP_MONO_DEBUG_ADDRESS", TEXT("127.0.0.1:10000"), | ||
| &config.mono_debug_address); | ||
| get_env_path("DOORSTOP_TARGET_NATIVE_ASSEMBLY", &config.target_native_library); |
There was a problem hiding this comment.
You have not set this ENV variable in your changes to run.sh
There was a problem hiding this comment.
Although I can't really understand what you mean, I assumed you meant the exports in run.sh
There was a problem hiding this comment.
We've talked about this on the bepinex discord server and overall it seems that this feature is not desired.
It seems to be a niche use case where it would be more appropriate to create a custom doorstop build instead.
Also the mention of cheating raised some eyebrows but it wasn't the deciding factor.
If you'd still like to have this PR merged, please come discuss it on the bepinex discord server. I'll close the PR until then.
|
If you don't want it, then I don't see any reason to insist on merging it. |
|
Nothing about doorstop is stopping you from using native dlls, just use a different entry point than winhttp. version.dll works well. |
|
I tried with Hollow Knight Silksong and it didn't work. That's why I made this PR. |
This change introduces an optional
target_native_librarysetting that allows Doorstop to load a C/C++ DLL in addition to the managed assembly.I added this because UnityDoorstop has a conflict with regular ASI loaders for loading native plugins (for loading game cheats/hooks/...), and using both UnityDoorstop and ASI loader will most likely cause the game to crash (or it can make UnityDoorstop not work)
The bootstrap now calls
dlopen()/LoadLibrary()on the configured DLL and invokes an exported entrypoint (falling back toDllMainon Windows if needed).Configuration parsing on both Windows and *nix has been updated to support the new setting.