4). 配置
根据我们上面提到的环境,没有 gtk-1.2 所以不用 --enable-gui 之类的参数。但是我们需要中文的提示,并且是在 locale 为 UTF-8 的情况下使用,所以要这样配置。--charset=utf8 是在 pre7 里面新增的。下面是命令和输出结果。编译时的输出很重要,从这个输出中我们可以看到 XAnim 和 RealPlayer 的解码器是从 /usr/local/lib/codecs 自动探测到的。没有加入 menu 和 xmms 的支持,也没有 gui,但是这正是我需要的,因为我的系统中没有 xmms 这些过时的 gtk-1.2 程序。
[root@geeks MPlayer-1.0pre7]# ./configure --language=zh_CN --charset=utf8 |
Detected operating system: Linux Detected host architecture: i386
Checking for cc version ... 4.0.0, ok ...... Checking for XAnim DLL ... yes
(using /usr/local/lib/codecs) Checking for RealPlayer DLL ... yes
(using /usr/local/lib/codecs) Checking for LIVE.COM Streaming Media libraries ...
no ...... Checking for OSD menu ... no Checking for QTX codecs ... yes Checking for
Subtitles sorting ... yes Checking for XMMS inputplugin support ... no Checking for
inet6 ... yes Checking for gethostbyname2 ... yes Checking for GUI ... no ...... Config
files successfully generated by ./configure ! Install prefix: /usr/local Data
directory: /usr/local/share/mplayer Config direct.: /usr/local/etc/mplayer Byte order:
little-endian Optimizing for: pentium4 mmx mmx2 sse sse2 mtrr Languages: Messages/GUI:
zh_CN Manual pages: en Enabled optional drivers: Input: ftp network edl tv matroska
mpdvdkit2 vcd smb Codecs: qtx xvid libavcodec real xanim dshow/dmo win32 faad2(internal)
libmpeg2 liba52 MP3lib tremor(internal) gif Audio output: alsa esd oss sdl mpegpes(file)
Video output: xvidix cvidix sdl vesa gif89a md5sum pnm jpeg png mpegpes(file) fbdev
opengl dga xv x11 xover tga Audio filters: Disabled optional drivers: Input: vstream tv-
v4l2 tv-v4l tv-bsdbt848 live.com cdda dvdread dvb Codecs: opendivx x264 libdv amr_wb
amr_nb libdts libtheora toolame libmad liblzo Audio output: sgi sun jack polyp arts dxr2
nas dsound win32 macosx Video output: winvidix bl zr zr2 dxr3 dxr2 directx svga caca aa
ggi xmga mga xvmc directfb tdfx_vid tdfxfb 3dfx quartz Audio filters:
ladspa |
5). 编译和安装
在配置之后,通常的步骤是编译和安装,也就是 make && make install。但是这个版本的源代码缺少我们需要的一个文件,必须加上它。这个文件的作用是指明原始消息的编码。在 help 目录有很多消息文件,每种语言的消息文件都有一个对应的文件来表示编码,这也是 pre7 新加进来的。
[root@geeks MPlayer-1.0pre7]# echo 'GB2312' > help/help_mp-zh_CN.h.charset |