UnityDoorstop icon indicating copy to clipboard operation
UnityDoorstop copied to clipboard

Change to mono search path logic breaks MacOS dll loading

Open CptMoore opened this issue 1 year ago • 2 comments

The changes introduced in https://github.com/NeighTools/UnityDoorstop/pull/57 break env variable interpretations on MacOS.

Before we could specify the target assembly relative to the resources directory path and omit additional search paths:

DOORSTOP_TARGET_ASSEMBLY="Mods/ModTek/lib/ModTek.Preloader.dll"

Now it has to be:

DOORSTOP_TARGET_ASSEMBLY="BattleTech.app/Contents/Resources/Mods/ModTek/lib/ModTek.Preloader.dll"
DOORSTOP_MONO_DLL_SEARCH_PATH_OVERRIDE="BattleTech.app/Contents/Resources/Mods/ModTek/lib"

Note that neither Windows nor Linux are affected, its just MacOS.

Our workaround is to add via run.sh a hardcoded prefix to paths in case its Darwin:

    additional_path="BattleTech.app/Contents/Resources"
    DOORSTOP_TARGET_ASSEMBLY="$additional_path/$DOORSTOP_TARGET_ASSEMBLY"
    DOORSTOP_MONO_DLL_SEARCH_PATH_OVERRIDE="$additional_path/$DOORSTOP_MONO_DLL_SEARCH_PATH_OVERRIDE"

Additionally, the README does not mention DOORSTOP_MONO_DLL_SEARCH_PATH_OVERRIDE.

CptMoore avatar Dec 28 '24 18:12 CptMoore

Is this still an issue on master?

ManlyMarco avatar Sep 08 '25 11:09 ManlyMarco

probably still an issue, we have to wait until a macos user can test it

CptMoore avatar Sep 16 '25 10:09 CptMoore