MythTV on Windows
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
First of all, I 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.
MySQL: download "Windows Essentials (x86)" from here: http://dev.mysql.com/downloads/mysql/5.0.html#win32 and make sure to select headers and libs when installing.
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
freetype: download from this url: http://download.savannah.gnu.org/releases/freetype/ft2demos-2.3.5.tar.bz2
lame: download version 3.97 from sourceforge http://sourceforge.net/project/showfiles.php?group_id=290&package_id=309
mad: version 0.15.1b from sourceforge http://sourceforge.net/project/showfiles.php?group_id=12349
taglib: version 1.4 from freshmeat: http://freshmeat.net/projects/taglib
ogg version 1.1.3 and vorbis version 1.2.0 from xiph http://xiph.org/downloads/ 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://sourceforge.net/project/showfiles.php?group_id=13478&package_id=12677
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". When installing, be sure to install g++ in addition to the default gcc. download: http://sourceforge.net/project/showfiles.php?group_id=2435&package_id=240780 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)
4 - install tortoiseSVN for GUI access to subversion. http://tortoisesvn.tigris.org/
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 ..