Update macOS release build to CMake#1606
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the macOS release build pipeline to use CMake with Homebrew-provided Qt/MuPDF dependencies (instead of qmake + vendored submodules), and adjusts runtime resource paths so the macOS app bundle can locate shaders/config/tutorial files under Contents/Resources.
Changes:
- Switch macOS build packaging to a CMake configure/build/install flow and produce a signed DMG artifact.
- Update
configure_paths()on macOS to resolve app-bundled resources from../Resourcesand adjust default resource file locations accordingly. - Modernize GitHub release workflows to publish artifacts via
softprops/action-gh-releaseand update macOS runners/dependencies.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| pdf_viewer/main.cpp | Update macOS resource/config path resolution to match a Contents/Resources bundle layout. |
| build_mac.sh | Replace qmake/submodule build with CMake + Homebrew dependency discovery, deployment normalization, signing, and DMG packaging. |
| README.md | Update macOS build instructions to reflect Homebrew-based CMake build flow. |
| CMakeLists.txt | Make CMake the macOS bundle build source of truth: Qt6-only deps, Homebrew MuPDF discovery, bundle resource copying, deploy script integration. |
| .github/workflows/preview_release.yml | Switch release publication to softprops/action-gh-release, update runner versions, and install Homebrew deps for macOS builds. |
| .github/workflows/build_and_release.yml | Same as preview workflow for non-prerelease publishing. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Remove unused Qt6Multimedia REQUIRED dependency from CMakeLists.txt - Set CMAKE_OSX_DEPLOYMENT_TARGET to 10.15 to match Info.plist LSMinimumSystemVersion - Remove qtmultimedia from build_mac.sh required formulae check loop - Move macOS ~/.config/sioyek config paths to be pushed last (after AppDataLocation paths) so they become the preferred write location via user_config_paths.back() Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Qt6TextToSpeech depends on Qt6Multimedia internally. Removing qtmultimedia from the required-check loop also removed it from CMAKE_PREFIX_PATH, so CMake could not find Qt6Multimedia when resolving Qt6TextToSpeech. Move it to the optional loop — it is always present as a transitive dep of qtspeech so it will always be picked up, without making it a hard install requirement. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Individual find_package(Qt6TextToSpeech) calls bypass Qt6Config.cmake, so Qt's inter-component path setup never runs and Qt6TextToSpeechConfig.cmake cannot resolve its Qt6Multimedia dependency at configure time. Switch to the aggregate find_package(Qt6 ... COMPONENTS ...) form so Qt6Config.cmake is loaded first and handles all component discovery. Include Multimedia explicitly as a component since TextToSpeech requires it. Also move qtmultimedia back to the required brew prefix loop in build_mac.sh to ensure its cmake config dir is always in CMAKE_PREFIX_PATH. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Qt6Config.cmake hardcodes NO_DEFAULT_PATH when finding Qt components, so CMAKE_PREFIX_PATH is completely ignored. It only searches its own cmake dir (from qtbase) and QT_ADDITIONAL_PACKAGES_PREFIX_PATH. Pass the same Homebrew prefix list as QT_ADDITIONAL_PACKAGES_PREFIX_PATH so Qt's config machinery can locate qtdeclarative, qtsvg, qtmultimedia, qtspeech, etc. Build verified locally on arm64. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Sorry guys, this is my first time trying out ai to write this pr. @ahrm can you please review this pr since this would be a great way to get the nightly releases for the development branch on macos as well. We are able to speed up the code compilation a lot since we would be using library distributions from homebrew instead of compiling them from scratch ourselves in the git submodules. |
this pr Replaces macOS qmake/submodule build flow with CMake using Homebrew Qt/MuPDF dependencies instead of thirdparty submodules.
i've updated the release workflows to build macOS on current runners and publish artifacts