Skip to content

Commit d68db58

Browse files
Updated Cairo and pngquant installation instructions for Windows (#7163)
Instead of installing GTK+ and installing from source, suggested installing MSYS2 and obtaining Cairo built for UCRT64 via its Pacman.
1 parent 5872958 commit d68db58

File tree

1 file changed

+25
-13
lines changed

1 file changed

+25
-13
lines changed

docs/plugins/requirements/image-processing.md

+25-13
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,17 @@ Material for MkDocs makes use of for generating [social cards] and performing
5252

5353
=== ":fontawesome-brands-windows: Windows"
5454

55-
As stated in the [installation guide], the easiest way to get up and running
56-
with the [Cairo Graphics] library on Windows is by installing [GTK+]. You
57-
can also download a precompiled [GTK runtime].
55+
The easiest way to get up and running with the [Cairo Graphics] library is
56+
by installing it via [MSYS2], which is a software distribution and building
57+
platform for Windows. Run the following command inside of a MSYS2 shell:
58+
59+
```
60+
pacman -S mingw-w64-ucrt-x86_64-cairo
61+
```
62+
63+
MSYS2 provides the Cairo Graphics library in several different environments.
64+
The above command uses the [UCRT64] environment, as recommended by the MSYS2
65+
developers.
5866

5967
=== ":material-linux: Linux"
6068

@@ -88,8 +96,8 @@ The following environments come with a preinstalled version of [Cairo Graphics]:
8896
[Cairo Graphics]: https://www.cairographics.org/
8997
[Homebrew]: https://brew.sh/
9098
[installation guide]: https://www.cairographics.org/download/
91-
[GTK+]: https://www.gtk.org/docs/installations/windows/
92-
[GTK runtime]: https://github.com/tschoonj/GTK-for-Windows-Runtime-Environment-Installer/releases
99+
[MSYS2]: https://www.msys2.org/
100+
[UCRT64]: https://www.msys2.org/docs/environments/
93101
[Docker image]: https://hub.docker.com/r/squidfunk/mkdocs-material/
94102
[GitHub Actions]: ../../publishing-your-site.md#with-github-actions
95103

@@ -111,9 +119,13 @@ explains how to install [pngquant] system:
111119

112120
=== ":fontawesome-brands-windows: Windows"
113121

114-
Installing [pngquant] on Windows is a little more involved. The
115-
[pngquant-winbuild] repository contains a guide on how to set up an
116-
environment for building [pngquant] on Windows.
122+
The easiest way to get [pngquant] is by installing it via [MSYS2], which is
123+
a software distribution and building platform for Windows. Run the following
124+
command inside of a MSYS2 shell:
125+
126+
```
127+
pacman -S mingw-w64-ucrt-x86_64-pngquant
128+
```
117129

118130
=== ":material-linux: Linux"
119131

@@ -190,19 +202,19 @@ process is different:
190202
environmental `PATH` variable. Additionally each library `name` is checked
191203
in [two variants][find-library-Windows] with the `name` and `name.dll` format.
192204

193-
The default installation path of [GTK runtime] is:
205+
The default binary and shared library path for the [UCRT64] environment of
206+
[MSYS2], in which the packages were installed using the above commands, is:
194207

195208
```powershell
196-
C:\Program Files\GTK3-Runtime Win64
209+
C:\msys64\ucrt64\bin
197210
```
198211

199-
and the libraries are in the `<INSTALL-DIR>\lib` directory. Use the debug
200-
script below to check if the path is included. If it isn't then:
212+
Use the debug script below to check if the path is included. If it isn't then:
201213

202214
1. Press ++windows+r++.
203215
2. Run the `SystemPropertiesAdvanced` applet.
204216
3. Select "Environmental Variables" at the bottom.
205-
4. Add the whole path to the `lib` directory to your `Path` variable.
217+
4. Add the whole path to the above directory to your `Path` variable.
206218
5. Click OK on all open windows to apply changes.
207219
6. Fully restart any open Terminal windows and their parent hosts like IDEs.
208220

0 commit comments

Comments
 (0)