mumble-voip / mumble

Mumble is an open-source, low-latency, high quality voice chat software.
https://www.mumble.info
Other
6.28k stars 1.11k forks source link

Positional plugin issues #6178

Closed Foereaper closed 1 year ago

Foereaper commented 1 year ago

The issue

Hi!

I'm currently writing a version of the WoW positional audio plugin for Wrath of the Lich King. I have fetched all the required offsets, compiled said plugin (using MSVC14 - 2015) out of tree as a dll, but when trying to load it in Mumble 1.4.287 I get the following error message:

Non-plugin found in plugin directory: "C:/Users/xxx/AppData/Roaming/Mumble/Plugins/wow3.dll

When trying to install the plugin through settings, I get this message:

Unable to load plugin "wow3.dll" - check the plugin interface!

Since none of the guides covered writing plugins for 1.4, am I correct to assume MSVC2015 is still to be used? Does it expect a newer compiler possibly?

This is a carbon copy of one of the other WoW plugins, so it uses the legacy interface. I assume this is still supported in 1.4, so I reckon I'm compiling the dll wrong.

Any help is appreciated!

Mumble version

1.4.287

Mumble component

Client

OS

Windows

Additional information

No response

Foereaper commented 1 year ago

Quick update, I use VS2022, but I downloaded the 2015 build tools and set the project toolset to 2015. Upon inspection, it seems MSVC version is still set to 1933 (2022) instead of 1900 as expected. Does anyone have any experience with this, or do I need to bite the bullet and try to get 2015 installed separately?

davidebeatrici commented 1 year ago

The legacy interface requires the C++ ABI to match, the new one has no such issue as its plugin API is in C.

By the way, official Mumble releases are built with the MSVC version that is provided on Azure Pipelines, more specifically: https://github.com/actions/runner-images/blob/main/images/win/Windows2022-Readme.md

Foereaper commented 1 year ago

Thank you! So since it is built with 2022, I should also build this legacy plugin using the 2022 toolset? I'd ideally like to get this plugin to work with whatever the release version is built with, asking end users to compile their own version of the application is a bit too big of an ask.

I looked at the newer API, and porting this legacy plugin to the newer API seems like a much bigger task than potentially getting the legacy DLL working.

Krzmbrzl commented 1 year ago

Thank you! So since it is built with 2022, I should also build this legacy plugin using the 2022 toolset?

Yes

However, it'd be when better to use the new plugin interface introduced with 1.4 as this Wilk be completely independent of the used compiler. See https://github.com/mumble-voip/mumble/blob/master/docs/dev/plugins/README.md for documentation of the new plugin framework.

I looked at the newer API, and porting this legacy plugin to the newer API seems like a much bigger task than potentially getting the legacy DLL working.

It'll be a bit more work, but ultimately it shouldn't be tok complicated. And as I already mentioned: it'll name things a lot easier in the long run due to no longer being dependent on the exact compiler that Mumble has been compiled with.

Foereaper commented 1 year ago

As an update, I tried to compile using VS2022, and 1.4 would still not accept the plugin with the same error as mentioned above.

I bit the bullet and downloaded VS2015, compiled the exact same plugin code and it works perfectly with 1.3, so I suspect there's some weird VS version discrepancy that I can't figure out.

Could it be that 1.4 in release was originally compiled with 2019 or something? The compile logs are unfortunately gone from the action, so I can't really double check.

I might look into porting the code to the new API at some point, but for now it works with 1.3.

Krzmbrzl commented 1 year ago

Could it be that 1.4 in release was originally compiled with 2019 or something?

I just checked on our build server and yes, it was indeed built with VS2019

github-actions[bot] commented 1 year ago

As there has been no activity on this issue for a couple of days, we assume that your issue has been fixed in the meantime. Should this not be the case, please let us know.

If no further activity happens, this issue will be closed within 3 days.