Skip to content

ci/mingw64-fat: add FAT mingw64 builds - #17526

Merged
kasper93 merged 6 commits into
mpv-player:masterfrom
kasper93:mingw-fat
Sep 25, 2026
Merged

kasper93 merged 6 commits into
mpv-player:masterfrom
kasper93:mingw-fat

Conversation

@kasper93

@kasper93 kasper93 commented Mar 8, 2026

Copy link
Copy Markdown
Member

More complete mpv builds. Also provide libmpv in both gpl and lgpl
variant.


VkInstance inst = vk->vkinst->instance;
VkResult res = vkCreateWin32SurfaceKHR(inst, &wininfo, NULL, &vk->surface);
mp_assert(vk->vkinst->get_proc_addr);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is depending on the upstream vulkan loader that bad? 馃

@kasper93 kasper93 Mar 8, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Upstream Vulkan loader doesn't support static linking. That's why all our (other) packages have vulkan-1.dll in them. Apparently https://github.com/BtbN/Vulkan-Shim-Loader exists to workaround that. But it doesn't load functions from platform specific xmls. While, it could be fixed there, I don't mind loading it through get_proc_addr.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah this is a static build? dynamic is nicer IMO

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why can't it just link to vulkan dll? Windows now includes vulkan loader.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah this is a static build? dynamic is nicer IMO

This build has probably over 100 libraries linked (I didn't even count, it's everything), linking it statically just makes the output cleaner, we don't need anything else to interact with those dlls.

Why can't it just link to vulkan dll? Windows now includes vulkan loader.

It's on graphic driver, and on some systems in might not be available. Either way, it's up to docker image that I use. I think it's cleaner to dynamically load vulkan dll. We should be doing it in fact and not directly link to loader.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah this is a static build? dynamic is nicer IMO

What makes dynamic mpv Windows compiles nicer for you? Legit question.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dynamic causes less weird build issues, that's all.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dynamic linking on MinGW only introduces more problems, like auto import and runtime pseudo relocation.

@kasper93

kasper93 commented Jun 7, 2026

Copy link
Copy Markdown
Member Author

@sfan5 @Dudemanguy @avih: Do you have option how to finalize this PR? The current state is ok, to produce artifacts, in the off chance it duplicates some code.

Some idea, I could see.

  • Add Dockerfile, based on BtbN's image, but instead of bulding things in .sh, we create our own image first. It could be built evertime, because we likely want to have fresh ffmpeg anyway. Not much change, except organization.
  • Replace current mingw job, to reduce duplication. Basically merge two into one output. This can be done later. I don't want to touch old mingw job atm.
  • Use shared build, but frankly with all those deps, it is mess to handle, and with the docker image to handle everything it is easy to just produce static mpv.exe
  • others?

Build mpv and libmpv inside the FFmpeg-Builds container images, which
ship a mingw-w64 cross toolchain and every FFmpeg dependency as a static
library. FFmpeg itself, LuaJIT, subrandr and the C++/WinRT projection
are built on top. One day we might fork the FFmpeg-Builds and do
mpv-Builds, but the overhead of maintaining that is bigger than current
cost of building few deps on top.

x86_64 and aarch64 are built in the GPL and the LGPL variant. The GPL
variant publishes mpv.exe, both variants publish a libmpv package with
the DLL, its import library and the headers.

rav1e and librsvg are Rust libraries with their own copy of the Rust
standard library, which collides with subrandr's at link time, so both
are left out of FFmpeg for now.
Attach the full x86_64 and aarch64 builds instead of the shared x86_64
mingw-w64 build, which they supersede. The i686 build stays, it exists
only as the shared build. Add a libmpv section with the GPL and LGPL
packages, label every entry by architecture and flavour.
Run the build workflow for v0.* tags and let the publish job upload the
artifacts to the release of that tag, with the run id stripped from the
asset names to match the previous hand-made uploads. The release is
created as a draft when it does not exist yet, so the notes can be
filled in before publishing.
@kasper93
kasper93 merged commit 35af061 into mpv-player:master Sep 25, 2026
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants