34115
|
1 Due to a lack of Windows developers, it is a good idea to allow Linux
|
|
2 developers to do at least some basic check of their code.
|
|
3 This HOWTO explains how to set up cross-compilation.
|
|
4
|
|
5
|
|
6 MinGW under Debian
|
|
7 ==================
|
|
8
|
35424
|
9 First, you need to install the "gcc-mingw-w64" package and get a MPlayer SVN
|
34115
|
10 checkout.
|
|
11
|
35424
|
12 To get a fully functional build, you need to get a lot of dependencies
|
|
13 compiled first. This is outside the scope of this document.
|
34115
|
14
|
35424
|
15 Then you need to run
|
|
16 ./configure --enable-cross-compile --windres=i686-w64-mingw32-windres --cc=i686-w64-mingw32-gcc
|
|
17 and make.
|
|
18 To compile a 64-bit Windows binary, use
|
|
19 ./configure --enable-cross-compile --windres=x86_64-w64-mingw32-windres --cc=x86_64-w64-mingw32-gcc
|
|
20 instead.
|
|
21 For files meant to run on a different computer you should usually
|
|
22 use --enable-runtime-cpudetection.
|
34115
|
23
|
|
24 You should be able to run the generated binary with Wine, if you want to.
|
|
25
|
|
26 The steps as command-lines:
|
|
27
|
35424
|
28 sudo apt-get install gcc-mingw-w64
|
34115
|
29 svn co svn://svn.mplayerhq.hu/mplayer/trunk MPlayer-mingw
|
|
30 cd MPlayer-mingw
|
35424
|
31 ./configure --enable-cross-compile --windres=i686-w64-mingw32-windres --cc=i686-w64-mingw32-gcc
|
34115
|
32 make
|
|
33
|
|
34
|
|
35 Wine
|
|
36 ====
|
|
37
|
|
38 First, you need to install the "Wine" package and get a MPlayer SVN
|
|
39 checkout.
|
|
40
|
|
41 You don't need any dependencies other than those you already have for
|
|
42 your Linux build, because the Wine and Linux build will use them together.
|
|
43
|
|
44 Configure with
|
|
45
|
34122
|
46 ./configure --target=i686-wine --cc="winegcc -m32" --windres=wrc --enable-gui
|
34115
|
47
|
34122
|
48 and add any options you normally use for your Linux build, then run make.
|