Working Cygwin VLC Compile Environment (WinXP/Win2K):
This document’s purpose is to provide a working Cygwin environment under Windows (Win2K/WinXP).
*** Initial Setup ***
-- Install Cygwin.
http://www.cygwin.com/setup.exe
When you run the Cygwin setup program there are options on components to install. For compiler items, make sure that you select all of the things starting "mingw", plus the "make" item. Do NOT select any C compilers other than the mingw ones. (when you select one of the mingw components, the Cygwin Setup app will automatically add one non-mingw C item -- that's OK, let it, just don't select any of them yourself).
Make sure that you select the two "gettext" items. Make sure to select "libiconv"
The Appendix shows the Cygwin installation that I use. It absolutely contains extra (not needed for VLC compilation) files, but does work.
Launch Cygwin. It will create a home directory for you. In my case it was c:\cygwin\home\mfm
Download:
http://download.videolan.org/pub/testin ... ly.tar.bz2
into your cygwin home directory.
In your Cygwin shell, enter:
tar xjvf contrib-20040413-win32-bin-gcc3.3.1-only.tar.bz2 -C /
NOTE: For maintenance purposes, periodically check the file install.win32, to see if a new “contrib” package (date newer than 20040413) is called out. If it is, download the newer file and install it.
Install the subversion tool, from:
http://subversion.tigris.org/servlets/P ... olderID=91
Still in your Cygwin home directory, create a little batch file, get_svn.bat. It only needs one line:
c:\program files\subversion\bin\svn" co svn://svn.videolan.org/vlc/trunk vlc-trunk
Put the above little batch file in your Cygwin home directory.
Create one other little file, in whatever text editor you like, containing:
./bootstrap && \
CPPFLAGS="-I/usr/win32/include -I/usr/win32/include/ebml" \
LDFLAGS=-L/usr/win32/lib \
CC="gcc -mno-cygwin" CXX="g++ -mno-cygwin" \
./configure \
--disable-sdl --disable-gtk \
--enable-nls \
--enable-ffmpeg --with-ffmpeg-mp3lame --with-ffmpeg-faac \
--enable-faad \
--enable-flac \
--enable-theora \
--with-wx-config-path=/usr/win32/bin \
--with-freetype-config-path=/usr/win32/bin \
--with-fribidi-config-path=/usr/win32/bin \
--enable-livedotcom --with-livedotcom-tree=/usr/win32/live.com \
--enable-caca --with-caca-config-path=/usr/win32/bin \
--with-xml2-config-path=/usr/win32/bin \
--with-dvdnav-config-path=/usr/win32/bin \
--disable-cddax --disable-vcdx \
--enable-release
Make
{Instead of the line “--enable-release”, “--enable-debug” will generate additional debugger information.}
Save the above little file -- I called mine "config_setup", in your home directory.
The above gets to a basic compiling environment.
*** Day-to-Day Builds ***
run get_svn.bat (double click on it from a normal Windows Explorer window) -- this will do a pull of the current subversion trunk into your home directory, into the directory vlc-trunk.
For instance, in my environment, my home directory is c:\cygwin\home\mfm. I have get_svn.bat located there. When I run get_svn.bat there is now a directory c:\cygwin\home\mfm\vlc-trunk.
(vlc-trunk will get over-written the next time you run the batch file. If you want to save a snapshot of the existing vlc-trunk, rename the "vlc-trunk" directory to something else.)
In your Cygwin bash shell: cd vlc-trunk
In your shell, run: ../config_setup
to have the little script run. (You don't have to run it as a script, it's just easier than cutting and pasting all the lines)
Go out and take a walk, play with your dog, whatever -- the above script does take time, even on a fast PC. Just let it run until it returns you to a bash shell prompt.
If you're really bored, choose to sit and watch the compilation, expect to see warnings at various times. Unless you see an ERROR, and things stop, don't worry.
NOTE: If during the "make", it generates an error and stops when it is compiling the "po" directory, it is a gettext problem. Run the Cygwin Setup app to deinstall your libiconv and gettext (both of the gettext options), then select to do a reinstall from the Internet of those items, FROM A DIFFERENT MIRROR. I spent over a week with this problem, it turned out the Cygwin mirror I first used had "bad" files.
You should now have a working vlc.exe file. From an Explorer window in Windows, you should see vlc.exe in the vlc-trunk directory.
Copying the necessary executable files:
You now have a compiled, working vlc.
To save off just the necessary executable and library files, into a unique directory:
At a Cygwin shell, in the vlc-trunk directory, type:
make package-win32-base
will create a subdirectory named vlc-x.x.x with all the binaries
'stripped' (ie. without any debugging symbols).
or
make package-win32-zip
Same as above but will package the directory in a zip file.