-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to deal with mpv #86226
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@ran-dall to answer one of your questions, the reason the output for @vitorgalvao FYI My suggestion would be to call the current It should also be noted that |
But that’s just another random user who runs their script who knows when. Not a better solution for me than my formula, which rebuilds every day without my intervention.
That’s the best option I can think of as well, but I’m not happy with it.
True, but the goal is to eventually reduce those too.
That would be a step backwards, regarding Homebrew/core goals, and was already discussed. |
Idea out of left-field -- how about a cask file with a I realise this would not be easy since the |
Or, @vitorgalvao you could be the third-party that provides the |
This comment has been minimized.
This comment has been minimized.
Smart idea, but I have no idea if it’s feasible at all. I suspect it might not be without bending over backwards.
Thought about that as well, but it’s not as simple as compiling from the formula and distributing the bundle. I’ve tried that (by moving the bundle to a VM) but it didn’t work. If I had a script to do it properly, I’d be up for it.
Correct, hence this issue.
That doesn’t really get used much and equates to “just remove it”; I’d like to explore better options. |
This is not really feasible without building So I would suggest the following:
|
It's indeed a bit of a tricky build process. Currently I cannot script much for my build, and need to involve a few manual contortions that slightly change with every release and request I get through user feedback.
Or perhaps |
Thank you for the input! That confirms it’s not something to pursue.
It has to be |
@vitorgalvao I was previously using IINA, but with the lack of updates and issues under Monterey I have followed your lead and created a custom formula to install the HEAD version that builds the To check for updates, I am currently comparing the output of
with the output of
For example, at present:
and notice that the Now, would you happen to know if the output of I am trying to think of a |
Looks to be the same as mine, so we’re duplicating work. Mine is auto-updated from the main one every month or so.
Any reason why you check? You can simply force an update if there is one: #!/bin/bash
# Abort if mpv is running
if pgrep mpv; then
exit 0
fi
brew unlink mpv
# May need to run twice to work:
# https://github.com/mpv-player/mpv/issues/8445
# https://github.com/mpv-player/mpv/pull/8939
if ! brew install --fetch-HEAD --HEAD 'vitorgalvao/mpv/mpv'; then
brew install --fetch-HEAD --HEAD 'vitorgalvao/mpv/mpv'
fi
brew cleanup mpv # Remove old versions
brew link mpv
readonly old_mpv='/Applications/mpv.app'
readonly new_mpv="$(find /opt/homebrew/Cellar/mpv -name 'mpv.app')"
if [[ -n "${new_mpv}" ]]; then
rm -rf "${old_mpv}"
mv "${new_mpv}" "${old_mpv}"
fi |
Yes I saw that, very nice :)
Ah nice, I did not think of running
Mainly because I regularly run
and instead show something like:
Thanks for taking the time to respond @vitorgalvao. |
It seems to me that there's a lot of interest in a source-built app bundle from the formula -- enough so that at least two maintainers have tried to maintain their own versions of the formula to do so. This is a good enough reason for me to also build the app bundle in the Homebrew/core formula, especially if it doesn't entail additional dependencies. I know we don't like app bundles in Homebrew/core, but remember that we don't like them just because we don't like GUIs. We don't like them because building them in formulae tends to lead to a poorer user experience. In this case, I think not building the app bundle in the formula is what leads to a poorer user experience, so I think we should start considering just building it in the formula too. |
Thanks @carlocab, it would be great to re-add this to the |
@carlocab I absolutely agree with your logic. However, there is the limitation that Homebrew formulae cannot place files outside their directory. Note how I need to move the app bundle via bash at the end. I do it so the bundle is in a predictable location so it can be associated with filetypes. I remember a user saying they installed the formula for themselves and the cask on their wife’s computer, because she was a non-power user to whom the bundle in So the bundle building in the formula wouldn’t remove the need for a cask. But I’m not too comfortable with the status quo of a semi-official build in the cask, either. Perhaps we could do some trickery, having the cask depend on the formula then move the app bundle to the user’s Hacky, but we already have one formula and one cask anyway, and we have control over both sides. |
Isn't there a |
Just adding my support here. Glad to see this issue getting some more attention/discussion recently. Was looking into this yesterday after trying to build a version of mpv.app that runs natively on M1 Macs/ARM64 (Apple Silicon). The @stolendata cask has no current plan to support this. I got it working after a long, difficult, manual process – but would love for other users of M1 machines to be able to more easily take advantage of the available native version of the app and not have it be limited to usage via the command line… and to not have to go through fiddling with custom scripts for hours trying to get stuff (which could easily be made available out-of-the-box) to build correctly. (Also, just to point out, the formula is currently on v0.33.1 and the cask on v0.34.0. Ideally, in revisiting this whole setup, these would always be in sync.) |
Does it solve it? Really asking. One issue I faced way back when was that macOS didn’t see the app bundle deep in HB’s Cellar until it was manually opened once, and on every update that dance had to me performed again. For an app that is never opened directly (always through file associations) and that can have literal daily updates (they don’t care about releases, HEAD is officially the one true version), that is a major problem. |
|
It's coming. It's just that M1/M2 is a lot of money.
It's tricky because of the constant flux of the many dependencies that are required to build what at least I consider a versatile product. Every release of MPV that I publish involves a lot of manual adjustments since the last release because of the long interval these days. Only a little of the work is "automatable". Linking against 6-12 months old library versions is rarely advisable. Unfortunately I have no immediately useful solution to the problem. (Pardon for bumping against such an old comment.) |
I’ve tried a bunch of approaches for this over the years, including custom formulae and scripts to build the app downloaded with Homebrew. Today I thought “what if I just had a dummy app which called the Homebrew-installed CLI?” Thus mpv DUMMY. The README explains what it is. I’m waiting for an OK from the mpv devs on the use of the name and icon. Sharing because I remember others being in the same situation. It’s not extensively tested, but barring possible issues caused by Platypus you should have no issues with it. |
@vitorgalvao I have created a Cask for this in my tap: https://github.com/miccal/homebrew-miccal/blob/master/Casks/m-mpv.rb However, the Below is my
|
Try opening a file with it (e.g. right-click → Open With) rather than just opening the app bundle. The former is meant to work while the latter is not. (Technically the latter does work but it will close immediately and not show an icon in the dock, which looks indistinguishable from not working) |
Thanks @vitorgalvao, but I tried that. I have tested this on my Intel machine also, with the same result. |
Unfortunately, I cannot reproduce at all. It works fine for me on both Intel and ARM. Your brew config does jump at me, though. What’s your output for |
Sorted it out, thanks @vitorgalvao. Awesome work by the way! |
In a recent PR MacOS bundles have been included in the mpv build process. Since the PR was merged after the current release 0.37.0, the current release lacks the bundles, but I assume the next release will provide them together with the other release artifacts. From the newest mpv build actions I could download the bundle for my version of MacOS (14) and it seems to work properly although the bundle lacks a proper developer signature, so the Application needs to be confirm opened through the Security preferences pane (or maybe needs resigning). I'm not sure whether these bundles are suitable for a cask but my understanding is that they would be the best option as they would be provided by the official source. |
Doesn’t look like it. From the conversation the only versions available are for macOS 12 Intel, macOS 13 Intel, and macOS 14 ARM, because that’s what’s available in GitHub runners. That’s a great first step, but not yet enough to cover all cases. For what it’s worth, my DUMMY version has been serving me without a hitch for a year. I haven’t submitted the cask for it, though I have no quarrel if anyone wants to do it1. Seeing as Footnotes
|
You actually on purpose inserted the string 'stolendata' into a package name. Wow. |
The string |
Right, but nevertheless...
Sometimes making no exceptions to the rules is just silly. |
I'm happy it made everyone aware they were installing a non-official distribution |
I find it sillier to assume that an actual malicious actor would make such a change. |
Give me a break, you are being silly 😂 |
FYI changing the cask name somehow broke my Homebrew; had to manually delete the old cask (binary files, application) from all its locations and install the new one under the new name, as auto-updating didn't work. But all good now. |
This is open to anyone to offer a suggestion.
mpv is a popular media player. It has both a formula and a cask. The former does not provide an .app, but the latter does, because we want to have a clear separation of formulae and casks and avoid shipping GUIs in formulae.
The issue is that many users want the app bundle but there’s no official source to get it. In these cases, if upstream recommends a third-party build we’ll accept it as officially sanctioned. But in this instance they’re calling the builds they link to—and that we use—“Unofficial third-party builds”.
In other words, by providing mpv as a cask, we’re not following our own rules. How should we handle this?
Extra notes
As a fan of mpv, the way I handle it for myself is with
a custom formula, based on the Homebrew/core one witha dummy app which calls the Homebrew-installed CLI.head
and the commands to build the bundle. I do it not because I don’t trust the source in the cask, but because mpv releases are arbitrary and rare; all they care about is HEAD, so that’s what I want.If you want to take this matter up with upstream, I’ll request we discuss it here first, as a few of their maintainers are extremely biased and openly hostile towards macOS. I’ve experienced some of them who were not even part of a discussion join in just to insult macOS users.
If you intend to engage with upstream on your own, please be nice and respectful. Do not take it personally and keep the focus on technical terms for the conversation to be productive. Asking them to provide compiled app bundle would be a waste of time, but if you’re willing to do the leg work—make it fit into their build system and maintain it—you may have a shot.
The text was updated successfully, but these errors were encountered: