[MPlayer-dev-eng] Customizing binary names via configure

The Wanderer inverseparadox at comcast.net
Sun Nov 13 20:05:48 CET 2005


As I believe someone else mentioned on these lists not long back, it
would be nice to be able to specify what the MPlayer/MEncoder binaries
will be named, to more easily maintain and use multiple copies
(presumably either of different versions or, at least, configured
differently) on a single system. Adding the necessary functionality to
configure looks like it should be simple enough, but I'm finding myself
unsure of exactly which approach to take. I'd probably take either the
first or the fourth of the below approaches if left to myself, but I
wanted to get other people's input before working up a patch.

Perhaps the simplest approach would be to just provide a means of
specifying the entire binary name directly ("--mplayer-name" and
"--mencoder-name"), overriding the hardcoded _prg and _prg_mencoder
entirely; that provides the most configure-time power for the least
coding effort and the least added complexity. However, for various
reasons which were clearer in my mind the last time I thought about this
than they are now, I'm not sure there aren't problems with doing it that
way.

Another approach would be to provide a means of specifying a prefix to
prepend to the default binary name ("--binary-prefix"); this would be
good for patterns like "dbg_mplayer" or "oldmplayer", and would be
simple to code, but would not provide full flexibility since all of the
possible names would be based on the hardcoded name. It might also
conflict with the name "gmplayer" unless some steps are taken to work
around that (I haven't so far been able to dig out the place where that
name is specified at present).

A third approach would be to provide a means of specifying a suffix to
append to the default binary name ("--binary-suffix"); this would be
good for patterns ranging from "mplayer_g" to simply "mplayer1"
"mplayer2" "mplayer3" etc, but is no more flexible than the prefix.

A fourth approach would be to combine all of the above - first override
the hardcoded binary name or names if the first type of option was
specified, then prepend the prefix if that was specified, then append
the suffix if that was specified. This is the most powerful but also the
most complex. (It would be possible to get more complicated still,
allowing prefixes and suffixes specific to MPlayer and to MEncoder
instead of or in addition to ones comon to both, but there are limits to
what I'd consider especially sane.)

One problem common to all of these, and in fact to any scheme which
allows people to customize the binary names, is that the binary name
will no longer be predictable. This can be problematic both in terms of
help requests/bug reports (since it will no longer be necessarily safe
to specify an exact command line for an Idiot User to copy verbatim) and
in terms of usage examples and the like, but is not necessarily a
showstopper.

Thoughts?

-- 
       The Wanderer

Warning: Simply because I argue an issue does not mean I agree with any
side of it.

Secrecy is the beginning of tyranny.




More information about the MPlayer-dev-eng mailing list