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 »

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: 7
Joined: Fri Nov 29, 2019 7:05 pm
United States of America

Re: Building MythFrontend 30.x

Post by gocubsgo »

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 »

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: 7
Joined: Fri Nov 29, 2019 7:05 pm
United States of America

Re: Building MythFrontend 30.x

Post by gocubsgo »

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 »

Thank you!
scram69
Newcomer
Posts: 5
Joined: Mon Feb 25, 2019 4:56 am
Guinea

Re: Building MythFrontend 30.x

Post by scram69 »

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: 7
Joined: Fri Nov 29, 2019 7:05 pm
United States of America

Re: Building MythFrontend 30.x

Post by gocubsgo »

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: 763
Joined: Fri Feb 07, 2014 7:25 pm
Location: near Toronto, Canada
Contact:
Canada

Re: Building MythFrontend 30.x

Post by pvr4me »

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
Formerly the MacPorts guy.
gocubsgo
Newcomer
Posts: 7
Joined: Fri Nov 29, 2019 7:05 pm
United States of America

Re: Building MythFrontend 30.x

Post by gocubsgo »

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: 763
Joined: Fri Feb 07, 2014 7:25 pm
Location: near Toronto, Canada
Contact:
Canada

Re: Building MythFrontend 30.x

Post by pvr4me »

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
Formerly the MacPorts guy.
scram69
Newcomer
Posts: 5
Joined: Mon Feb 25, 2019 4:56 am
Guinea

Re: Building MythFrontend 30.x

Post by scram69 »

OK, so I attempted to build fixes/29 on OS X 10.15 using Xcode 11.
First I had to go find an old version of Quicktime.Framework:https://github.com/phracker/MacOSX-SDKs/releases
as Apple has dropped it since 10.12.
Then I had to fix the bug in libmythtv/tv_play.cpp: https://trac.macports.org/ticket/58722
Following this, I was able to get something to build. However, it wouldn't launch due to missing dylibs. I went ahead and did the macdeployqt and makebundle scripts, but still I was stuck at:

Code: Select all

dyld: Library not loaded: @executable_path/../Frameworks/mythswscale.framework/mythswscale
Interestingly, in troubleshooting, I had created a number of softlinks in /usr/local/lib to the stuff in mythtv-fixes-29/mythtv/external/FFmpeg/
Remarkably, this appears to have fixed the stuttering issue on OS X 10.15 when running my ancient copy of the 0.29-fixes front end from WarpMe that used to be linked on the myth wiki https://www.mythtv.org/wiki/MythTV_on_Mac_OS_X
That link is now broken :(
Codybear
Newcomer
Posts: 12
Joined: Thu Dec 12, 2019 12:50 pm
United States of America

Re: Building MythFrontend 30.x

Post by Codybear »

I'm new to MythTV and need help. Got a dedicated backend 30.0 running and all is good. But I have an OS X 10.13 that I would like to install the frontend and know even less about OS X than MythTV. I've downloaded the FE from the above dropbox link and that's as far as I've gotten. Unfortunately the wiki appears to assume a BE install which is going to include way more things I need to do than just the FE.

Any instructions or pointing me in the right direction in setting up the FE would be greatly appreciated.
Codybear
Newcomer
Posts: 12
Joined: Thu Dec 12, 2019 12:50 pm
United States of America

Re: Building MythFrontend 30.x

Post by Codybear »

Sorry, never mind. Loaded it into the applications directory and it ran just as. Thought maybe I was going to have to install QT5, etc. and have to set environment variables. Ok, now I can watch my shows from the bedroom on the mac mini which was not being used.

Now all I have to do is figure out how to get an IR remote to work with it, but I'm good to go otherwise.
Post Reply