Building MythFrontend 30.x

For discussion of topics specific to MythTV on OSX
Post Reply
kalak_lanar
Newcomer
Posts: 1
Joined: Thu May 16, 2019 7:23 pm
United States of America

Building MythFrontend 30.x

Post by kalak_lanar » Thu May 16, 2019 7:32 pm

I've recently upgraded my backend to Fedora 30, so my MythTV backend is now running MythTV 30 as well from rpmfusion. My main frontend was on OSX, but it looks like there is no way to get MythTV 30 frontend running on macOS. I've used mac ports to install and compile it with Sierra, 10.12.6:

Code: Select all

port install pkgconfig qt5-qtwebkit qt5-qtscript qt5 yasm libsamplerate taglib libbluray exiv2 lame x264 x265 openssl
ln -s /opt/local/include/samplerate.h ~/mythtv-fixes-30/mythtv/libs/libmyth/audio/samplerate.h
ln -s /opt/local/include/libbluray/*.h  ~/mythtv-fixes-30/mythtv/libs/libmythmetadata/libbluray/
ln -s /opt/local/include/exiv2/*.h ~/mythtv-fixes-30/mythtv/libs/libmythmetadata/exiv2/
ln -s /opt/local/include/exiv2/*.hpp ~/mythtv-fixes-30/mythtv/libs/libmythmetadata/exiv2/
ln -s /opt/local/include/openssl/*.h ~/mythtv-fixes-30/mythtv/libs/libmyth/openssl/

./configure --enable-mac-bundle --qmake=/opt/local/libexec/qt5/bin/qmake --disable-backend
make
make install
I finally have a binary that runs, but won't connect to the X11 server with the message "FATAL: Unable to load the QT mysql driver, is it installed?"

I'd really like to get it working with a proper OSX application and with macOS mojave, 10.14.4, but I wanted to start with something that seemed easiest to wore, before working up to the more difficult install.

My questions: Is anyone working on macOS support in MythTV 30? Am I missing something on getting this to work? There's nothing in the Wiki for version 30, and nothing I can tell from the code (but I'm not a coder, so I may easily miss something).

gocubsgo
Newcomer
Posts: 4
Joined: Fri Nov 29, 2019 7:05 pm
United States of America

Re: Building MythFrontend 30.x

Post by gocubsgo » Fri Nov 29, 2019 8:04 pm

I have a working build of MythFrontend 30. By working, I mean it does the job with the normal quirks we've come accustomed to with MythFrontend on the Mac these past several years. I've run it on 10.11 El Capitan and 10.14 Mojave. Some new quirks I ran into coming from MythFrontend 29:
  • On a Mac where I run it windowed, the deinterlacer was useless until I switched from 'one field' to 'bob.
  • On a Mac where I run fullscreen (not in a window), I can no longer hide MythFrontend. The menu item is disabled. Instead it runs in its own Space, which is okay, but not as convenient for my use. Also on this Mac, 720p content only filled ¼ of the screen. This is on a Retina screen, which I suspect may be confusing something. I created a custom playback profile and finally landed on the 'opengl-rgba' renderer that managed to display 720 and 1080 content fullscreen.
I have a zip file containing mythfrontend.app, built from 'fixes/30' a few weeks ago. I'd like to share it with the community. What's the best way to do that? Do I need to request access to the sourceforge project?

If anyone would like to try their own build, the steps I took are below. I used kalak_lanar's steps as a starting point. My build system was a fresh install of 10.11 El Capitan in a VM with MacPorts, Xcode, and the Command Line Tools installed.

Getting the source
I can't post links, so fill in the normal github url.

Code: Select all

git clone github/MythTV/mythtv.git
cd mythtv
git clone github/MythTV/packaging.git
Getting dependencies from MacPorts
I had to get an older version of QT5 because my build system is 10.11.

Code: Select all

sudo port install qt511 qt511-qtwebkit qt511-qtscript qt511-mysql-plugin
sudo port install yasm libsamplerate taglib libbluray exiv2 lame x264 x265 openssl
Providing some missing headers

Code: Select all

cd mythtv
ln -s /opt/local/include/samplerate.h libs/libmyth/audio/samplerate.h
mkdir -p libs/libmythmetadata/libbluray/
ln -s /opt/local/include/libbluray/*.h libs/libmythmetadata/libbluray/
mkdir -p libs/libmythmetadata/exiv2/
ln -s /opt/local/include/exiv2/*.h* libs/libmythmetadata/exiv2/
mkdir -p libs/libmyth/openssl/
ln -s /opt/local/include/openssl/*.h libs/libmyth/openssl/
Configure and build

Code: Select all

./configure --enable-mac-bundle --qmake=/opt/local/libexec/qt5/bin/qmake --disable-backend --runprefix=../Resources --disable-lirc --disable-distcc
make
Packaging
At this point, you'll have a ~6MB bundle located at programs/mythfrontend/mythfrontend.app that should run just fine on the build system. However, to use it elsewhere, we need to copy in many dependencies. There are some tools that can do most of this for us.
The makebundle command should end with '.sh', but again, I can't post 'links'.

Code: Select all

/opt/local/libexec/qt5/bin/macdeployqt mythfrontend.app
../../../packaging/OSX/build/makebundle mythfrontend.app
cp mythfrontend.icns mythfrontend.app/Contents/Resources/application.icns
The bundle should be ~260MB now. My last step was to modify/update mythfrontend.app/Contents/Info.plist. I used the one in my MythFrontend 29 bunlde as a reference.

User avatar
ylee
Newcomer
Posts: 3
Joined: Sat Feb 08, 2014 5:20 pm
United States of America

Re: Building MythFrontend 30.x

Post by ylee » Sun Dec 15, 2019 7:59 pm

Have you made the fixes/30 bundle available for download? I am stuck in compiling, and would love to download a prebuilt one instead.

gocubsgo
Newcomer
Posts: 4
Joined: Fri Nov 29, 2019 7:05 pm
United States of America

Re: Building MythFrontend 30.x

Post by gocubsgo » Wed Dec 18, 2019 3:01 am

Last edited by Steve Goodey on Wed Dec 18, 2019 7:04 am, edited 1 time in total.
Reason: Edited url.

User avatar
ylee
Newcomer
Posts: 3
Joined: Sat Feb 08, 2014 5:20 pm
United States of America

Re: Building MythFrontend 30.x

Post by ylee » Mon Jan 20, 2020 5:06 am

Thank you!

scram69
Newcomer
Posts: 2
Joined: Mon Feb 25, 2019 4:56 am
Guinea

Re: Building MythFrontend 30.x

Post by scram69 » Thu Jan 23, 2020 5:58 am

Two questions-
-Is there a reason the above method would not work to build fixes/29?
-I see most people are building on OS 10.11. Is there a reason not to build on a later OS? OS 10.15?

gocubsgo
Newcomer
Posts: 4
Joined: Fri Nov 29, 2019 7:05 pm
United States of America

Re: Building MythFrontend 30.x

Post by gocubsgo » Sun Jan 26, 2020 9:20 pm

I don't know anything about the code differences between 29 and 30, but I think the above process should get you at least most of the way there.

I built with 10.11 because at the time, that was the latest my main Mac could run. It actually caused me a little trouble with MacPorts. I had to force it to grab an older version of QT5. So in that respect, it may be easier to use a more recent version of macOS. Incidentally, I have since upgraded to 10.15 Catalina and can confirm that the 10.11 build posted above runs just fine.

User avatar
pvr4me
Senior
Posts: 663
Joined: Fri Feb 07, 2014 7:25 pm
Location: near Toronto, Canada
Contact:
Canada

Re: Building MythFrontend 30.x

Post by pvr4me » Mon Jan 27, 2020 1:01 pm

gocubsgo wrote:
Sun Jan 26, 2020 9:20 pm
...I built with 10.11 because at the time, that was the latest my main Mac could run. It actually caused me a little trouble with MacPorts. I had to force it to grab an older version of QT5. ...
If you happen to know, which Qt version caused issues? What version worked OK? What were the symptoms of the problem version?

Craig
The MacPorts guy.

gocubsgo
Newcomer
Posts: 4
Joined: Fri Nov 29, 2019 7:05 pm
United States of America

Re: Building MythFrontend 30.x

Post by gocubsgo » Mon Jan 27, 2020 11:27 pm

pvr4me wrote:
Mon Jan 27, 2020 1:01 pm
If you happen to know, which Qt version caused issues? What version worked OK? What were the symptoms of the problem version?
It failed towards the end after sudo port install qt5 with:

Code: Select all

--->  Attempting to fetch qt5-qtbase-5.12.5_5+openssl.darwin_15.x86_64.tbz2 from http://aus.us.packages.macports.org/macports/packages/qt5-qtbase
--->  Fetching distfiles for qt5-qtbase
Error: qt5-qtbase requires macOS 10.12 or later
Error: Failed to fetch qt5-qtbase: incompatible OS version
port install qt511 worked just fine:

Code: Select all

--->  Attempting to fetch qt511-5.11.3_0.darwin_15.noarch.tbz2.rmd160 from https://packages.macports.org/qt511
--->  Installing qt511 @5.11.3_0
--->  Activating qt511 @5.11.3_0
--->  Cleaning qt511

User avatar
pvr4me
Senior
Posts: 663
Joined: Fri Feb 07, 2014 7:25 pm
Location: near Toronto, Canada
Contact:
Canada

Re: Building MythFrontend 30.x

Post by pvr4me » Tue Jan 28, 2020 12:24 am

Ahh, OK. I know that message has the "Error: " prefix on the line but that is actually port install working as it should. The Qt software is 'special' because there are such a huge number of modules and the Qt project only targets very specific versions of the Mac operating system for particular releases of Qt5. I don't know how the guy that maintains that port manages to retain his sanity!

BTW, most people only install the specific Qt5 modules that they needs--not all 50+.

Craig
The MacPorts guy.

Post Reply