[MPlayer-dev-eng] Customizing binary names via configure
Corey Hickey
bugfood-ml at fatooh.org
Mon Dec 12 06:56:49 CET 2005
The Wanderer wrote:
>>>(In any case, there is still the problem of 'gmplayer', since I
>>>haven't been able to work out where that name is set; if it's
>>>generated by prepending 'g' to _prg, then things should still work
>>>reasonably well - albeit with a few hiccups for some names people
>>>might specify - but if it's hardcoded, then that would have to be
>>>taken into account as well.)
>>
>>It's in mplayer.c at line 1378. See below (I've rewrapped it so it
>>fits within 72 characters and is readable in this email).
>>
>>if ( argv[0] )
>> if(!strcmp(argv[0],"gmplayer") ||
>> (strrchr(argv[0],'/') &&
>> !strcmp(strrchr(argv[0],'/'),"/gmplayer") ) )
>> use_gui=1;
>
>
> Hmm. That's where the functionality is determined, yes, but where is the
> binary name itself set? The binary has to be given its name sometime
> during the compile process, and that can't be done from a source file...
> and although the change you note would still have to be made, it
> wouldn't make any difference if there were no way to change the
> GUI-binary name.
gmplayer is just a symlink to mplayer -- they're the same binary. 'grep
gmplayer Makefile' to see where it's set.
You would have to put PRG_GMPLAYER into config.mak and reference that
within the Makefile.
> (I'm finding msyelf curious to know under what circumstances argv[0] for
> any C program can possibly be empty...)
...beats me... :)
-Corey
More information about the MPlayer-dev-eng
mailing list