3 VLC for Windows Cross-Compile HOWTO - 0.1
5 *EASY* VLC cross-compilation using Linux for a Windows client
7 Bill Eldridge & Gildas Bazin
10 1) Download software packages
14 5) Package for Windows
19 As of version 1.0.5, the MSYS part of MingW has
20 released an environment that will let you configure
21 and compile packages for mingw directly on Windows.
23 http://mingw.sourceforge.net
25 Combined with the SDL & GTK development packages,
26 this is enough to compile vlc without cross-compiling
27 on Linux. However, for those of us who like Linux
28 and want to cross-compile (say to automate nightly
31 1) Download software packages
33 Download all the software needed to /usr/local/src/VLC -
34 including pre-compiled mingw32 cross-compiler for linux,
35 SDL, gtk, directx, and of course vlc. You will also need
36 various run-time DLLs on your Windows machine when you go
39 Go to http://www.videolan.org/vlc/windows.html and download:
40 - mingw32 cross-compiler for linux: linux-cross-mingw32-10022002.tar.bz2
41 - SDL-devel-1.2.3-mingw32.tar.gz (you can also go to www.libsdl.org)
42 - gtk-win32-10022002.tar.bz2 development files.
43 - the directx 7 headers. (Instead of downloading the whole directx SDK
48 http://www.videolan.org/pub/videolan/vlc/snapshots/
50 (who needs a release version? you're compiling, after all :)
53 http://developers.videolan.org/cvs.html
57 cvs -d :pserver:anonymous@anoncvs.videolan.org:/var/cvs/videolan -z3 co
60 (and no, you don't need to log in, that's why it's "anonymous")
64 Unpack all your sources to the right place:
66 [Note that you can put SDL & gtk in a different place,
67 but then you'll have to edit the sdl-config & gtk-config.
68 directx can go anywhere - you'll just set that path when
69 you do vlc's configure]
71 cd to your Source directory
73 SRCDIR=`pwd` # /usr/local/src/VLC seems good, no?
75 tar -jxvf linux-cross-mingw32-10022002.tar.bz2 -C /usr/local
77 tar -zxf SDL-devel-1.2.3-mingw32.tar.gz -C /usr/local/cross-tools
78 cd /usr/local/cross-tools
79 ln -s i586-mingw32msvc i386-mingw32msvc
80 tar -xf SDL-1.2.3/i386-mingw32msvc.tgz
84 tar xjvf gtk-win32-10022002.tar.bz2 -C /usr/local
86 mkdir /usr/local/directx
87 unzip -d /usr/local/directx/include dxheaders.zip
89 tar -jxf <vlc-snapshot-xxx>.bz2 # Unless you used cvs
94 rm config.cache config.status
95 make clean # or "make distclean" for pretty pretty
97 PATH=/usr/local/cross-tools/bin:$PATH \
98 CC=i586-mingw32msvc-gcc \
99 ./configure --host=i586-mingw32msvc \
100 --target=i586-mingw32msvc --build=i386-linux \
101 --with-directx=/usr/local/directx \
102 --with-gtk-config-path=/usr/local/gtk-win32/bin \
103 --with-sdl-config-path=/usr/local/cross-tools/i586-mingw32msvc/bin
107 PATH=/usr/local/cross-tools/bin:$PATH \
110 5) Package for Windows
112 mkdir /usr/local/src/winvlc
113 mkdir /usr/local/src/winvlc/plugins
114 mkdir /usr/local/src/winvlc/share
115 cp vlc.exe /usr/local/src/winvlc/
116 cp plugins/*.so /usr/local/src/winvlc/plugins/
117 cp share/*.psf /usr/local/src/winvlc/share/
119 strip winvlc/vlc.exe winvlc/plugins/*.so
120 zip -r winvlc.zip winvlc
122 Now place winvlc in your ftp/html downloads,
123 or copy to your dos disk or move to a floppy
126 Uncompress to C:\winvlc
128 Don't forget to place all the GTK and SDL dll's from the development packages
129 you downloaded on http://www.videolan.org/vlc/windows.html in c:\winvlc
134 Note: -v gives you errors in case something's not being found,
135 otherwise not needed.
138 6) Further resources (for this or other cross-compilation
141 At this time, mingw32_2.95.3.7-3_i386.deb and
142 mingw32-runtime_1.2-1_i386.deb were at:
144 http://packages.debian.org/testing/devel/mingw32.html
145 http://packages.debian.org/testing/devel/mingw32-runtime.html
147 and possibly on your CD - you might be able to find later
148 versions, or save bandwidth, if you care. (Of course we'll
149 only be testing what we put on the VideoLan website).
150 While these are "Debian" packages, they work on Redhat
151 and possibly elsewhere - download dpkg for your system
152 and do something like:
154 dpkg -x mingw32_2.95.3.7-3_i386.deb /tmp/ming
155 dpkg -x mingw32-runtime_1.2-1_i386.deb /tmp/ming
156 mv /tmp/ming/usr /usr/local/cross-tools
159 Full DX-7 headers, libs & directx.h (the Peter Puck version)
162 http://fceultra.sourceforge.net/dev
164 There are other versions of GTK for Windows available, but
165 the one provided here has been hacked specifically for VideoLan.