OpenAL "very conservative" installation.

Started by
2 comments, last by KCat 16 years, 3 months ago
Quote:Application Deployment Here are three ways: 1) ... 2) ... 3) A very conservative approach... a) Install a version of OpenAL under any name in any location you want. b) Dynamically link with your implementation of OpenAL. c) Optionally allow the user to tell the app (through an INI file or the interface) to use a system-wide implementation of OpenAL elsewhere. d) Before loading the user's selection, make sure that the selected device supports your application's required spec revision and/or required extensions.
This is a quote taken from this page. Now, if I understand correctly, the above implies that you can provide the required OpenAL DLL files with your application. The only problem is that I've looked everywhere and can't find them. The OpenAL SDK provides a redistributable installer but there is no option to set where to install the files to. Perhaps I'm mistaken and you must use the installer regardless, but I would much prefer to supply the DLLs with my application and give the user the option of using the system ones as mentioned above. If anyone could shed some light on this I'd greatly appreciate it.
Advertisement
Generally, you'll want to package the redistributable installer with your app, then as part of your app's installation, run the OpenAL installer with the /s (silent) switch.. that'll make sure OpenAL is installed on the system and has the latest version (and if the user already has it installed, it'll simply update if needed).

If you want to package the DLLs and have your app use them without installation, the DLLs are in the SDK, extracted in "OpenAL 1.1 SDK\dll". Put those two .dll files in a sub-directory of your app (not the same dir as the exe, otherwise it'll always take precedence over a version the user may have installed). Then when your app loads, use an option to check whether to load (via LoadLibrary) the system's openal32.dll, or the one with your app. You'll then have to load the function pointers with GetProcAddress/alcGetProcAddress.

The first method is preferred as it will a) make sure the user has OpenAL installed, so your app can use it fine as-is, b) install it for the whole system, so other apps can use it too, and c) make sure the user is updated to the latest version available at the time it was packaged with your app.
Quote:Original post by KCat
Generally, you'll want to package the redistributable installer with your app, then as part of your app's installation, run the OpenAL installer with the /s (silent) switch.. that'll make sure OpenAL is installed on the system and has the latest version (and if the user already has it installed, it'll simply update if needed).

If you want to package the DLLs and have your app use them without installation, the DLLs are in the SDK, extracted in "OpenAL 1.1 SDK\dll". Put those two .dll files in a sub-directory of your app (not the same dir as the exe, otherwise it'll always take precedence over a version the user may have installed). Then when your app loads, use an option to check whether to load (via LoadLibrary) the system's openal32.dll, or the one with your app. You'll then have to load the function pointers with GetProcAddress/alcGetProcAddress.

The first method is preferred as it will a) make sure the user has OpenAL installed, so your app can use it fine as-is, b) install it for the whole system, so other apps can use it too, and c) make sure the user is updated to the latest version available at the time it was packaged with your app.


Thanks for the reply.

I checked and I don't have the dll directory as you say (I re-downloaded the latest SDK to make sure). The only DLLs I could find were the ogg/vorbis ones included in the samples directory.
Quote:Original post by tasen
Thanks for the reply.

I checked and I don't have the dll directory as you say (I re-downloaded the latest SDK to make sure). The only DLLs I could find were the ogg/vorbis ones included in the samples directory.

Odd. Well, if you're on XP, the redistributable should have installed openal32.dll and wrap_oal.dll into C:\Windows\system32. You can just copy them out of there. I'm not sure where Vista has them install too, but I'd assume something similar.

This topic is closed to new replies.

Advertisement