DOCS/crosscompile-mingw.txt: Update

This commit is contained in:
Martin Herkt 2013-09-08 12:25:20 +02:00
parent c9873ea06c
commit 3992e5dfca
1 changed files with 9 additions and 17 deletions

View File

@ -5,9 +5,10 @@ http://mingw-w64.sourceforge.net.
You have to run mpv's configure with these arguments: You have to run mpv's configure with these arguments:
./configure --enable-cross-compile --target=i686-w64-mingw32 ./configure --enable-cross-compile --target=i686-w64-mingw32
Using MXE to setup a MinGW-w64 environment is recommended: http://mxe.cc Using mingw-w64-cmake to setup a MinGW-w64 environment is recommended (this will
Currently, using an experimental branch of MXE is required: also build mpv and its dependencies): https://github.com/lachs0r/mingw-w64-cmake
https://github.com/tonytheodore/mxe.git
Alternatively, use MXE: http://mxe.cc
Warning: the original MinGW (http://www.mingw.org) is unsupported. Warning: the original MinGW (http://www.mingw.org) is unsupported.
@ -18,11 +19,10 @@ Example with MXE
================ ================
# Download MXE. Note that compiling the required packages requires about 1 GB # Download MXE. Note that compiling the required packages requires about 1 GB
# or more! We are using an experimental repository, which supports MinGW-w64. # or more!
# The official MXE supports classic MinGW only, which doesn't work with mpv.
cd /opt cd /opt
git clone https://github.com/tonytheodore/mxe.git mingw git clone https://github.com/mxe/mxe
cd mingw cd mingw
# Edit the MXE target, so that MinGW-w64 for 32 bit targets is built. # Edit the MXE target, so that MinGW-w64 for 32 bit targets is built.
@ -38,11 +38,6 @@ make libass
make jpeg make jpeg
make pthreads make pthreads
# Older MXE and MinGW-w64 snapshots don't provide up-to-date OpenGL headers.
wget http://www.opengl.org/registry/api/glext.h
mv glext.h usr/i686-w64-mingw32/include/GL/
# Build mpv. The target will be used to automatically select the name of the # Build mpv. The target will be used to automatically select the name of the
# build tools involved (e.g. it will use i686-w64-mingw32-gcc). # build tools involved (e.g. it will use i686-w64-mingw32-gcc).
@ -52,9 +47,6 @@ export PATH=/opt/mingw/usr/bin/:$PATH
./configure --enable-cross-compile --target=i686-w64-mingw32 ./configure --enable-cross-compile --target=i686-w64-mingw32
make make
# This should work. For some reason, the resulting .exe will depend on the DLL # This should work. Note however that MXEs ffmpeg package might be very old
# /opt/mingw/usr/i686-w64-mingw32/bin/libwinpthread-1.dll because pthreads-w32 # in order to avoid breaking e.g. xine-lib, so you might want to update that
# folks don't like static linking. How to enable static linking is left as # or build it manually as well.
# exercise to the reader. Passsing --disable-pthreads to mpv's configure will
# get rid of the dependency, but may disable some features (such as the stream
# cache).