Re: [AD] version check in allegro_init

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


> Not sure this is needed - but Evert and me tracked down a problem
> someone had on allegro.cc yesterday which made seemingly no sense, and
> it turned out to be a version conflict between two WIP versions.

I think this is a problem that occurs quite often and the check is easy to
do from our end. Sure, the problem is usually the user forgetting to
uninstall the previous version before the new version or some such thing,
but if we can make it easier for them to spot the problem then I think we
should.

> The
> attached patch is a very simple check which would have caught this
> (allegro_init checks if it is a WIP version, and fails if the version
> differs in that case).

Looks good to me. Guess we need to document install_allegro_subversion.

An alternative I came up with would be to define allegro_init() to
something like
if (allegro_version_matches(major, minor, wip))
   install_allegro(...)
else
   abort()
which might be a smaller change to make and nicer in some situations.
Ultimately I guess it doesn't matter too much how we do the check though.

Evert




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