objarni's picture

Dependency Installer

[Move Reason: Completely unrelated to the bookpage. Driver problems have no place in the book. Use the FORUM for discussions/support. Thank you! -Inertia]

I get "alut.dll not found" errors with OpenTK0.9, when trying out a simple Alut.Init() windows application.

Do I have to have alut.dll besides the .exe after all..?

What is your approach when it comes to availability of OpenAL implementations on different OSs?

I mean, it is quite safe to assume some kind of OpenGL implementation on Windows / ubuntu.

But what is the situation for OpenAL? I just found out I didn't have the necessary .dll for OpenAL (OpenAL32.dll) on my WinXP SP2 box (home development/game box so it contains quite a lot of stuff, but not OpenAL..).

Should I ship my game with OpenAL drivers for the different operating systems or what is your suggestion?


Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Inertia's picture

Make a troubleshooting section in your readme.txt referring to http://www.openal.org/downloads.html it's the 'OpenAL 1.1 Installer for Windows'

Games using AL usually ship with oalinst.exe, and run that in silent mode when installing to disk. Not sure what to recommend here, maybe we should create a page OpenTK.com/drivers which holds a list of links to drivers? Imho neither OpenTK nor apps built upon OpenTK should be responsible for updating the end-user's drivers, if at all it could be setup.exe's responsibility.

objarni's picture

Imho neither OpenTK nor apps built upon OpenTK should be responsible for updating the end-user's drivers, if at all it could be setup.exe's responsibility.

Yep, it should not be OpenTK's responsibility. Just wanted to know some other ppls thoughts on this.

You're right - drivers should be end user / hardware manufacturer / operating system responsibility. But as you mention, oalinst.exe could be silently run during setup.

I guess that's a fundamental difference between OpenGL and OpenAL -- OpenGL is bundled with graphics card drivers, but OpenAL is generally not bundled with sound card drivers..? Or maybe just creatives soundcards?

Inertia's picture

Not sure what the options for Linux and MacOS are, but for windows this is true. On the other hand the installer is less then 1MB and once installed it works for all OpenAL based apps. It's pretty much the same situation as with Net 2.0, which you cannot expect to be present on WinXP by default.

objarni's picture

Yeah.

For windows platform an installer including dotnetfx.exe, oalinst.exe and the game (incl. OpenTK) will be necessary -- and mostly sufficient. Also a big notification "update your graphics drivers" -- maybe with links to NVidia and ATI download pages should make that more convenient for the end user. (actually OpenTK could be used to decide whether the user has a NVidia or an ATI gfx card!)

Anyone out there who would care to describe the situation for ubuntu and mac?

the Fiddler's picture

I've given this much thought the last couple of weeks. OpenAL distribution is just plain ugly at this point, here's the deal more or less:

- On Windows, openal32.dll and wrap_oal.dll are shipped with Creative's, and (possibly) some other manufacturers' drivers. Most users won't have OpenAL installed by default, though. You can use oalinst.exe to fix this (works on both 32 and 64bit platforms) - unfortuantely this implementation has a few problems (amd I think it doesn't support 5.1 sound well).

- On Linux, most distributions ship with a horrible, broken and generally f-ugly implementation of OpenAL 1.0 (libopenal.so, version 0.0.8). Don't expect anything but the most basic stuff to work here, and only with bad sound quality.

- On OSX, Apple ships a more-or-less up to date implementation of OpenAL. I don't know details, but they say it works.

As you can see, things are not good. Ideally, OpenTK would work out of the box without any system-wide installations, but unfortunately we don't leave in an ideal world.

On the bright side, there's an excellent implementation of OpenAL 1.1, in the form of OpenAL Soft. This is stable, works on all relevant platforms, and has good sound quality. The problem is how to get this out to the users...

- On Windows, it is possible to build a 32 and a 64bit of the dll, and copy the correct one during installation (no need to install this system-wide!)

- On Linux, the best course is to bug the package maintainers to update libopenal with this version. I've been trying to do this on Ubuntu, but with little success. This will probably change once OpenAL Soft becomes the official implementation (hopefully soon). Barring that, we can ask users to compile and install OpenAL Soft manually (ugly), or try to find another means to ship this.

At this point I'm out of ideas...

objarni's picture

And there no chance of raising OpenAL Soft into the fully managed world - that is including it in the OpenTK source tree? Is it technically possible at all? Is it performance-wise possible?

the Fiddler's picture

OpenAL Soft's a C project. Even if it was added to OpenTK SVN, it wouldn't help distribution (you'd still have to distribute a different libopenal for each platform).

Now, if you are talking about rewriting it in C# and distributing it, that's another matter entirely. Would it be possible? Yes. Would it be a good idea? Probably not.

objarni's picture

Yes, I was talking about porting it to C#.

Why is it such a bad idea?

(My guess :
it is quite a hack rewriting such a bit-level-library as OpenAL Soft in C# (with almost equivalent performance), right? I've done some image processing in C#, it's dog slow compared to C. Also big-matrix-operations are like an order of magnitude slower in C# compared to C. Sadly :(
)

the Fiddler's picture

Nah, too much work* for too little gain. A few well-placed bug reports and emails would get things moving faster, and the result would pay off better in the end.

(* understatement)

Another idea is to prepare a cross-platform installer (in managed code) that would install your application along with the necessary components. It could be written to detect and install missing dependencies, like openal, from the net if download size became a concern.

This is a large project in and on itself, but I would actually pay for such a thing (if it were reliable).

objarni's picture

Another idea is to prepare a cross-platform installer (in managed code) that would install your application along with the necessary components. It could be written to detect and install missing dependencies, like openal, from the net if download size became a concern.

Yeah that would be a great utility program. Like the windows setup compiler InnoSetup but compiling to a .NET exe instead of a legacy exe.

More complex than InnoSetup since it would include

a) downloading from the internet while doing setup
b) cross-platform driver-detection

But also simpler than InnoSetup since you could skip things like

d) file associations
e) registry access
f) complex scripting

b) could be achieved by using some kind of configuration data, different for each platform.

If the utility is made OpenTK-specific, it would be simplified a great deal.

Also, then the configuration data could be made available as some kind of xml data files on the opentk.net site (somewhere), for example. Then the setup is more-or-less "up-to-date" whenever it is run!

If it is openal that is the only dependency, this is starting to sound practical! Openal could be installed directly into the application folder, and not system-wide. (I know this is true for windows, how about mac/ubuntu?)

One caveat is doing a clean un-install. That differs a lot from platform to platform..

It's an intriguing idea ...