
OpenTK.dll.config
Posted Tuesday, 7 December, 2010 - 00:52 by pjcozzi inHi,
I wanted to confirm that OpenTK.dll.config is no longer required for running on Linux and Mac. I tested on Linux (Ubuntu 10.4) and it worked without the .config file, but I don't have immediate access to a Mac for testing, so I wanted to double check.
Regards,
Patrick


Comments
Re: OpenTK.dll.config
This doesn't sound right. I haven't changed anything that would affect this - maybe Mono is shipping the necessary dll maps on its own?
I just tested and I can indeed run OpenGL applications without a dll.config file. However, OpenAL applications still fail with a DllNotFoundException on openal32.dll.
Edit: this might also mean that glXGetProcAddress succeeds for all entry points, and DllImports aren't used at all. In this case, Mac OS X should work, too. However, OpenAL will still fail because it uses DllImports exclusively.
Re: OpenTK.dll.config
For OpenGL only, do you think it is safe to not include the dll.config file? If it is needed, I am ok including it, but if we can get away without it, I'd rather have the cleaner deployment.
Regards,
Patrick
Virtual Globe and Terrain Rendering Blog
Re: OpenTK.dll.config
Deploying without OpenTK.dll.config is neither tested nor supported at this point. It may work on some configurations but it *will* cause problems on others (this is the first time I've actually seen OpenTK working without this file).
There is one detail that might make deployment simpler: Mono will load dll.config files placed under ~/.mono/[dllname] (*) - this means you should be able add the dll.config as an embedded resource and write it to disk on startup.
(*) I'm pretty sure this is the correct path but it's been some time since I last tested this so I might be wrong.
Edit: I'm sure this used to work but I cannot find any reference in the Mono documentation...
Re: OpenTK.dll.config
Apparently, the correct location is: ~/.mono/assemblies/[assembly]/[assembly.ext].config
I will try to see whether this can be handled by OpenTK automatically.
Re: OpenTK.dll.config
Ok, this is impossible to handle inside OpenTK, since OpenTK.dll.config file is parsed at the same time as the dll. However, you should be able to embed the file as a resource and write it to ~/.mono/assemblies/OpenTK before OpenTK.dll is loaded. Something like the following code might do the trick:
Re: OpenTK.dll.config
Thanks for taking a look at this. I'll let you know how it goes and if we come up with any other alternatives.
Thanks,
Patrick
Virtual Globe and Terrain Rendering Blog