defold / editor2-issues

DEPRECATED
44 stars 4 forks source link

Dynamic libraries from bundle_resources not available when building from editor #2424

Open erikangelin-king opened 5 years ago

erikangelin-king commented 5 years ago

https://forum.defold.com/t/desktop-steam/30000/7

erikangelin-king commented 5 years ago

(After discussion with @britzl and @mathiaswking) The bundle_resources directory has some internal structure for the different platforms. For macos, dynamic libraries are typically under osx/Contents/MacOS, intended for the corresponding directory in the .app. Ideas:

dapetcu21 commented 5 years ago

+1 for this. I have the same issue for the FMOD and Discord Rich Presence extensions (using the res dir from native extensions instead of bundle_resources, but the principle should be the same). Currently I'm asking the library user to copy the libraries to a folder in their project manually:

https://github.com/dapetcu21/defold-fmod#running-in-the-editor

Then, I have to do this crazy thing to obtain the path to them in order to load them with dlopen():

https://github.com/dapetcu21/defold-fmod/blob/master/bridge/src/fmod_dynamic_loading.cpp#L182