最新的VLC版本发布了,昨天对该版本进行了编译。在配置环境的过程中,发现cygwin的环境发生了变化。需要新加一个库libiconv。如果cygwin没有这个库,就无法运行configure-vlc.sh文件。今天重新对vlc-086d进行了环境配置和编译,整个过程如下:
1、安装cygwin
选中下列包:
Archive
5.52-2 unzip (recommended: goes hand in hand with zip utility)
2.23-2 zip (required: to make self contained zip packages)
Devel
2.1 automake (at least 1.5 is required)
20060817-1 binutils (autoselected)
1.11.22-1 cvs (required for autopoint)
3.4.4-3 gcc-core (autoselected)
3.4.4-3 gcc-g++
20040810-1 gcc-mingw
20050522-1 gcc-mingw-core (autoselected)
20050522-1 gcc-mingw-g++ (autoselected)
20041228-3 gdb (optional: for debugging purposes)
0.15-1 gettext (autoselected)
0.15-1 gettext-devel
1.5.23a-2 libtool1.5
libiconv
3.81-1 make
3.11-1 mingw-runtime (autoselected)
0.98.39-1 nasm (optional: for compiling x264 encoder)
0.2.31-1 patchutils (optional: for patching source files with .diff files)
0.21-1 pkgconfig (recommended: otherwise ./configure will complain about accuracy)
1.4.2-1 subversion
Lib
?.? libgcrypt
Web
7.15.4-1 curl (optional: for building extras/contrib)
1.10.2-2 wget (optional: for building extras/contrib)
2、下载源代码
contrib-20070412-win32-0.8.6b-bin-gcc-3.4.5-only.tar
vlc-0.8.6d.tar.gz
3、解压源代码
运行命令:tar xvf vlc-0.8.6d.tar.gz
解压vlc的源代码
运行命令:tar xjvf contrib-20070412-win32-0.8.6b-bin-gcc-3.4.5-only.tar.bz2 -C /
解压使用到的第三方库,生成库后,把目录名改为win32.
4、配置库文件
如果库文件中有下列的文件,
C:\cygwin\usr\win32\bin\moc
C:\cygwin\usr\win32\bin\rcc
C:\cygwin\usr\win32\bin\uic
则删除。
5、生成configure文件
把下面的复制到configure-vlc.sh文件中
CONTRIB_TREE=/usr/win32
PATH=${CONTRIB_TREE}/bin:$PATH \
./bootstrap && \
CPPFLAGS="-I${CONTRIB_TREE}/include -I${CONTRIB_TREE}/include/ebml" \
LDFLAGS=-L${CONTRIB_TREE}/lib \
PKG_CONFIG_LIBDIR=${CONTRIB_TREE}/lib/pkgconfig \
CC="gcc -mno-cygwin" CXX="g++ -mno-cygwin" \
./configure \
--host=i686-pc-mingw32 \
--enable-sdl --with-sdl-config-path=${CONTRIB_TREE}/bin --disable-gtk \
--enable-nls \
--enable-ffmpeg --with-ffmpeg-mp3lame --with-ffmpeg-faac \
--with-ffmpeg-zlib --enable-faad --enable-flac --enable-theora \
--with-wx-config-path=${CONTRIB_TREE}/bin \
--with-freetype-config-path=${CONTRIB_TREE}/bin \
--with-fribidi-config-path=${CONTRIB_TREE}/bin \
--enable-live555 --with-live555-tree=${CONTRIB_TREE}/live.com \
--enable-caca --with-caca-config-path=${CONTRIB_TREE}/bin \
--with-xml2-config-path=${CONTRIB_TREE}/bin \
--with-dvdnav-config-path=${CONTRIB_TREE}/bin \
--disable-cddax --disable-vcdx --enable-goom \
--enable-twolame --enable-dvdread \
--disable-gnomevfs \
--enable-dca \
--enable-qt4 \
--disable-optimizations \
--enable-debug \
然后运行命令dos2unix configure-vlc.sh
6、运行命令./configure-vlc.sh,等待
7、运行命令 make
8、运行命令 make package-win32-base
把生成的vlc软件复制到pc机上其它地方,就可以运行。