History

DOCS/compile-windows.md: improve Windows build documentation

Currently the documentation for building on Windows, specifically the "Native Compilation with Clang (Windows SDK Build)" route, could use a few minor improvement to make the development onboarding experience more smoothly. Fixes #14214

Crend King committed 2 years ago

Commit d53aa6d1 parent 2becb971 file · +25 −8Browse files

Unified · Split

DOCS/compile-windows.md+25−8
@@ -144,7 +144,12 @@ they will be automatically downloaded and built by Meson. · 143 unmodified lines
144 or the full [Visual Studio](https://visualstudio.microsoft.com/downloads/#visual-studio-community-2022):144 or the full [Visual Studio](https://visualstudio.microsoft.com/downloads/#visual-studio-community-2022):
145 - From the installer, select the necessary components:145 - From the installer, select the necessary components:
146 - Clang compiler for Windows146 - Clang compiler for Windows
147 - C++ CMake tools for Windows
147 - Windows SDK148 - Windows SDK
149 - Activate the developer shell:
150 ```
151 & "<Visual Studio Path>\Common7\Tools\Launch-VsDevShell.ps1" -Arch amd64 -HostArch amd64 -SkipAutomaticLocation | Out-Null
152 ```
1482. Install Meson, as outlined in [Getting Meson](https://mesonbuild.com/Getting-meson.html):1532. Install Meson, as outlined in [Getting Meson](https://mesonbuild.com/Getting-meson.html):
149 - **Important**: At the time of writing, there is an issue in Meson with154 - **Important**: At the time of writing, there is an issue in Meson with
150 escaping response files.155 escaping response files.
@@ -154,19 +159,31 @@ they will be automatically downloaded and built by Meson. · 3 unmodified lines
154 159
155 If you wish to install a fixed version, follow the steps outlined160 If you wish to install a fixed version, follow the steps outlined
156 [here](https://github.com/mpv-player/mpv/blob/481e498427fc34956ad24b94157553908f5cd638/.github/workflows/build.yml#L132-L135).161 [here](https://github.com/mpv-player/mpv/blob/481e498427fc34956ad24b94157553908f5cd638/.github/workflows/build.yml#L132-L135).
1573. Set environment variables or use the ``--native-file`` option in Meson.1623. The following build script utilizes the Meson subprojects system to build mpv and its dependencies.
163 To make sure all dependency versions are up-to-date, update the subprojects database from Meson's WrapDB.
164 Also explicitly download several wraps as some nested projects may pull older versions of them.
165 ```
166 meson wrap update-db
158 167
159 ``` powershell168 meson wrap install expat
160 $env:CC = "clang"169 meson wrap install harfbuzz
161 $env:CXX = "clang++"170 meson wrap install libpng
171 meson wrap install zlib
172 ```
1734. Set environment variables or use the `--native-file` option in Meson.
174 ```powershell
175 $env:CC = 'clang'
176 $env:CXX = 'clang++'
162 $env:CC_LD = 'lld'177 $env:CC_LD = 'lld'
163 $env:CXX_LD = 'lld'178 $env:CXX_LD = 'lld'
164 $env:WINDRES = 'llvm-rc'179 $env:WINDRES = 'llvm-rc'
165 ```180 ```
166 181 Note that some dependencies (e.g. LuaJIT) may require `sed` to configure. Fortunately, it is already bundled in
1674. Execute [build-win32.ps1](https://github.com/mpv-player/mpv/blob/master/ci/build-win32.ps1):182 [Git for Windows](https://www.git-scm.com/download/win):
168 - This script utilizes the Meson subprojects system to build mpv and its183 ```powershell
169 dependencies. Refer to the script for more details.184 $env:PATH += ';<Git Path>\usr\bin'
185 ```
1865. Execute [ci\build-win32.ps1](https://github.com/mpv-player/mpv/blob/master/ci/build-win32.ps1). Refer to the script for more details.
170 187
171This process will produce a fully static ``mpv.exe`` and ``mpv.com``, as well as188This process will produce a fully static ``mpv.exe`` and ``mpv.com``, as well as
172a static ``libmpv.a``.189a static ``libmpv.a``.

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t