March 18, 2021
Over the past few months, I've been working on a side project to improve Meson sub-project support. The best stress test is to build projects on Windows, without
msys2, because it has no dependencies or tools installed (e.g. pkg-config). Meson has to build everything itself from scratch.
Here are step-by-step instructions, starting from a fresh Windows 10 installation, on how to run a
Download from https://visualstudio.microsoft.com/vs/community. Make sure to check the box "Desktop development with C++".
Download from https://www.python.org/downloads. Make sure to check the box "Add python to PATH".
Download from https://gitforwindows.org. It asks many questions, however the default is always good enough, so next, next, next...
From the Windows start menu, search for
x64 Native Tools Command Prompt for VS 2019. That will open a terminal configured to use MSVC x64 tools.
First let's create a directory where we'll fetch the source code:
mkdir C:\src cd C:\src
Let's also configure git:
git config --global user.email "email@example.com" git config --global user.name "Xavier Claessens"
Installing the latest release of Meson (requires >=0.57.0) can be done with a simple command:
C:\src>pip install meson
Fetch gtk from git:
C:\src>git clone https://gitlab.gnome.org/GNOME/gtk.git C:\src>cd gtk
At the time of writing !3135 is not yet merged, so we need to use my branch:
(Update March 22: This has now been merged so my branch is no longer needed.)
C:\src\gtk>git fetch https://gitlab.gnome.org/xclaesse/gtk.git meson-install-script C:\src\gtk>git checkout -b meson-install-script FETCH_HEAD
During the GTK4 configuration, Meson will download and configure all dependencies. Great efforts have been made across all dependencies to make them work out of the box on Windows.
C:\src\gtk>meson setup build --prefix C:/gnome C:\src\gtk>meson compile -C build C:\src\gtk>meson install -C build
That's all, you can now run demo applications!
It works out of the box on my VirtualBox machine, however on my physical PC with an intel GPU, I get a crash at startup:
Unhandled exception at 0x5211345E (ig4icd32.dll) in gtk4-demo.exe: 0xC0000005: Access violation reading location 0x00000050
This can be worked around by using
C:\src\gtk>set GSK_RENDERER=cairo C:\src\gtk>C:\gnome\bin\gtk4-demo.exe
Since this is a complete build using MSVC, it is also fully debuggable.
If you break execution, or hit a crash, it will open the source code and you can debug step by step, see the value of any variable, whether it is in gtk or in any of its dependencies.
|Debugging in Visual Studio.|
Here's a list of some of the items I would like to eventually look into:
As usual, if you have any questions about GTK4 or GStreamer on Windows, or any other platform, please contact us!
Earlier this year, from January to April 2021, I worked on adding support for stateless decoders for GStreamer as part of a multimedia internship…
In our previous post, we presented a project backed by INVEST-AI which introduces a multi-stage neural network-based solution. Now let's…
Initiated as a joint effort by the Google Chrome OS team and Collabora, the recent KernelCI hackfest brought the addition of new tests including…
There's a lot that has happened in the world of Zink since my last update, so let's see if I can bring you up to date on the most important…
Panfrost, the open source driver for Arm Mali, now supports OpenGL ES 3.1 on both Midgard (Mali T760 and newer) and Bifrost (Mali G31, G52,…
Collabora has been investing into Perfetto to enable driver authors & users to get deep insights into driver internals and GPU performance.…