bevy_fmod icon indicating copy to clipboard operation
bevy_fmod copied to clipboard

Support macOS

Open Salzian opened this issue 1 year ago • 5 comments

Salzian avatar Mar 12 '23 14:03 Salzian

Got a basic version running locally but requires some cleanup before merging.

Salzian avatar Mar 08 '24 13:03 Salzian

Hey, are you still looking into this? Otherwise I might have a stab at it in the coming weeks.

msvbg avatar Jul 12 '24 21:07 msvbg

I did work on this in the macos branch. I just pushed my latest WIP changes, but I remember there were still unresolved issues.

The biggest problem I face is, that bevy AFAIK does not have a bundling mechanism for assets. And depending on the operating system, dynamic libraries can only be loaded from certain directories, also depending on the working directory from where the executable was started.

I was able to get Windows working very easily, as it seems to load DLLs from many directories by default. However, macOS doesn't do that. I tried using linking options in build.rs, but no luck. There is also barely any info on the topic of dynamic libraries with rust on macOS. Seems like it's quite a niece use case.

The only way I was able to get it consistently work is by also copying over the dynlib files into the build output. But I would rather appreciate it if there was already a uniform bundling mechanism in bevy, similar to how other engines bundle their assets.

So yes, if you have an elegant idea or can convince the rust compiler somehow to use stable and correct linking arguments, go for it. I'm not working on this right now.

Salzian avatar Jul 15 '24 11:07 Salzian

Sorry for the slow response, I forgot to reply to this. I see that you've now sorted this out without my help!

msvbg avatar Aug 02 '24 11:08 msvbg

@msvbg No worries. I just wanted to push 0.5 on my machine and got annoyed by the lack of proper MacOS support again 😅

Salzian avatar Aug 02 '24 16:08 Salzian