Solution to the Desktop Release Issue (OpenAL)?

Monkey Targets Forums/Desktop/Solution to the Desktop Release Issue (OpenAL)?

GarBenjamin(Posted 2015) [#1]
THIS HAS BEEN RESOLVED!

I resolved this by testing thoroughly on several Windows computers the 32-bit and 64-bit versions of the OpenAL DLLS.

You could just deploy the OpenAL installer but for the sake of the end gamer I don't like adding an additional requirement to install an audio library. I think the end user should be able to choose. If they want they can.

So, with that in mind, I am simply using the DLL files that worked on both 32-bit and 64-bit Windows operating systems along with the required inclusion of the license file.

Just to make this easier for other Monkey X users the Windows OpenAL files I will include with my games are available here.

Just extract the contents into the same folder as your Monkey game executable.

.

.

ORIGINAL POST BELOW

------------------------------------------------------

Hey all.

I ran into a problem where a friend asked for a Windows desktop full-screen build of my Halloween game. Actually making the full-screen desktop build was no problem of course.

However, even dropping the OpenAL32.dll in the folder where my exe is did not work. It produced an issue "Either OpenAL32.dll is not designed to run on Windows or the file is corrupted".

I copied the file again and same result.

I searched these forums and found posts saying to simply drop the dll in to the main folder with the exe. Like I said, I had already tried that and it does not work.

The only way around it I can see is to provide the OpenAL installer and ask them to run that first. That seems like a "cheap" way of doing things though. Gamers don't want to mess around with such things.

So before I check into using Inno or another installer to see if I can have it install both my game and the OpenAL library I wondered if anyone had a solution to deploying to Windows desktop that hides all of this stuff and just works for the end gamer?

I'm kind of surprised as long as Monkey X has been around there is not some seamless way of deploying to desktop. I'd have thought people would have ran into this many times by now?


ImmutableOctet(SKNG)(Posted 2015) [#2]
This thread should help you out. Either ship the DLL, or use the installer. If the DLL is the issue, are you sure it's the right one?

Official links:
* http://www.openal.org/creative-installers/oalinst.zip
* http://www.openal.org/downloads
* http://www.monkeycoder.co.nz/downloads/oalinst.exe

Shipping redists is a pretty common thing all the way around. Windows just sort of sucks about it. It doesn't help that Microsoft ships yearly updates to their C libraries. Not to mention the issues with generated libs supporting only one version of something, even if it's possible to support several (XInput). And DirectX is just ridiculous. Just look at what Steam is forced to do. And people just end up throwing their targeted libraries in the same folder anyway.

If the above installers don't work, you could try running the game in compatibility mode. That's about it, though.


GarBenjamin(Posted 2015) [#3]
@ImmutableOctet(SKNG) Thanks for the reply!

I actually suspect the DLL is the issue. Because I have a 64-bit Windows OS and the other computer I found out is a 32-bit Windows OS (I actually thought those were basically gone at this point but yeah guess not lol).
The problem is I didn't see how to actually get the 32-bit version of the DLL.

I will check into it more tonight. I have no problem with just offering two downloads 32-bit and 64-bit for my games. That will work. I just need to track down the 32-bit DLL or get the source and build it I guess.


ImmutableOctet(SKNG)(Posted 2015) [#4]
Well, Monkey builds 32-bit binaries (Unless you want to mess with MSVC or g++), so you'd need 32-bit DLLs either way.

This link should have a good enough redist to ship with your game.


GarBenjamin(Posted 2015) [#5]
That link is for the installer. I want to avoid that if possible. Mainly because I don't recall playing any game in many years that required running a separate installer just to get audio support. In this case actually just to get the game to work at all.

I'll have a look on lunch break. Thinking that 32-bit openAL should be downloadable from somewhere. Otherwise will look into building it in MSVC. At this point I have no idea how to build it in Monkey X. Thanks!


skid(Posted 2015) [#6]
I would post this as bug report. On MacOS and Linux this is not an issue but for Windows GLFW targets both Angle and OpenAL Soft should just work and not have dll dependency. Or in the case of OpenAL if it has to use dll. should fail gracefully and play game muted.

The reason you don't see the Creative OpenAL installer often on Windows is because it only ever shows itself once, likely the very first Indie game you installed on your PC. The fact it gives the impression of being a Win95 VB app was never a good look.


GarBenjamin(Posted 2015) [#7]
I think I might have a way around it. I set the compatibility mode on my 64-bit laptop to Windows XP Service Pack and ran the installer and then went to the System32 folder and copied that DLL. Then I removed the compatibility mode and ran the installer again so it would install the 64-bit version again.
Assuming that actually worked I should now have the 32-bit and 64-bit DLL. They are different sizes so I am thinking they are different. Just need to test.


GarBenjamin(Posted 2015) [#8]
@Skid yeah I am not sure why when the build is created it doesn't just statically link the lib. Unless that is prohibited by the license.


Phil7(Posted 2015) [#9]
@GarBenjamin: I did the same with the dll (install and copy it from system32) and I deinstalled openAL afterwards, so I can be shure that my game doesn't work if I forget to put the dll next to the exe. ;-)
I even didn't need the 64bit version, no matter what windows system (64 and 32 bit) I was trying the game on.


GarBenjamin(Posted 2015) [#10]
@Phil7 that is a great idea. I will go ahead and uninstall OpenAL too. You are right it would be the perfect way to make the dev machine more like end gamers machines. If I cannot run the game because I forgot the DLL that will definitely keep me alerted to the need to have it in there. And very awesome if only the 32-bit version is actually needed in both cases.

In unrelated news I'm really looking forward to messing around with Monkey X Pro and checking out what that Ignition X thing is I got last night.


SLotman(Posted 2015) [#11]
I don't recall playing any game in many years that required running a separate installer just to get audio support.

They install it in silent mode while installing the game. Usually the same thing happens with Direct-X, .net libraries and a bunch of stuff...


GarBenjamin(Posted 2015) [#12]
@SLotman yeah I completely understand that. That is what I am after making it transparent to the end gamer. I've got it sorted now. I have one DLL (version actually two DLLs: OpenAL32.dll and wrap_oal.dll) that work on both 32-bit and 64-bit Windows OS. At least the machines I had available for testing. I was just surprised MX wasn't including it as part of the build automatically. But this is fine like this. As long as end gamers can simply launch game they will be happier campers.

This project was a good Monkey X learning experience. Or at least an opportunity to get more comfortable with MX. I also discovered, or rediscovered, I need to go with a fullscreen 800x600 mode from now on. Because 640x480 won't work on my tv. I guess I already figured that out in Unity last year and forgot because I used that resolution for my Christmas game. Anyway from now on I will target 800x600 for my retro games in MX or whatever because I prefer playing them with joypad on the big screen no messing around required.