Skip to content

[libremidi] update to 5.2.0#44637

Closed
Mengna-Li wants to merge 2 commits into
microsoft:masterfrom
Mengna-Li:Dev/Mengna/libremidi
Closed

[libremidi] update to 5.2.0#44637
Mengna-Li wants to merge 2 commits into
microsoft:masterfrom
Mengna-Li:Dev/Mengna/libremidi

Conversation

@Mengna-Li
Copy link
Copy Markdown
Contributor

@Mengna-Li Mengna-Li commented Mar 27, 2025

Fixes #44612.

No feature needs to test.
Usage tested pass on x64-windows.

  • Changes comply with the maintainer guide.
  • SHA512s are updated for each updated download.
  • The "supports" clause reflects platforms that may be fixed by this new version.
  • Any fixed CI baseline entries are removed from that file.
  • Any patches that are no longer applied are deleted from the port's directory.
  • The version database is fixed by rerunning ./vcpkg x-add-version --all and committing the result.
  • Only one version is added to each modified port's versions file.

@Mengna-Li Mengna-Li added category:port-bug The issue is with a library, which is something the port should already support info:internal category:port-update The issue is with a library, which is requesting update new revision labels Mar 27, 2025
@Mengna-Li Mengna-Li marked this pull request as ready for review March 27, 2025 01:26
@jcelerier
Copy link
Copy Markdown
Contributor

If you want I can tag 5.1.1 with the fix

@Mengna-Li
Copy link
Copy Markdown
Contributor Author

If you want I can tag 5.1.1 with the fix

That would be great~

@dg0yt
Copy link
Copy Markdown
Contributor

dg0yt commented Mar 27, 2025

Why is this patch needed? Doesn't windowsapp already come fromt the (uwp) toolchain?

@Mengna-Li
Copy link
Copy Markdown
Contributor Author

Why is this patch needed? Doesn't windowsapp already come fromt the (uwp) toolchain?

I encountered the above error when installing on x64 windows.

@Mengna-Li Mengna-Li changed the title [libremidi] update to 5.1.0 and add windowsapp [libremidi] update to 5.2.0 Mar 27, 2025
@Mengna-Li Mengna-Li removed the category:port-bug The issue is with a library, which is something the port should already support label Mar 27, 2025
@dg0yt
Copy link
Copy Markdown
Contributor

dg0yt commented Mar 27, 2025

Why is this patch needed? Doesn't windowsapp already come fromt the (uwp) toolchain?

I encountered the above error when installing on x64 windows.

Did you consider disabling the UWP backend on non-uwp?

@dg0yt
Copy link
Copy Markdown
Contributor

dg0yt commented Mar 27, 2025

  • IMO the port should set LIBREMIDI_NO_WINUWP on non-uwp. This would have fixed the original problem with non-uwp windows triplets. Upstream's win32: add windowsapp which seems needed on MSVC celtera/libremidi#149 should probably be reverted.
  • Upstream has some new vendored downloads. These must be prevented in the port. Disabled, replaced either dependencies or with explicit downloads in the portfile. Asset caching!

@Mengna-Li
Copy link
Copy Markdown
Contributor Author

  • Upstream has some new vendored downloads. These must be prevented in the port. Disabled, replaced either dependencies or with explicit downloads in the portfile. Asset caching!

I'm not quite sure, which vendor downloads are you referring to?

@Mengna-Li Mengna-Li marked this pull request as draft March 27, 2025 09:16
@jcelerier
Copy link
Copy Markdown
Contributor

note that without this download vpckg has to provide cppwinrt

@jcelerier
Copy link
Copy Markdown
Contributor

also @dg0yt "UWP" works fine in non-UWP Win32 apps, it's just the name of the API (https://learn.microsoft.com/en-us/windows/uwp/audio-video-camera/midi)

@jcelerier
Copy link
Copy Markdown
Contributor

@dg0yt
Copy link
Copy Markdown
Contributor

dg0yt commented Mar 27, 2025

note that without this download vpckg has to provide cppwinrt

Note that vcpkg has a port cppwinrt.

@totalgee
Copy link
Copy Markdown

totalgee commented Apr 1, 2025

So this is blocked...? The issue seems to be regarding how/where cppwinrt is obtained (whether downloaded by the project's CMake or installed as a vcpkg package)? Or is it because "the UWP backend should be disabled on on non-uwp"? Who gets final say on this: the library author or someone from vcpkg team? One way or another, it would be nice to have this latest version of libremidi available via vcpkg...

@dg0yt
Copy link
Copy Markdown
Contributor

dg0yt commented Apr 1, 2025

The key blocker are the vendored downloads. vcpkg manages dependencies, not every port by itself.
Often it is not difficult to do the download in the portfile.
Using dependencies from vcpkg ports is usually a strong requirement. This can be tricky with tight version constraints.
But until today we don't even see it being tried.

@jcelerier
Copy link
Copy Markdown
Contributor

@dg0yt I'm definitely willing to look for cppwinrt from outside, but I'm not sure how to change my cmakelists to make sure everything is in order.

  • If I'm building on a MinGW / MSYS2 compiler I want to find MSYS2's cppwinrt
  • If I'm building on a "traditional" visual studio command-line tools shell I want to find cppwinrt.exe in the windows sdk set to CMake
  • I guess if I'm using vcpkg I want to find vcpkg's cppwinrt - will find_program(cppwinrt just find it in that case? will it work on both MinGW (which requires a patched version of cppwinrt) and MSVC?

for instance I want to avoid the case where someone builds in a mingw environment with vcpkg, and things fail mysteriously because vcpkg's cppwinrt package does not work with msys2's clang64

@jcelerier
Copy link
Copy Markdown
Contributor

@totalgee I'd be willing to add a testcase building with vcpkg on the CI, would you happen to have a couple lines of examples I could put in a GH action ?

@dg0yt
Copy link
Copy Markdown
Contributor

dg0yt commented Apr 2, 2025

find_program(VAR ...) is a customization point. Users can just set the right value, or they can adjust the search path. And so the libremidi port can simply pass the known location via OPTIONS.

This wouldn't cover mingw triplets, but the task would be to adapt the cppwinrt port. If it can't install cppwinrt for mingw, it could still provide information for downstream ports.

@totalgee
Copy link
Copy Markdown

totalgee commented Apr 2, 2025

@totalgee I'd be willing to add a testcase building with vcpkg on the CI, would you happen to have a couple lines of examples I could put in a GH action ?

You mean an example of using vcpkg to build a project with libremidi? Sure, I'll open an issue on your repo with some example code.

Copy link
Copy Markdown
Member

@BillyONeal BillyONeal left a comment

Choose a reason for hiding this comment

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

@dg0yt convinced me about new vendored dependencies..

@Mengna-Li Mengna-Li closed this Jun 27, 2025
@jcelerier
Copy link
Copy Markdown
Contributor

jcelerier commented Jul 3, 2025

fyi @Mengna-Li for 5.3 which will be released soon, I added a CMake var to control whether the cppwinrt and winmidi nupkgs are downloaded as part of the build or not

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category:port-update The issue is with a library, which is requesting update new revision

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[libremidi] update to 5.1.0

6 participants