______________________________
STEP1:下载编译所需的文件包并安装
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1.安装 svn-win32-1.6.6 下载源码 在要下载的目录中创建 svn-down-mplaye.bat 批处理文件.
http://subversion.tigris.org/files/documents/15/47848/Setup-Subversion-1.6.6.msi
svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer
2.下载MinGW-full版本,该版本中所需的编译库文件都有,如果喜欢最新的可以自己更新
http://cdnetworks-kr-1.dl.sourceforge.net/project/mplayer-ww/MinGW-full/MinGW-full-20101119.7z
解压到C:根目录下C:/MinGW/目录下面,把MPlayer-ww源码拷贝到/MinGW/home/下面
3.下载FFmpeg Windows builds 在Win-XP上必须要这个其他系统版本编译时出错
http://ffmpeg.zeranoe.com/builds/source/ffmpeg/ffmpeg-git-a366bea.tar.xz
下载之后解压到mplayer-ww代码目录下的 ffmpeg/ 先编译FFmpeg 不然编译mplayer-ww时出错
./configure --prefix=/usr/local/ffmpeg-ww \
--enable-shared --disable-static --enable-memalign-hack
make
make install
__________________________
STEP2: Configuring MPlayer
~~~~~~~~~~~~~~~~~~~~~~~~~~
不同的机器适当调整参数 写个脚本文件方便修改
____________
1.static编译
~~~~~~~~~~~~
# !/bin/sh
_gcc=no
test "$1" && _gcc="$1"
_config="configure \
--prefix="D:/MPlayer/static" \
--disable-mencoder \
--disable-menu \
--disable-gif \
--disable-tga \
--disable-pnm \
--disable-sdl \
--disable-caca \
--disable-ssse3 \
--disable-faac \
--disable-x264 \
--disable-xvid \
--disable-vidix \
--disable-toolame \
--disable-twolame \
--disable-md5sum \
--disable-vidix-pcidb \
--disable-libdirac-lavc \
--enable-gui \
--enable-static \
--enable-freetype \
--enable-runtime-cpudetection \
--extra-libs="-mwindows" "
if test $_gcc != no; then
_config+=" --cc=$_gcc "
fi
./$_config
____________
2.shared编译
~~~~~~~~~~~~
# !/bin/sh
_gcc=no
test "$1" && _gcc="$1"
_config="
--prefix="D:/MPlayer/shared" \
--disable-mencoder \
--disable-tga \
--disable-pnm \
--disable-sdl \
--disable-caca \
--disable-ssse3 \
--disable-faac \
--disable-x264 \
--disable-xvid \
--disable-vidix \
--disable-toolame \
--disable-twolame \
--disable-md5sum \
--disable-vidix-pcidb \
--disable-libdirac-lavc \
--disable-ffmpeg_a \
--enable-freetype \
--enable-runtime-cpudetection \
--extra-cflags="-I/usr/local/ffmpeg-ww/include" \
--extra-ldflags="-L/usr/local/ffmpeg-ww/lib" \
--extra-libs-mplayer="-Wl,--enable-auto-import" \
--extra-libs="-mwindows" "
if test $_gcc != no; then
_config+=" --cc=$_gcc "
fi
./configure $_config
____________
3.debug 编译
~~~~~~~~~~~~
# !/bin/sh
_gcc=no
test "$1" && _gcc="$1"
_config="configure \
--prefix="D:/MPlayer/debug" \
--disable-mencoder \
--disable-menu \
--disable-gif \
--disable-tga \
--disable-pnm \
--disable-sdl \
--disable-caca \
--disable-ssse3 \
--disable-faac \
--disable-x264 \
--disable-xvid \
--disable-vidix \
--disable-toolame \
--disable-twolame \
--disable-md5sum \
--disable-vidix-pcidb \
--disable-libdirac-lavc \
--enable-static \
--enable-freetype \
--enable-debug=3 \
--enable-runtime-cpudetection \
--extra-libs="-mwindows" "
if test $_gcc != no; then
_config+=" --cc=$_gcc "
fi
./$_config
_______________________________
STEP3: Compiling MPlayer & Play
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make #需要耐心等待 有可能出错 原因通常是配置或者configue参数有问题
make install
mplayer [moviefile] #拷贝相应的DLL 都在/mingw/bin