[mythtv] Cross compiling MythTV for Windows
Lawrence Rust
lvr at softsystem.co.uk
Sun Nov 14 12:31:24 UTC 2010
First posting here, so Hi to everybody.
I've been using MythTV for a while now on a home network with several
Linux boxes. But recently I was asked if I couldn't get a frontend up
on Windows box too. No amount of evangelical zeal could dissuade them
to change OS so I reluctantly agreed to research it.
I came up with a pre-packed installation from
http://members.iinet.net.au/~davco but that didn't allow me to add my
own patches and extensions, which are the main reason for building from
source.
Then there's the excellent wiki page at www.mythtv.org/wiki/Windows_Port
but that meant building it all under Windows :-(
But I couldn't find anything on cross compiling from Linux. So in
intrepid mode I decided to give it a go using the wiki page as a guide.
Long story short - I finally arrived at a reliable build script and a
Windows box that displays live TV with sound. What's more, mythfrontend
now plays live TV with sound using Wine (so there's no excuse for the
Windows version being untested any more).
If you're interested in how to, you can read about it here:
http://www.softsystem.co.uk/download/mythtv/HOWTO-xcompile
You can download the build script and patches from here:
http://www.softsystem.co.uk/download/mythtv/win32-patches.tar.bz2
The 2nd reason for posting here was to outline the patches that I made
to mythtv and mythplugins to get them to cross compile and run. These
patches (for the recent 0.24 release) can be viewed here:
1. http://www.softsystem.co.uk/download/mythtv/mythtv-0.24.diff
2. http://www.softsystem.co.uk/download/mythtv/mythplugins-0.24.diff
1. MythTV uses OpenGL or Direct3D to display video. In their current
form neither produce video output on any of my Windows boxes (Win2k,
WinXP with 5+ year old NVidia graphics) nor on Wine or VirtualBox.
However, the first patch to libmythui/mythrender_d3d9.cpp fixes Direct3D
video on all my Windows boxes and with Wine.
2. The mythplugins configure script needs some fixes to cross compile.
This is mainly to remove $sysroot prepended to $prefix paths. The logic
is that $sysroot refers to the target file system root but $prefix is an
absolute path to where the installation will be made, not necessarily
relative to $sysroot.
3. Mythmusic needs a couple of minor fixes to build. The first is to
remove the configure dependency on libcdaudio - it builds without it.
The second is to add some ifdef's for MINGW which doesn't support CD
ripping.
If there's no objections I will submit the patches to Trac for
consideration.
Lastly I'd like to outline some unresolved problems that I found:
1. OpenGL video and GUI rendering is broken.
2. GUI rendering with Direct3D is broken on all my Windows boxes but
works on Wine.
3. CPU usage on a 1 GHz P3 was 100% while playing live TV which is very
high compared to other software (Hauppauge) on the same machine.
3. I can create a playlist for mythmusic but it crashes just after the
UI is drawn when it starts to play.
4. mythgallery doesn't display any images.
5. UPnP seems broken on WinXP, but I suspect that this is an intended
security feature since the log reports "QMulticastSocket: setsockopt -
IP_ADD_MEMBERSHIP Error"
-- Lawrence Rust
More information about the mythtv-dev
mailing list