Difference between revisions of "Building MythFrontend on Mac OS X"

From MythTV Official Wiki
Jump to: navigation, search
(Update to current state)
 
(13 intermediate revisions by the same user not shown)
Line 1: Line 1:
These instructions will walk you through setting up your Mac to compile and generate a Mythfrontend.app and .dmg file for MacOS.
+
These instructions will walk you through setting up your Mac to compile and generate a Mythfrontend.app and .dmg file for macOS.
  
  
 
= Building Mythfrontend with Macports and Ansible =
 
= Building Mythfrontend with Macports and Ansible =
{{Note box|This page is meant to help those who wish to build Mythfrontend.app v31 and later for MacOS.  Most users should visit [[MythTV on Mac OS X]] instead.  The script has been tested on:
+
{{Note box|Most users should visit [[MythTV on Mac OS X]] to download prebuilt binaries.
* v31 on High Sierra / Xcode 10.0
 
* v31 on Catalina / Xcode 11.3 - 11.5
 
* master (v32) on High Sierra / Xcode 10.0
 
* master (v32) on Catalina / Xcode 11.5}}
 
  
== Install Xcode, Xcode Command Line Tools, and MacPorts ==
+
== Install Xcode, Xcode Command Line Tools ==
 +
Xcode and Xcode Command Line Tools can now be installed via the Apple App Store.  Please install them before moving on to installing the package manager of your choice (MacPorts or Homebrew).
  
=== About MacPorts ===
+
== Install a Package Manager ==
[http://www.macports.org 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 workAnd, if it doesn't, there is an active support system working to resolve any problems.
+
The compile script now works with either MacPorts or HomebrewPlease install your preferred package manager.
  
 +
=== Option 1: Install MacPorts ===
 +
[https://www.macports.org MacPorts]
  
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.
+
To install, follow the MacPorts' directions for installing MacPorts for your respective version of MacOS.
 
* [https://www.macports.org/install.php MacPorts installation instructions]
 
* [https://www.macports.org/install.php MacPorts installation instructions]
  
 
{{Note box| Remember to run "sudo port -v selfupdate" after installing MacPorts to update the MacPorts repositories}}
 
{{Note box| Remember to run "sudo port -v selfupdate" after installing MacPorts to update the MacPorts repositories}}
  
== Run the compileMythFrontendAnsible.zsh Script ==
+
=== Option 2: Install Homebrew ===
 +
[https://brew.sh/ Homebrew]
  
Save the following script to your system as "compileMythFrontendAnsible.zsh" and make executable.
+
== Download and Run the Compile Script ==
 +
The compile script can be found in [https://github.com/MythTV/packaging/tree/master/macOS the official MythTV packaging repository]
  
The script is now available in mythtv's packaging repo and can now be downloaded from here: [https://github.com/MythTV/packaging/tree/master/OSX/build/macports_ansible compile script download]
+
Download "compileMythFrontendAnsible_cmake.zsh" to your system and make executable.
  
{{Note box| 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:
 
# Sets up the build directory structure (tries to mirror the mythtv dev team's structure)
 
# Installs ansible-playbook via MacPorts
 
# Clones the MythTV ansible git repository
 
# Installs MythTV compile requirements and their dependencies via ansible/macports
 
# Clones the MythTV git repository, applying any user specified patches to mythtv or plugins
 
# Clones the MythTV Packaging git repository, applying any user specified patches
 
# Configures, builds, and installs MythTV to a temp directory
 
# Optionally Configures, builds, and installs MythPlugins to a temp directory
 
# Deploys QT to the compiled mythfrontend.app
 
# Copies the required dylibs, support data, and fonts into the app linking
 
# Packages mythfrontend.app into a .dmg file
 
 
== Optionally Upload to Sourceforge ==
 
After building and testing you copy of mythfronend.app, please consider uploading it to here:
 
* [https://sourceforge.net/projects/mythtvformacosx MythTVForMacOSX on Sourceforge]
 
  
 +
== Run the Compile Script ==
 +
Run the script with the following command:
 
{{Code  box| bash or zsh|
 
{{Code  box| bash or zsh|
 
<pre>
 
<pre>
rsync -avP -e ssh $APP_DIR/$VOL_NAME.dmg YOUR_USER_NAME_HERE,mythtvformacosx@frs.sourceforge.net:/home/frs/project/m/my/mythtvformacosx/
+
./compileMythFrontendAnsible_cmake.zsh
 
</pre>
 
</pre>
 
}}
 
}}
  
 +
{{Note box| In order to install packages via ansible on macports, 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.}}
  
{{Note box| Please remember to thoroughly test your application before uploading}}
+
The script automatically performs the following steps:
 +
# Sets up the build directory structure (tries to mirror the mythtv dev team's structure)
 +
# Installs ansible-playbook via MacPorts o Homebrew
 +
# Clones the MythTV ansible git repository
 +
# Installs MythTV compile requirements and their dependencies via ansible and macports or homebrew)
 +
# Clones the MythTV git repository, applying any user specified patches to mythtv or plugins
 +
# Configures, builds, and installs MythTV and optionally MythPlugins
 +
# Optionally generates and app bundle and distribution package for Mythfrontend.app
  
 
= Pre-built Application =
 
= Pre-built Application =
 
For those who would prefer to just download a pre-built application, these files can be found on the MythTVForMacOSX site.  
 
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.
+
These files are updated sporadically by the github runners and the MythTV mac user community.
 
* [https://sourceforge.net/projects/mythtvformacosx/files/ Download from Sourceforge]
 
* [https://sourceforge.net/projects/mythtvformacosx/files/ Download from Sourceforge]
 
= 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 [http://lists.mythtv.org/mailman/listinfo/mythtv-users mythtv users mailing list] or[https://forum.mythtv.org/ forums].
 
  
 
= Problems? =
 
= Problems? =
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 compiling mythtv, please post to the mythtv-users mailing list or [https://forum.mythtv.org/ mythtv forums].
 
 
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 == https://lists.macosforge.org/mailman/listinfo/macports-users
+
For MacPorts related issues, please post to the [https://lists.macosforge.org/mailman/listinfo/macports-users macports-users mailing list].  If necessary, please file a bug with the [http://guide.macports.org/#project.tickets MacPorts bug tracker].
  
MacPorts ticket system == http://guide.macports.org/#project.tickets
+
For Homebrew related issues, please consult the [https://docs.brew.sh/ Homebrew docs] and [https://github.com/orgs/Homebrew/discussions Homebrew discussions forum].
  
 
[[Category:MacOS]]
 
[[Category:MacOS]]
 
[[Category:MacPorts]]
 
[[Category:MacPorts]]
 +
[[Category:Homebrew]]
 
[[Category:Ansible]]
 
[[Category:Ansible]]
 
[[Category:Distribution_Specific_Install_Guides]]
 
[[Category:Distribution_Specific_Install_Guides]]

Latest revision as of 00:53, 10 February 2025

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


Building Mythfrontend with Macports and Ansible

{{Note box|Most users should visit MythTV on Mac OS X to download prebuilt binaries.

Install Xcode, Xcode Command Line Tools

Xcode and Xcode Command Line Tools can now be installed via the Apple App Store. Please install them before moving on to installing the package manager of your choice (MacPorts or Homebrew).

Install a Package Manager

The compile script now works with either MacPorts or Homebrew. Please install your preferred package manager.

Option 1: Install MacPorts

MacPorts

To install, follow the MacPorts' directions for installing MacPorts for your respective version of MacOS.


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

Option 2: Install Homebrew

Homebrew

Download and Run the Compile Script

The compile script can be found in the official MythTV packaging repository

Download "compileMythFrontendAnsible_cmake.zsh" to your system and make executable.


Run the Compile Script

Run the script with the following command:

Script.png bash or zsh

./compileMythFrontendAnsible_cmake.zsh


Important.png Note: In order to install packages via ansible on macports, 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 o Homebrew
  3. Clones the MythTV ansible git repository
  4. Installs MythTV compile requirements and their dependencies via ansible and macports or homebrew)
  5. Clones the MythTV git repository, applying any user specified patches to mythtv or plugins
  6. Configures, builds, and installs MythTV and optionally MythPlugins
  7. Optionally generates and app bundle and distribution package for Mythfrontend.app

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 github runners and the MythTV mac user community.

Problems?

If you have any problems compiling mythtv, please post to the mythtv-users mailing list or mythtv forums.

For MacPorts related issues, please post to the macports-users mailing list. If necessary, please file a bug with the MacPorts bug tracker.

For Homebrew related issues, please consult the Homebrew docs and Homebrew discussions forum.