Add macOS arm64 build#258
Conversation
9365776 to
3ffa342
Compare
|
This is working. Tested on my fork. Also improves launch time significantly. |
|
@WillyJL could you please review PR? |
|
For anyone that finds this, I have added quite a lot of macOS-specific fixes and optimizations for myself on my fork here: https://github.com/cantunborn/F95Checker. You can download and try the arm64 version (courtesy @rakleed for their work on the build for arm64 in this PR) for Apple Silicon macs from the Actions section, see if it works for you. Works much better for me in terms of resource usage, compatibility and general smoothness. |
|
@cantunborn could you please open PRs in this repo with your changes? |
|
i was gonna check over them manually and merge what i think makes sense to have upstream, in a few minutes |
|
@cantunborn regarding your fork:
|
That's just something I did to simplify builds for myself. I only needed macos-arm64.
I added Cmd+W because it's the standard way of closing windows on macOS.
Issue to address. It scrolls way too fast by default. I just picked the default settings that work best for me on macOS. The current values on my fork have the most native macOS scroll feel, so I kept those changes. If you want to can test and keep only for macOS builds.
I just did a launch time analysis using Claude, and added the changes that minimized it. I assumed you might have stopped development on your repo so I figured out whatever changes I could do to help. The launch time is way too high (at least on macOS) for the current code state. render_when_unfocused change, draw_next of either 0.5 or 0.2 and glfw.wait_events_timeout(): again, just did an analysis with Claude, I'm not fully knowledgeable on the code. It has worked well for my purposes, for the past months since the change. Idle + active both have much lesser resource usage with no noticeable change in behavior for me. Resource usage is a genuine issue with the whole software rn. Your call on how it can be fixed since you're the dev and know the codebase better than me.
Currently on macOS, the menu bar icon context menu is inert/disabled. Can't click anything. Claude came up with the root cause as something openGL related, so I added those and now even tho it doesn't look like native macOS it opens properly and all buttons work.
I added this to fix rendering in integrated browser. With current code if I try to open any download links, it just opened f95zone login page link and rendered as blank. After that fix everything renders properly and links redirect to selected default browser after login. I think it's described in this issue: #181 |
will add it as a keybind only on macos then, makes sense.
i feel like this is likely related to dpi. it should take dpi into account when applying the scroll multiplier to the actual scroll event. related to #24 and #203, will check that code again.
how many games do you have?
this in general isnt really fixable. python is just slow. to fix this it needs to be ported to a more performant language, which i was doing rewriting in C, but takes a long time and its on pause for now. i hope to get back to it eventually.
makes sense, though there are no opengl related changes. theres just these really:
i see. gonna merge those then. thanks! |
|
I made some PRs for the independent changes, you can look at those.
I have 52. I don't know if that's much. Your 11.1 release loads fine as well, the intel release though was horrible. But the changes on my fork do add noticeable speed, probably about 1s or more.
Yeah, it was really weird which is why I made changes for myself. If it's possible for you to add defaults per OS, or like check for macOS yourself I would encourage you to. I just disabled the custom smooth scroll and tweaked multiplier to get close to macOS native scrolling, since it's quite good on its own . People on macOS probably won't go around changing scroll for that reason.
I don't know why, but after the changes in my fork, the usage stays relatively normal. So if it's to your standards you can add those until you finish your rewrite.
I forgot what it was, QT I guess. It would be great if you could get the macOS native one to work somehow, but functinally these changes do work. |
so im guessing it was mostly an emulation issue. additional speed might be to smaller character set for noto sans if i had to guess. and no, 52 is actually very little. i ask because with more games it has to check more files on disk for images and executables, so it takes longer to open due to that. with 52 games it should be basically the same as with no games, so its basically just the time the app itself takes to load. theres people with 8000 games lol
what im thinking of doing for the scrolling is keeping 1.0 as default, but for example dividing that by the dpi at runtime, rather than changing the default value. anyway, i will do some tests.
thats probably mostly from removing
yes im also planning to remove the custom qt styles forthe tray menu on macos, so hopefully it will look native |


Closes #257
I checked the compiled build for arm64, and it works correctly.
Here's how Claude Code explained why these changes will be enough:
Details
Dependency analysis and fixes
Dependencies without ARM64 wheels on macOS:
All other dependencies (
zstd,bencode2,pillow-avif-plugin,lxml,cx-Freeze, etc.) already have native ARM64 or universal2 wheels.Changes made to
.github/workflows/build.yml:macos-15(Apple Silicon / ARM64) to the build matrixartifactfield to each matrix entry for unique artifact names:Windows,Linux,macOS,macOS-ARM64— replacing the previousrunner.oswhich produced the same namemacOSfor both macOS buildsWhy this works:
On the ARM64 runner (
macos-15), pip won't find compatible wheels forimgui==2.0.0(x86_64 only) and will automatically fall back to building from sdist. The sdist already contains pre-generated C files, and Xcode Command Line Tools (pre-installed on GitHub runners) will compile them into a native ARM64 binary.