WinCECompile
Contents
Introduction
This is a guide for cross-compiling VLC for Windows CE on Linux with a step-by-step instruction to download, install, configure and build your VLC.
First, you might want to take a look at compiling instructions for Win32, as the process is roughly the same, and it includes useful discussion and explanations.
Building VLC
Prepare your environment
VLC uses automake, autoconf and friends for compilation. Make sure they are up to date and usable for your system.
Get mingw32ce
To compile VLC, we use Mingw32CE, a cross-development environment for Windows CE. Download the latest version on Sourceforge.
Go the the directory where you dowloaded CeGCC, and untar it, for example:
% tar xjf arm-mingw32ce-0.59.1.tar.bz2 -C /
You should now see the folder /opt/mingw32ce.
Get the source
Start by getting the source, using FTP for releases, or using Git for development. If your are using the release, download source code and extract the archive and go into your VLC directory.
% cd /path/to/your/vlc/folder/
If you are using the Git version, start by bootstrapping your VLC.
% cd /path/to/your/vlc/folder/ % ./bootstrap
Get the contribs
You can get official WinCE contribs on http://download.videolan.org/pub/testing/contrib/, for example contrib-20091114-wince-bin-gcc-4.1.0-runtime-3.15.2-only.tar.bz2. Uncompress them in /usr/wince
Configuration
You need to tweak your configure line.
./configure is used to check whether your system is able to compile VLC. Also you choose the functionalities of your build.
% ./configure --help
will show you the various options
Create a new file named conf-vlc.sh and add in it:
PATH=/opt/mingw32ce/bin:$PATH \ CPPFLAGS="-I/usr/wince/include -D_WIN32_WCE=0x0500" \ LDFLAGS="-L/usr/wince/lib" \ PKG_CONFIG_LIBDIR=/usr/wince/lib/pkgconfig \ ./configure --host=arm-mingw32ce --enable-optimize-memory \ --disable-directx --disable-dvdnav --disable-libgcrypt \ --disable-mad --disable-remoteosd --disable-sdl --disable-skins2
You will probably want to add more options like --disable-sout --disable-httpd --disable-vlm
to remove stuff that you won't need if your device is limited in storage space and memory.
Save the file and make it executable:
% chmod u+x conf-vlc.sh
Compiling source code
Now run your configuration script and build VLC:
% ./conf-vlc.sh % make
Creating self contained packages
Once the compilation is done, you can build self-contained VLC packages with the following command:
make package-wince
This will create a vlc-x.x.x.zip archive. Transfer it on your device, uncompress it and enjoy!
There is not (yet) an option to build a .cab file.
Using and Debugging VLC
Interacting with your device
Use SynCE to synchronize your device with Linux. Or find an Windows machine with ActiveSync installed and download your fresh new VLC build.
Debugging VLC
CeGCC provides a stub for GDB to permit remote debugging on Windows CE. To use it, go in the vlc folder:
% cd vlc-1.0.0 % arm-wince-mingw32ce-gdb vlc.exe
This GDB will upload vlc.exe to /gdb/ on the device. Make sure you uploaded all the VLC directory on your device.
Then, follow the demo of a debugging session for Windows CE.
Common errors
Well... I don't remember right now all the weird errors I encountered, but if you find one, I may have seen it before, so contact me, I'll help you and add it here. --Geal 10:37, 2 September 2008 (CEST)