[MPlayer-users] Re: zlib and fontconfig
johnbrown105 at hotmail.com
Sat Nov 4 19:00:40 CET 2006
Nicholas Schell wrote:
>On 11/3/06, John Brown <johnbrown105 at hotmail.com> wrote:
>>Nicholas Schell wrote:
>> >On 11/3/06, John Brown <johnbrown105 at hotmail.com> wrote:
>> >But who cares about shared libs anymore n_n, we want to get
>> >all this static stuff working! Except for static builds the full path
>> >to fonts.conf is compiled into the fontconfig lib itself. Do you by
>> >chance notice the same thing in your windows build? You can see the
>> >path right in the mplayer.exe with a hex editor (or in
>> >libfontconfig.a), look for fontconfig_path. I wonder if its a windows
>> >only build issue?
>>I configured --with-confdir=./fonts. I see (in vi mplayer.exe):
>>as I expected.
>>I use Windows XP, gcc-4.1.1, MSYS 1.0.11, fontconfig-2.2.3
>Interesting, perhaps the difference is in the fontconfig versions we
>are using unless that is a really bad typo and you meant 2.3.2 :) ?
$ ls font*.gz
I am currently working with 2.2.3.
>am also on Windows XP using gcc 3.4.5, MSYS 1.0.11 (and the latest
>msys.dll updates) with fontconfig 2.3.2. Though when I used
>--with-confdir I did not explicitly set it to a local dir with ./ ,
>perhaps that is why. I'll give that another go. You didn't really
>explicitly state yes or no, do you also get an absolute path in your
>static fontconfig builds ?
That *was* my static libfontconfig.a. I have not tried to build the DLL.
Sorry for the confusion.
>>In a previous message, you suggested that you could not distribute a
>>libfontconfig.a because you could not build it with a relative confdir.
>>Remember that a relative confdir such as ./etc/fonts is relative to the
>>calling program's current directory, and not the directory where the
>>This is not very useful, as it forces you to always run MPlayer from a
>>particular directory. You are actually better off with an absolute path.
>>It's just that there should be a way for the user to choose the path.
>>there is a way, such as an environment variable; I have not really read
>Well I am going for a distributable mplayer build with fontconfig so I
>do need a relative path. Which is why previously with shared
>fontconfig using ./mplayer made everything so simple. I can't send out
>a build which requires fonts.conf to be located at
>"C:/msys/1.0/mingw/etc/fonts/fonts.conf" or any other absolute path,
>it just doesn't make sense.
Consider the following directory structure:
As I said, when I specify a relative confdir, then confdir has to exist *in
the directory that I am in*. If I "cd \Movies\Action" and type "mplayer
-fontconfig -font 'Courier New' Top_Gun.avi, MPlayer crashes, because
confdir does not exist there. It is in the fontconfig source directory.
I would have to copy confdir from the fontconfig source directory to
C:\Movies\Action, and when I get tired of action movies, I would have to
copy it to c:\Movies\Sci-Fi, and so on. Or, having copied the confdir to
<mplayer-dir>\mplayer\fonts, I could stay there, and type:
mplayer ... c:\Movies\Action\Top_Gun.avi then
mplayer ... c:\Movies\Action\Independence_Day.ogm
which is a nuisance, even with command recall.
What you probably want is behaviour like MPlayer's --codecsdir. If
--codecsdir=codecs, MPlayer looks for codecs relative to MPlayer.exe.
MPlayer can be installed in any directory, as long as it has a subdirectory
codecs with the binary codecs in it. You can run MPlayer from anywhere,
because it will find the codecs in <path-to-mplayer.exe>\codecs. You could
check the MPlayer source to see how it determines the path to the
executable, (probably argv - is there an extern argv that is accessible
to functions other than main()?) then implement something similar in
Did you check to see whether fontconfig recognizes any environment
variables? I had a quick look at the docs, but I did not find anything.
All-in-one security and maintenance for your PC. Get a free 90-day trial!
More information about the MPlayer-users