mirror of https://github.com/mpv-player/mpv
DOCS/compile-windows.md: update for changes to mpv and MSYS2
- Don't recommend libdvdnav, since DVD support isn't compiled by default anymore. - Take advantage of the new $MINGW_PACKAGE_PREFIX and $MSYSTEM_PREFIX variables to make the build commands independent from the mingw-w64 build environment being used. - Invoke /usr/bin/python3 directly, since I've heard some packages have started to depend on mingw-w64 versions of Python, but our build scripts only work with the MSYS2 version. - Reword the MSYS2 install instructions to try to prevent common errors.
This commit is contained in:
parent
910600a36f
commit
51985e3dd6
|
@ -101,11 +101,14 @@ Installing MSYS2
|
||||||
|
|
||||||
1. Download an installer from https://msys2.github.io/
|
1. Download an installer from https://msys2.github.io/
|
||||||
|
|
||||||
It doesn't matter whether the i686 or the x86_64 version is used. Both can
|
Both the i686 and the x86_64 version of MSYS2 can build 32-bit and 64-bit
|
||||||
build 32-bit and 64-bit binaries when running on a 64-bit version of Windows.
|
mpv binaries when running on a 64-bit version of Windows, but the x86_64
|
||||||
|
version is preferred since the larger address space makes it less prone to
|
||||||
|
fork() errors.
|
||||||
|
|
||||||
2. Start a MinGW-w64 shell (``mingw64.exe``). Note that this is different
|
2. Start a MinGW-w64 shell (``mingw64.exe``). **Note:** This is different from
|
||||||
from the MSYS2 shell that is started from the final installation dialog.
|
the MSYS2 shell that is started from the final installation dialog. You must
|
||||||
|
close that shell and open a new one.
|
||||||
|
|
||||||
For a 32-bit build, use ``mingw32.exe``.
|
For a 32-bit build, use ``mingw32.exe``.
|
||||||
|
|
||||||
|
@ -129,42 +132,37 @@ Installing mpv dependencies
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Install MSYS2 build dependencies and a MinGW-w64 compiler
|
# Install MSYS2 build dependencies and a MinGW-w64 compiler
|
||||||
pacman -S git mingw-w64-x86_64-pkg-config python mingw-w64-x86_64-gcc
|
pacman -S git python $MINGW_PACKAGE_PREFIX-{pkg-config,gcc}
|
||||||
|
|
||||||
# Install the most important MinGW-w64 dependencies. libass, libbluray and
|
# Install the most important MinGW-w64 dependencies. libass and lcms2 are also
|
||||||
# lcms2 are also pulled in as dependencies of ffmpeg.
|
# pulled in as dependencies of ffmpeg.
|
||||||
pacman -S mingw-w64-x86_64-ffmpeg mingw-w64-x86_64-libjpeg-turbo mingw-w64-x86_64-lua51
|
pacman -S $MINGW_PACKAGE_PREFIX-{ffmpeg,libjpeg-turbo,lua51,angleproject-git}
|
||||||
|
|
||||||
# Install additional (optional) dependencies
|
|
||||||
pacman -S mingw-w64-x86_64-libdvdnav mingw-w64-x86_64-libguess mingw-w64-x86_64-angleproject-git
|
|
||||||
```
|
```
|
||||||
|
|
||||||
For a 32-bit build, install ``mingw-w64-i686-*`` packages instead.
|
|
||||||
|
|
||||||
Building mpv
|
Building mpv
|
||||||
------------
|
------------
|
||||||
|
|
||||||
Clone the latest mpv from git and install waf:
|
Clone the latest mpv from git and install waf. **Note:** ``/usr/bin/python3``
|
||||||
|
is invoked directly here, since an MSYS2 version of Python is required.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone https://github.com/mpv-player/mpv.git && cd mpv
|
git clone https://github.com/mpv-player/mpv.git && cd mpv
|
||||||
./bootstrap.py
|
/usr/bin/python3 bootstrap.py
|
||||||
```
|
```
|
||||||
|
|
||||||
Finally, compile and install mpv. Binaries will be installed to
|
Finally, compile and install mpv. Binaries will be installed to
|
||||||
``/mingw64/bin``.
|
``/mingw64/bin`` or ``/mingw32/bin``.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# For a 32-bit build, use --prefix=/mingw32 instead
|
/usr/bin/python3 waf configure CC=gcc.exe --check-c-compiler=gcc --prefix=$MSYSTEM_PREFIX
|
||||||
./waf configure CC=gcc.exe --check-c-compiler=gcc --prefix=/mingw64
|
/usr/bin/python3 waf install
|
||||||
./waf install
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Or, compile and install both libmpv and mpv:
|
Or, compile and install both libmpv and mpv:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./waf configure CC=gcc.exe --check-c-compiler=gcc --enable-libmpv-shared --prefix=/mingw64
|
/usr/bin/python3 waf configure CC=gcc.exe --check-c-compiler=gcc --enable-libmpv-shared --prefix=$MSYSTEM_PREFIX
|
||||||
./waf install
|
/usr/bin/python3 waf install
|
||||||
```
|
```
|
||||||
|
|
||||||
Linking libmpv with MSVC programs
|
Linking libmpv with MSVC programs
|
||||||
|
|
Loading…
Reference in New Issue