Skip to content

Rewrites osxtools.py and dylib_unhell.py in a single Swift script. - #18276

Open
pxia wants to merge 4 commits into
mpv-player:masterfrom
pxia:dylib_unhell
Open

Rewrites osxtools.py and dylib_unhell.py in a single Swift script. #18276
pxia wants to merge 4 commits into
mpv-player:masterfrom
pxia:dylib_unhell

Conversation

@pxia

@pxia pxia commented Jul 19, 2026

Copy link
Copy Markdown

As the title suggests. I saw this is an open item in the "Want to work on mpv" post so here it is. Also made a small improvement in the dylib finding function.

Tested on macos 15, 26, and 27 beta.

pxia added 4 commits July 19, 2026 10:32
So it no longer depends on library install path. Some users (like me) have custom homebrew prefix that the old way might cause libraries to be incorrectly skipped.
@pxia

pxia commented Jul 23, 2026

Copy link
Copy Markdown
Author

Anyone can review this?

@Akemi

Akemi commented Jul 23, 2026

Copy link
Copy Markdown
Member

just be patient. it would probably be a good idea to make this more incremental if this is supposed to be an exact port. for now leave the improvements out.

@kasper93

Copy link
Copy Markdown
Member

btw. What's wrong with python version? I don't see how swift version simplifies the workflow.

@pxia

pxia commented Jul 24, 2026

Copy link
Copy Markdown
Author

I don't know either... I just want to make the isUserLib change (2nd commit) and it intersects with the item on #13608.

@Akemi

Akemi commented Jul 25, 2026

Copy link
Copy Markdown
Member

btw. What's wrong with python version? I don't see how swift version simplifies the workflow.

it's similar to the arguments brought up for the obj-c to swift transition. some of it is my personal preference, since i also maintain that code. though the plan was to use (swift) native APIs to replace the usage of (some) CLI commands and the manual parsing of those outputs. in the best case this should be cleaner and faster.

for now i only have some local tests, though.

I don't know either... I just want to make the isUserLib change (2nd commit) and it intersects with the item on #13608.

feel free to fix those in the current script and make a separate PR.

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.

3 participants