Skip to content
This repository has been archived by the owner on May 6, 2024. It is now read-only.

Windows support #11

Merged
merged 12 commits into from
Sep 3, 2023
Merged

Windows support #11

merged 12 commits into from
Sep 3, 2023

Conversation

fsobolev
Copy link
Member

@fsobolev fsobolev commented Aug 31, 2023

image

For some reason MPV can't find yt-dlp in PATH, so I had to place the binary in config dir (%APPDATA%/mpv) for the examples to work, and also yt-dlp seems to be very slow on Windows (it takes a lot of time to load a video from youtube, but in WSL it's fine). Other than that the examples work as expected.

Closes #6
Closes #7

TODO:

  • Update docs
  • Create MPVSharp.Bundled package with libmpv built-in

@fsobolev
Copy link
Member Author

fsobolev commented Sep 1, 2023

Okay, seems like I made working package with bundled libmpv. Dll file is from this repo, I used latest release. I didn't find anything similar pre-built for Linux, and building this myself seems to be very time-consuming, and considering that installing and adding libmpv to linux packages is much easier than doing the same on windows, I think it's fine to have Bundled package windows-only, it only really preferred there IMO. The library here seems to be complete, with GPL parts, so I set license for Bundled package to be GPL too (I'm not sure that copyleft really works here, but I think it's better to assume it does).

For testing I modified OpenGL example's csproj to have this:

  <PropertyGroup> 
<RestoreSources>$(RestoreSources);../../Nickvision.MPVSharp/bin/Debug;../../Nickvision.MPVSharp.Bundled/bin/Debug;https://api.nuget.org/v3/index.json</RestoreSources>
  </PropertyGroup>
  
  <ItemGroup>
    <PackageReference Include="OpenTK" Version="4.7.7" />
    <PackageReference Include="Nickvision.MPVSharp.Bundled" Version="2023.7.2" />
  </ItemGroup>

And it worked.

I first tried to have ProjectReference instead of PackageReference in Bundled, but it was causing NU1102 error when build the example for some reason.

@fsobolev fsobolev marked this pull request as ready for review September 1, 2023 01:37
Oh wait, it's not July? :D
New in libmpv 0.36
Not going to update every day ofc, just this time
Copy link
Member

@nlogozzo nlogozzo left a comment

Choose a reason for hiding this comment

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

Let's use ProjectReference here that way when we build the nuget for Bundled we don't need to wait for the regular one to upload to nuget then update the Package ver then build the Bundled nuget...

Everything else looks great tho!

@nlogozzo nlogozzo merged commit e2c340c into main Sep 3, 2023
3 checks passed
@nlogozzo nlogozzo deleted the windows branch September 3, 2023 02:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create package with bundled libmpv Windows support
2 participants