Qt for Windows
From MythTV Official Wiki
Requirements
- The version of Qt must match the version of Visual Studio used
- Qt must include OpenGL support
- Qt's bin directory must be added to the system path
- MySQL support must be present (may need to be manually built from Qt source)
Installing Qt
This guide used the Qt 5.1 Online Installer for Windows downloaded from:
It's important to select Source Components in order to build the MySQL driver. Make sure "msvc2010 32-bit OpenGL" and "Source Components" are checked.
Once installed, add the Qt bin directory to the system path.
MySQL Support
MythTV requires Qt's MySQL driver, but it is not provided pre-built. You will need to compile it from the source.
- Open a Visual Studio command prompt. In the Start menu, in the Visual Studio folder, select Visual Studio Command Prompt
- cd to c:\Qt\5.1.1\Src\qtbase\src\plugins\sqldrivers\mysql
- set the mysql environment variable to the mysql install directory in Program Files (x86) containing the bin directory. It's important to use the short file version of the directory names. For example:
- set mysql=C:\PROGRA~2\MySQL\MYSQLS~1.6
- If you're not sure what the short form is for your directory, type dir /x, which will list long and short names together
- type qmake "INCLUDEPATH+=%mysql%\include" "LIBS+=%mysql%\lib\libmysql.lib" -o Makefile mysql.pro
- type nmake
- Copy qsqlmysql.dll and qsqlmysqld.dll from C:\Qt\Qt5.1.1\Sources\qtbase\plugins\sqldrivers to C:\Qt\5.1.1\msvc2010_opengl\plugins\sqldrivers
- Copy libmysql.dll from %mysql%\lib to C:\Windows. You will need administrator's right to do this.