PadWorld-Entertainment / worldofpadman

World of PADMAN game repository
https://worldofpadman.net
Other
39 stars 9 forks source link

LIBS: Failed to load library OpenAL64.dll #137

Closed kai-li-wop closed 2 years ago

kai-li-wop commented 2 years ago

When starting WoP after a fresh install on a Windoes 10 system even with OpenAL installed the console reports:

Trying to load 'OpenAL64.dll'...
Trying to load 'OpenAL64.dll' from C:\Users\...\worldofpadman'...
Loading 'OpenAL64.dll' failed
Failed to load library: 'OpenAL64.dll'.

The thing is, that OpenAL is installed and available as 32bit dll in the folders

c:\Windows\System32\OpenAL32.dll
c:\Windows\SysWOW64\OpenAL32.dll

Those files were installed by the official installer oalinst.exe.

mgerhardy commented 2 years ago

we should add them to the repo as we did for the other dlls before, too.

kai-li-wop commented 2 years ago

Like with SDL2.dll before we build it by ourselves or to add the library and to build it ourselves?

ghost commented 2 years ago

@mgerhardy just a note: Wop OpenAL libs version is 1.15 I think, right? Current version is 1.21, the attached AL files are outdated. There was a very small fix to the environmental effects, though they are not supported by WoP. Anyways maybe it is worth to update these files as well before updating the libs. OpenAL-Soft: https://www.openal-soft.org/#release The AL files: https://github.com/kcat/openal-soft/tree/master/include/AL

kai-li-wop commented 2 years ago

Now I understood. OpenAL is already located in libs/AL. And yes, the version there is 1.15.1. There is no build target.

ghost commented 2 years ago

Yeah, most of the header files are already there, but not the (internal) libs, iirc. It's always good practice to keep them in sync. For example if you will use OpenAL-Soft 1.21, your installed libs (the game is using, on your PC) should be 1.21, the libs for linking should be 1.21, and the header files (inside the AL folder) should be 1.21. This is the case for all external libs. As already said, for WoP this isn't so important because WoP doesn't make use of the environmental effects (underwater, castle, city, canyon reverb, etc.).

mgerhardy commented 2 years ago

the 64bit version is also called openal32.XXX in the release.

ghost commented 2 years ago

Wasn't this always the case with old OpenAL? Remember, the old OpenAL (the not 'Soft' OpenAL) is pretty dead. There is also a light version if you don't want to switch to OpenAL-Soft for whatever reason. It's based on the old OpenAL 1.1 core I think: https://github.com/icculus/mojoAL

mgerhardy commented 2 years ago

I suppose we will just stick with openal soft. not sure how the windows dlls were called - it's just weird imo. I've updated the headers - they didn't change anything that could cause problems as far as i can say. the makefile target will download the binary release and put the dlls into the libs/winXX dirs - i just have to integrate it into the cmake scripts that the nsi installer script gets its hands on the dlls. Maybe the easiest would be to also just check them in. I suppose they aren't changing that often anyway.

ghost commented 2 years ago

Cool! Yeah, OpenAL-Soft libs are called oal_soft.dll or something. They can also be found here: https://www.openal-soft.org/openal-binaries/ Naming is indeed weird. I have absolutely no cmake skills.

mgerhardy commented 2 years ago

thanks a lot - they are copied in the makefile update-openal target already (https://github.com/PadWorld-Entertainment/worldofpadman/commit/1d69679e014a76e5b2a999674a9984598d8d1dd4)

I suppose I will just add the dlls and integrate it into the nsi script.

ghost commented 2 years ago

Finally please allow me to mention that OpenAL-Soft supports HRTF. So as a reference (not for beginners, though) here is a nice summary of HRTF (related to the dll naming, btw). There are many manuals how to enable and set up HRTF (dieses ist auf Deutsch): https://www.hardwareluxx.de/community/threads/guide-openal-soft-mit-hrtf-als-ersatz-f%C3%BCr-openal-vorteil-3d-sound-f%C3%BCr-headphones.1013497/

mgerhardy commented 2 years ago

i've now added the openal32.dll to the repo and it's copied into the right location when you build - so a direct start of wop.exe should find the dll. feedback welcome - as I can't test this on linux ;)

kai-li-wop commented 2 years ago

Should be fixed with a5094ca998584dd75f2c09c364c1f4f13e8f9c03