view DOCS/tech/mingw-crosscompile.txt @ 30811:50e0f6942e43

Implement Win32 mutexes. Implement Win32 mutexes; they used to just be mapped on top of events, which is not the same thing at all. The implementation is pretty much the obvious one, similar to the current critical section implementation and the semaphore implementation; a single lock count protected by a pthread mutex, and an event lockers can sleep on to know when the mutex is available. Also make CreateMutexA and ReleaseMutex available even if QuickTime codecs support is not configured.
author sesse
date Sat, 06 Mar 2010 10:13:37 +0000
parents 0f1b5b68af32
children 956db4f28a62
line wrap: on
line source

Due to a lack of Windows developers, it is a good idea to allow Linux
developers to do at least some basic check of their code.
This HOWTO explains how to set up MinGW cross-compilation under Debian.

First, you need to install the "mingw32" package and get a MPlayer SVN
checkout.

Next, you need quite a lot of dependencies. Since this is for testing and
not actually use, the easiest way is to use this package:
http://natsuki.mplayerhq.hu/~reimar/mpl_mingw32.tar.bz2
NOTE that this is likely to be quite out-dated and might include packages
with security issues, so do not use it to build binaries for real use.

After extracting this package into the MPlayer source-tree,
you only need to run the included linux-mingw.sh to configure (it just runs
./configure --host-cc=cc --target=i686-mingw32msvc --cc=i586-mingw32msvc-cc
--windres=i586-mingw32msvc-windres --ranlib=i586-mingw32msvc-ranlib
--with-extraincdir="$PWD/osdep/mingw32"
--with-extralibdir="$PWD/osdep/mingw32"
--with-freetype-config="$PWD/osdep/mingw32/ftconf") and then run make.

You should be able to run the generated binary with Wine, if you want to.

The steps as command-lines:

sudo apt-get install mingw32
svn co svn://svn.mplayerhq.hu/mplayer/trunk MPlayer-mingw
cd MPlayer-mingw
wget http://natsuki.mplayerhq.hu/~reimar/mpl_mingw32.tar.bz2
tar -xjf mpl_mingw32.tar.bz2
sh linux-mingw.sh
make