summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Ross-Gowan <rossy@jrg.systems>2017-10-01 20:34:06 +1100
committerJames Ross-Gowan <rossy@jrg.systems>2017-10-02 01:28:54 +1100
commit51985e3dd630a5fc212f643781b4a0ca7f590782 (patch)
tree865152dcfc05017ee59b9dbf41348377d6318dd9
parent910600a36f0bcaba75a8d2b8c7b33e01ccb1dc52 (diff)
downloadmpv-51985e3dd630a5fc212f643781b4a0ca7f590782.tar.bz2
mpv-51985e3dd630a5fc212f643781b4a0ca7f590782.tar.xz
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.
-rw-r--r--DOCS/compile-windows.md40
1 files changed, 19 insertions, 21 deletions
diff --git a/DOCS/compile-windows.md b/DOCS/compile-windows.md
index 48895f5428..08d4564474 100644
--- a/DOCS/compile-windows.md
+++ b/DOCS/compile-windows.md
@@ -101,11 +101,14 @@ Installing MSYS2
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
- build 32-bit and 64-bit binaries when running on a 64-bit version of Windows.
+ Both the i686 and the x86_64 version of MSYS2 can build 32-bit and 64-bit
+ 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
- from the MSYS2 shell that is started from the final installation dialog.
+2. Start a MinGW-w64 shell (``mingw64.exe``). **Note:** This is different from
+ 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``.
@@ -129,42 +132,37 @@ Installing mpv dependencies
```bash
# 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
-# lcms2 are also pulled in as dependencies of ffmpeg.
-pacman -S mingw-w64-x86_64-ffmpeg mingw-w64-x86_64-libjpeg-turbo mingw-w64-x86_64-lua51
-
-# Install additional (optional) dependencies
-pacman -S mingw-w64-x86_64-libdvdnav mingw-w64-x86_64-libguess mingw-w64-x86_64-angleproject-git
+# Install the most important MinGW-w64 dependencies. libass and lcms2 are also
+# pulled in as dependencies of ffmpeg.
+pacman -S $MINGW_PACKAGE_PREFIX-{ffmpeg,libjpeg-turbo,lua51,angleproject-git}
```
-For a 32-bit build, install ``mingw-w64-i686-*`` packages instead.
-
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
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
-``/mingw64/bin``.
+``/mingw64/bin`` or ``/mingw32/bin``.
```bash
-# For a 32-bit build, use --prefix=/mingw32 instead
-./waf configure CC=gcc.exe --check-c-compiler=gcc --prefix=/mingw64
-./waf install
+/usr/bin/python3 waf configure CC=gcc.exe --check-c-compiler=gcc --prefix=$MSYSTEM_PREFIX
+/usr/bin/python3 waf install
```
Or, compile and install both libmpv and mpv:
```bash
-./waf configure CC=gcc.exe --check-c-compiler=gcc --enable-libmpv-shared --prefix=/mingw64
-./waf install
+/usr/bin/python3 waf configure CC=gcc.exe --check-c-compiler=gcc --enable-libmpv-shared --prefix=$MSYSTEM_PREFIX
+/usr/bin/python3 waf install
```
Linking libmpv with MSVC programs