MythTV on Windows
Contents
Summary
A Windows port of MythTV is in-the-works, using MinGW as the build platform, and MS Direct3D as the display layer. The frontend compiles, and most basic functionality works, but it crashes regularly. The patches are currently working their way into SVN, so check the -dev list, and Trac for the current state. Once the frontend is reliable, we can start to see about getting the changes necessary to get MythBackend to run.
Caveats
Cygwin was previously a limiting factor as it introduced a dependency on cygwin1.dll. We have moved to MinGW, which compiles all the necessary functions statically, rather than linked in through a separate dll.
Please start by reading this link: http://mythtv.org/pipermail/mythtv-dev/2007-December/058662.html
the Trac reference is here: http://svn.mythtv.org/trac/ticket/4270
Build Environment
First of all, Andrei used GCC 4.2.2 from here:
http://www.tdragon.net/recentgcc/
It's a drop-in replacement for MinGW gcc, and it comes with pthread library.
direct downloads: http://downloads.sourceforge.net/tdm-gcc/gcc-4.2.2-tdm-1-core-1.7z http://downloads.sourceforge.net/tdm-gcc/gcc-4.2.2-tdm-1-g++-1.7z (requires 7-zip to extract: see http://www.7-zip.org/download.html)
Buzz will be trying to build with the mingw technology preview of 4.2.1, but success is unknown.
Binary Dependancies / Libs
MySQL:
download "Windows Essentials (x86)" from here: http://dev.mysql.com/downloads/mysql/5.0.html#win32 almost direct download: http://dev.mysql.com/get/Downloads/MySQL-5.0/mysql-essential-5.0.45-win32.msi/from/pick#mirrors (and make sure to select headers and libs when installing)
Source Libs
For all the libs below, except when noted otherwise, use ./configure --prefix=/usr && make && make install to build and install them, there's nothing special that needs to be done.
TIP: For those unfamiliar with libraries, using the shortname (eg 'ogg') normally refers to a download/library called 'libogg.xxxxx.tar.gz', or similar.
freetype: http://savannah.nongnu.org/projects/freetype direct download: http://download.savannah.gnu.org/releases/freetype/ft2demos-2.3.5.tar.bz2
lame: download version 3.97 from sourceforge http://lame.sourceforge.net/index.php direct download (almost): http://sourceforge.net/project/showfiles.php?group_id=290&package_id=309&release_id=450142
mad: version 0.15.1b from sourceforge http://www.underbit.com/products/mad/ direct download (almost): http://sourceforge.net/project/showfiles.php?group_id=12349&package_id=86999&release_id=217880 taglib: version 1.4 from freshmeat: homepage: http://freshmeat.net/projects/taglib direct download: http://developer.kde.org/~wheeler/files/src/taglib-1.4.tar.gz
ogg version 1.1.3 and vorbis version 1.2.0 from xiph http://xiph.org/downloads/ direct downloads: http://downloads.xiph.org/releases/ogg/libogg-1.1.3.tar.gz http://downloads.xiph.org/releases/vorbis/libvorbis-1.2.0.tar.gz for vorbis, use "./configure --prefix=/usr --disable-shared" (or find how to resolve undefined references to libogg, this shouldn't be too hard).
flac 1.2.1 http://flac.sourceforge.net/ direct download (almost): http://sourceforge.net/project/showfiles.php?group_id=13478&package_id=12677&release_id=539981
Optional libraries: Gallery:
tiff (http://sourceforge.net/project/showfiles.php?group_id=23617&package_id=16351) exif
Music
libvisual SDL fftw (you might want to configure with "./configure --prefix=/usr --with-gcc-arch=k8")
QT
QT deserves its own section on this page, because it wasn't trivial to make QMake work, and because it had a couple of bugs, one of them critical, leading to deadlocks in MythFrontend.
First follow the instructions to download (don't build just yet) QT from this page: http://qtwin.sourceforge.net/qt3-win32/compile-mingw.php
Then, apply the qt patch from here: http://svn.mythtv.org/trac/ticket/4270 The patch fixes one critical bug, fixes one issue preventing it from working properly with bash, implements "install" in makefiles, and reduces number of compiler warnings during MythTV compilation. Unfortunately, this breaks QT build scripts, but it still allows to build the qt-mt3.dll properly.
Now build QT using the instructions from the download page.
During debugging, I found one more bug in QT: QSocketNotifier never generates "signals" for listening sockets, which effectively prevents anything that listens incoming connections (mythbackend and possibly UPNP code in mythfrontend too) from accepting them.
HOWTO - A WORK IN PROGRESS
1 - Install MinGW - download the "Automated MinGW Installer".
homepage: http://www.mingw.org/ When installing, be sure to install g++ in addition to the default gcc. Typlical install path is c:\MinGW, but it shouldn't matter. direct download (almost): http://sourceforge.net/project/showfiles.php?group_id=2435&package_id=240780&release_id=529741 more info: http://www.mingw.org/download.shtml
2 - Install "MSYS base system" current release "MSYS-1.0.10.exe"
download: http://sourceforge.net/project/showfiles.php?group_id=2435&package_id=24963 more info: http://www.mingw.org/ When instructed by msys (in a DOS window) enter the path where you installed MinGW.
3 - download and extract MSYS additional component/s: into your MSYS instalation :
bash - bash-3.1-MSYS-1.0.11-1.tar.bz2 (should end up with a bash.exe in c:/msys/1.0/bin/ once extracted properly) direct download: http://downloads.sourceforge.net/mingw/bash-3.1-MSYS-1.0.11-1.tar.bz2?modtime=1195140582&big_mirror=1
4 - install tortoiseSVN for GUI access to subversion.
http://tortoisesvn.tigris.org/ direct download: http://downloads.sourceforge.net/tortoisesvn/TortoiseSVN-1.4.5.10425-win32-svn-1.4.5.msi?download
5 - get the latest copy of the mythtv source code :
5a - make a folder c:\mythtv\ 5b - right-click on the empty folder and choose "SVN Checkout..." 5c - enter the string "http://svn.mythtv.org/svn/trunk/" (without the quotes) into the tortoiseSVN window, and click OK. 5c - wait for very large download to finish ( couple of hundred mb?)
6 - enter the msys environment by running c:\msys\1.0\msys.bat
Looks like unix doesn't it!. HINT: type 'mount' to see how msys lays out it's folders.
7 - Don't forget to export QT environment variables
export QTDIR=/--path to qt location--/qt-3.3.x-p8 export QMAKESPEC=$QTDIR/mkspecs/win32-g++
8 - try to compile mythv and if successful the plugins too!
cd mythtv ./configure --prefix=/usr --disable-dbox2 --disable-hdhomerun --disable-dvb --disable-ivtv --disable-iptv --disable-joystick-menu --disable-xvmc-vld --disable-x11 --disable-xvmc --enable-directx --enable-memalign-hack --cpu=k8 --compile-type=debug make make install cd ..
cd mythplugins ./configure --prefix=/usr --disable-mythgallery --disable-mythmusic --disable-mytharchive --disable-mythbrowser --disable-mythflix --disable-mythgame --disable-mythnews --disable-mythphone --disable-mythzoneminder --disable-mythweb --enable-aac --enable-libvisual --enable-fftw --compile-type=debug make make install cd ..