Skip to content

Fix macOS packaging with Homebrew Qt on Apple Silicon#213

Open
alesaccoia wants to merge 1 commit intogottcode:mainfrom
alesaccoia:main
Open

Fix macOS packaging with Homebrew Qt on Apple Silicon#213
alesaccoia wants to merge 1 commit intogottcode:mainfrom
alesaccoia:main

Conversation

@alesaccoia
Copy link
Copy Markdown

This fixes the macOS packaging flow for Apple Silicon/Homebrew Qt installs.

What changed:

  • detect Qt tools and install paths with qtpaths instead of relying on QTDIR
  • copy Qt translations from the discovered Qt installation
  • make mac_deploy.sh fail fast if required Qt tools or plugins are missing
  • deploy only the macOS plugins FocusWriter actually needs (libqcocoa, libqmacstyle, libqjpeg)
  • update the macOS install instructions to mention the Homebrew Qt workflow

Why this is needed:

  • the app itself builds on Apple Silicon once Qt 6 is installed
  • the old deploy script assumes QTDIR/translations exists and lets macdeployqt sweep optional Homebrew Qt plugins
  • on my Apple Silicon/Homebrew setup that produced a broken DMG, with unresolved QtPdf, QtSvg, and QtVirtualKeyboard plugin dependencies during deployment

Verification:

  • brew install qt
  • cmake -B build -S . -DCMAKE_BUILD_TYPE=Release
  • cmake --build build -j8
  • run ../mac_deploy.sh from the build directory
  • verified the generated DMG mounts correctly
  • verified FocusWriter.app inside the DMG passes codesign --verify --deep --strict

Tested on:

  • Apple Silicon Mac
  • Homebrew Qt 6

Please find the resulting .dmg here for testing

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.

1 participant