Re: [AD] custom DLLs with cmake

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Wednesday 24 December 2008 04:32:57 am Elias Pschernig wrote:
> I assume it simply means providing empty versions of all public
> D3D/OpenGL functions if the #ifdef check fails? Probably that should be
> done anyway.

Or moving all the D3D/GL functions into seperate DLLs, and those DLL are 
loaded at run-time to enable D3D/GL functionality (The core wouldn't care 
about D3D/GL.. it would just load plugin DLLs; so disabling D3D or GL would 
just skip building that particular DLL, and the core that the app links to 
remains the 100% the same).

> > Otherwise, I personally think it's fine.
> > It helps keep users/developers from accidentally creating a DLL that
> > doesn't work with other Allegro games.
>
> How would this ever be a problem? It's not that the DLL I distribute
> with my game could somehow magically spread into the internet and cause
> incompatibilities.

Wouldn't the idea be to have one (set of) DLLs, that all Allegro programs use? 
Apps that worry can provide their own, or they can be installed system-wide 
for the rest. For other developers, they may have their own tweaks or 
development code, and want to use their own in place of the one with the app; 
but if the app is built against a binary-incompatible lib, they couldn't (and 
the creator might not even realize it was built against a binary-incompatible 
lib).

> Also, we could simply rename it instead.
>
> > If someone wants to purposely make a
> > binary-incompatible DLL, they can remove that check.
>
> Not really, cmake files are hard to read. I needed a long time to find
> this. All I did was uncheck the D3D option in cmake-gui because my game
> uses OpenGL commands so I can't possibly have use for it. And I didn't
> expect this to suddenly forbid me DLL creation.

Now imagine if it did give you a DLL, you built-against it, then provided just 
an executable for other Allegro users to test. It inexplicably wouldn't work 
for them, without any forewarning. :)

I've come to realize with CMake, you cannot rely on MESSAGE(STATUS ...) to 
print warnings. If you use ccmake, or apparently some other graphical cmake 
shell, you completely miss them. So even having
MESSAGE(STATUS "Warning, you are building an incompatible DLL!")
wouldn't be that good because some people may not see it, through no fault of 
their own.




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/