Building MythFrontend on Mac OS X

From MythTV Official Wiki
Jump to: navigation, search

These instructions will walk you through setting up your Mac to compile and generate a and .dmg file for macOS.

Building Mythfrontend with Macports and Ansible

Important.png Note: This page is meant to help those who wish to build v31 and later for MacOS. Most users should visit MythTV on Mac OS X to download prebuilt binaries instead. The script has been tested on:

  • v31,v32 on High Sierra / intel
  • v31,v32,master/v33 on Catalina / intel
  • v31,v32,master/v33 on Big Sur / intel and arm64
  • v31,v32,master/v33 on Monterey / intel and arm64
  • v32,master/v33 on Ventura / intel and arm64

Install Xcode, Xcode Command Line Tools, and MacPorts

About MacPorts

MacPorts is a stable and mature system for bringing open-source software to the Mac platform. Changes are tested and reviewed before being committed to MacPorts. MacPorts operates several build slaves which automatically build the default variant of each port. All this means that if you decide to try building with MacPorts, there is a strong likelihood that it will just work. And, if it doesn't, there is an active support system working to resolve any problems.

Follow MacPorts' directions for installing MacPorts for your respective version of MacOS. These instructions will walk you through installing Xcode, the Xcode Command Line Tools, and MacPorts.

Important.png Note: Remember to run "sudo port -v selfupdate" after installing MacPorts to update the MacPorts repositories

Run the compileMythFrontendAnsible.zsh Script

Save the following script to your system as "compileMythFrontendAnsible.zsh" and make executable.

The script is now available in mythtv's packaging repo and can now be downloaded from here: compile script download

Important.png Note: In order to install packages via macports and ansible, this script must be run by a user with sudo privileges. When prompted for either a "Password;" or "BECOME password:" you'll need to enter your sudo password.

The script automatically performs the following steps:

  1. Sets up the build directory structure (tries to mirror the mythtv dev team's structure)
  2. Installs ansible-playbook via MacPorts
  3. Clones the MythTV ansible git repository
  4. Installs MythTV compile requirements and their dependencies via ansible/macports
  5. Clones the MythTV git repository, applying any user specified patches to mythtv or plugins
  6. Clones the MythTV Packaging git repository, applying any user specified patches
  7. Configures, builds, and installs MythTV to a temp directory
  8. Optionally Configures, builds, and installs MythPlugins to a temp directory
  9. Deploys QT to the compiled
  10. Copies the required dylibs, support data, and fonts into the app linking
  11. Packages into a .dmg file

Optionally Upload to Sourceforge

After building and testing you copy of, please consider uploading it to here:

Script.png bash or zsh

rsync -avP -e ssh $APP_DIR/$VOL_NAME.dmg YOUR_USER_NAME_HERE,

Important.png Note: Please remember to thoroughly test your application before uploading

Pre-built Application

For those who would prefer to just download a pre-built application, these files can be found on the MythTVForMacOSX site. These files are updated sporadically by the mythtv mac using community.

Why MacPorts?

Currently, for MythTV builds, MacPorts has all of the necessary dependencies for compiling MythTV in it's repository. For this reason alone, it significantly simplifies getting all of the dependencies installed and working without the need to maintain countless download links and specific to macOS patches.

In the past I tried to build MythTV using both manual downloads and Homebrew. The manual install process was cumbersome and filled with too many macOS related patches that it was nearly impossible to keep under control.

This lead me to use a macOS package manager. First I tried Homebew. Unfortunately, Homebrew's default QT install was missing Webkit (requiring a customer QT compile and install) and had mixed compatibility with some of the python mysql pieces.

After much sunk time spent trying to get MythTV to compile on Homebrew, I switched over to MacPorts and got the dependencies installed in very short order. Seriously - they just worked.

If anyone is interested in trying the Homebrew route please do so. If you are successful - please make suggestions on how to update the compile script and ansible. The best way to do this is to use the mythtv users mailing list or forums.


If you have any problems installing packages via ansible, please post to the mythtv-users mailing list or mythtv forums. If necessary, please file a bug with the mythtv Trac.

If you have any problems building MythTV via MacPorts, please post to the macports-users mailing list. If necessary, please file a bug with the MacPorts bug tracker.

MacPorts-users mailing list ==

MacPorts ticket system ==