mirror of
https://github.com/mpv-player/mpv
synced 2025-03-24 12:22:25 +00:00
DOCS/crosscompile-mingw: update
- Adds description of and uses $JOBS envvar in MXE instructions - Adds MXE_TARGETS to command line instead of echoing it to settings.mk - Prettify and sentence usage
This commit is contained in:
parent
891268955e
commit
b980884f92
@ -6,16 +6,22 @@ produce both 32 bit and 64 bit executables. MinGW-w64 is available from
|
|||||||
http://mingw-w64.sourceforge.net.
|
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:
|
||||||
DEST_OS=win32 TARGET=i686-w64-mingw32 ./waf configure
|
|
||||||
|
|
||||||
Using mingw-w64-cmake to setup a MinGW-w64 environment is recommended (this will
|
```bash
|
||||||
also build mpv and its dependencies): https://github.com/lachs0r/mingw-w64-cmake
|
DEST_OS=win32 TARGET=i686-w64-mingw32 ./waf configure
|
||||||
|
```
|
||||||
|
|
||||||
Alternatively, use MXE: http://mxe.cc
|
While building a complete MinGW-w64 toolchain yourself is possible, people have
|
||||||
With MXE, you have to modify the file settings.mk to target MinGW-w64 (even if
|
created scripts to help ease the process. These are the two recommended methods:
|
||||||
you compile to 32 bit).
|
|
||||||
|
|
||||||
Warning: the original MinGW (http://www.mingw.org) is unsupported.
|
- Using [mingw-w64-cmake](lachs0r/mingw-w64-cmake) to setup a MinGW-w64
|
||||||
|
environment. We recommend you to try this first before MXE. mingw-w64-cmake
|
||||||
|
will also build mpv and its dependencies.
|
||||||
|
- Alternatively, you can use MXE: http://mxe.cc. With MXE, you have to manually
|
||||||
|
set the target to MinGW-w64 (even if you compile to 32 bit). A working example
|
||||||
|
below.
|
||||||
|
|
||||||
|
**Warning**: the original MinGW (http://www.mingw.org) is unsupported.
|
||||||
|
|
||||||
Note that MinGW environments included in Linux distributions are often broken,
|
Note that MinGW environments included in Linux distributions are often broken,
|
||||||
outdated and useless, and usually don't use MinGW-w64.
|
outdated and useless, and usually don't use MinGW-w64.
|
||||||
@ -31,22 +37,24 @@ cd /opt
|
|||||||
git clone https://github.com/mxe/mxe mingw
|
git clone https://github.com/mxe/mxe mingw
|
||||||
cd mingw
|
cd mingw
|
||||||
|
|
||||||
# Edit the MXE target, so that MinGW-w64 for 32 bit targets is built.
|
|
||||||
|
|
||||||
echo "MXE_TARGETS := i686-w64-mingw32" > settings.mk
|
|
||||||
|
|
||||||
# Build required packages. The following provide a minimum required to build
|
# Build required packages. The following provide a minimum required to build
|
||||||
# mpv. (Not all of the following packages are strictly required.)
|
# mpv.
|
||||||
|
|
||||||
make gcc
|
# The JOBS environment variable controls threads to use when building. DO NOT
|
||||||
make ffmpeg
|
# use the regular `make -j4` option with MXE. Alternatively, you can make this
|
||||||
make libass
|
# a default so you don't need to type `JOBS=4` every time you build:
|
||||||
make jpeg
|
# echo "JOBS := 4" >> settings.mk
|
||||||
make pthreads
|
|
||||||
|
# The MXE_TARGET environment variable builds MinGW-w64 for 32 bit targets.
|
||||||
|
# You can make this a default:
|
||||||
|
# echo "MXE_TARGETS := i686-w64-mingw32" >> settings.mk
|
||||||
|
|
||||||
|
make gcc ffmpeg libass jpeg pthreads MXE_TARGETS=i686-w64-mingw32 JOBS=4
|
||||||
|
|
||||||
# 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).
|
||||||
|
|
||||||
|
cd ..
|
||||||
git clone https://github.com/mpv-player/mpv.git
|
git clone https://github.com/mpv-player/mpv.git
|
||||||
cd mpv
|
cd mpv
|
||||||
export PATH=/opt/mingw/usr/bin/:$PATH
|
export PATH=/opt/mingw/usr/bin/:$PATH
|
||||||
|
Loading…
Reference in New Issue
Block a user