annotate DOCS/tech/crosscompile.txt @ 35026:4783ed655c94

Add missing newline in error message.
author cehoyos
date Mon, 27 Aug 2012 07:09:34 +0000
parents 68d3b36b9dfc
children 7f73ecc9ccda
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
34115
3d7ee643b110 Port to Wine.
ib
parents:
diff changeset
1 Due to a lack of Windows developers, it is a good idea to allow Linux
3d7ee643b110 Port to Wine.
ib
parents:
diff changeset
2 developers to do at least some basic check of their code.
3d7ee643b110 Port to Wine.
ib
parents:
diff changeset
3 This HOWTO explains how to set up cross-compilation.
3d7ee643b110 Port to Wine.
ib
parents:
diff changeset
4
3d7ee643b110 Port to Wine.
ib
parents:
diff changeset
5
3d7ee643b110 Port to Wine.
ib
parents:
diff changeset
6 MinGW under Debian
3d7ee643b110 Port to Wine.
ib
parents:
diff changeset
7 ==================
3d7ee643b110 Port to Wine.
ib
parents:
diff changeset
8
3d7ee643b110 Port to Wine.
ib
parents:
diff changeset
9 First, you need to install the "mingw32" package and get a MPlayer SVN
3d7ee643b110 Port to Wine.
ib
parents:
diff changeset
10 checkout.
3d7ee643b110 Port to Wine.
ib
parents:
diff changeset
11
3d7ee643b110 Port to Wine.
ib
parents:
diff changeset
12 Next, you need quite a lot of dependencies. Since this is for testing and
3d7ee643b110 Port to Wine.
ib
parents:
diff changeset
13 not actually use, the easiest way is to use this package:
3d7ee643b110 Port to Wine.
ib
parents:
diff changeset
14 http://natsuki.mplayerhq.hu/~reimar/mpl_mingw32.tar.bz2
3d7ee643b110 Port to Wine.
ib
parents:
diff changeset
15 NOTE that this is likely to be quite out-dated and might include packages
3d7ee643b110 Port to Wine.
ib
parents:
diff changeset
16 with security issues, so do not use it to build binaries for real use.
3d7ee643b110 Port to Wine.
ib
parents:
diff changeset
17
3d7ee643b110 Port to Wine.
ib
parents:
diff changeset
18 After extracting this package into the MPlayer source-tree,
3d7ee643b110 Port to Wine.
ib
parents:
diff changeset
19 you only need to run the included linux-mingw.sh to configure (it just runs
3d7ee643b110 Port to Wine.
ib
parents:
diff changeset
20 ./configure --host-cc=cc --target=i686-mingw32msvc --cc=i586-mingw32msvc-cc
3d7ee643b110 Port to Wine.
ib
parents:
diff changeset
21 --windres=i586-mingw32msvc-windres --ranlib=i586-mingw32msvc-ranlib
3d7ee643b110 Port to Wine.
ib
parents:
diff changeset
22 --extra-cflags="-I$PWD/osdep/mingw32"
3d7ee643b110 Port to Wine.
ib
parents:
diff changeset
23 --extra-ldflags="-L$PWD/osdep/mingw32"
3d7ee643b110 Port to Wine.
ib
parents:
diff changeset
24 --with-freetype-config="$PWD/osdep/mingw32/ftconf") and then run make.
3d7ee643b110 Port to Wine.
ib
parents:
diff changeset
25
3d7ee643b110 Port to Wine.
ib
parents:
diff changeset
26 You should be able to run the generated binary with Wine, if you want to.
3d7ee643b110 Port to Wine.
ib
parents:
diff changeset
27
3d7ee643b110 Port to Wine.
ib
parents:
diff changeset
28 The steps as command-lines:
3d7ee643b110 Port to Wine.
ib
parents:
diff changeset
29
3d7ee643b110 Port to Wine.
ib
parents:
diff changeset
30 sudo apt-get install mingw32
3d7ee643b110 Port to Wine.
ib
parents:
diff changeset
31 svn co svn://svn.mplayerhq.hu/mplayer/trunk MPlayer-mingw
3d7ee643b110 Port to Wine.
ib
parents:
diff changeset
32 cd MPlayer-mingw
3d7ee643b110 Port to Wine.
ib
parents:
diff changeset
33 wget http://natsuki.mplayerhq.hu/~reimar/mpl_mingw32.tar.bz2
3d7ee643b110 Port to Wine.
ib
parents:
diff changeset
34 tar -xjf mpl_mingw32.tar.bz2
3d7ee643b110 Port to Wine.
ib
parents:
diff changeset
35 sh linux-mingw.sh
3d7ee643b110 Port to Wine.
ib
parents:
diff changeset
36 make
3d7ee643b110 Port to Wine.
ib
parents:
diff changeset
37
3d7ee643b110 Port to Wine.
ib
parents:
diff changeset
38
3d7ee643b110 Port to Wine.
ib
parents:
diff changeset
39 Wine
3d7ee643b110 Port to Wine.
ib
parents:
diff changeset
40 ====
3d7ee643b110 Port to Wine.
ib
parents:
diff changeset
41
3d7ee643b110 Port to Wine.
ib
parents:
diff changeset
42 First, you need to install the "Wine" package and get a MPlayer SVN
3d7ee643b110 Port to Wine.
ib
parents:
diff changeset
43 checkout.
3d7ee643b110 Port to Wine.
ib
parents:
diff changeset
44
3d7ee643b110 Port to Wine.
ib
parents:
diff changeset
45 You don't need any dependencies other than those you already have for
3d7ee643b110 Port to Wine.
ib
parents:
diff changeset
46 your Linux build, because the Wine and Linux build will use them together.
3d7ee643b110 Port to Wine.
ib
parents:
diff changeset
47
3d7ee643b110 Port to Wine.
ib
parents:
diff changeset
48 Configure with
3d7ee643b110 Port to Wine.
ib
parents:
diff changeset
49
34122
68d3b36b9dfc Revise documentation.
ib
parents: 34115
diff changeset
50 ./configure --target=i686-wine --cc="winegcc -m32" --windres=wrc --enable-gui
34115
3d7ee643b110 Port to Wine.
ib
parents:
diff changeset
51
34122
68d3b36b9dfc Revise documentation.
ib
parents: 34115
diff changeset
52 and add any options you normally use for your Linux build, then run make.