[mythtv] [RFC v2] New Win32 build script

Lawrence Rust lvr at softsystem.co.uk
Sat Dec 11 17:49:43 UTC 2010

After a number of comments and suggestions I have revised the Windows
cross compiling build script.  Thanks to everyone who contributed.  The
new script can be viewed here:

An archive of the script and its associated (mandatory) patches is here:


- When downloading library archives they are first looked for on
http://mythtv-for-windows.googlecode.com/files and if not found then the
hard-coded URL in the script is used.  The script URLs can be overridden
by shell variables.
- The presence of the patches directory is checked for.
- The mingw cross compiler prefix is determined dynamically and the Qt
mkspecs file is created to match it.
- The need for a patch to the mingw <float.h> header is checked and the
patch applied (using sudo) if agreed to by the user.
- The build & install folders are renamed.
- Parameters can be supplied to library configure scripts.  For instance
to build FLAC with SSE instructions:
  FLAC_CFG="--enable-sse" ./mythbuildw32
- To force a re-build of FLAC:
  FLAC_CFG=" " ./mythbuildw32

Comments please...

Cross compile on Linux
- unzip -q -d mythbuildw32 mythbuildw32-1.zip
- cd mythbuildw32
- source ./mythbuildw32

Now wait...  By default, the script will checkout fixes/0.24 but this
can be changed by setting MYTHBRANCH=[tag] before e.g.
MYTHBRANCH=master source ./mythbuildw32

The script creates a Windows installation in ./mythinstall/win32 and a
zip installation archive in ./mythinstall/mythtv-w32.zip

To run mythfrontend use wine e.g:
export MYTHCONFDIR="H:/mythconf-wine"
wine mythinstall/win32/mythfrontend.exe -w -geometry 1280x720

Build on Windows
You'll need 2GB VM (physical preferably) and about 10GB disk.

- Install the MinGW/Msys environment available here:
- Click: "Automated MinGW Installer" / "mingw-get-inst" ...
- Download and run the installer. When prompted select:
MSYS basic system
MinGW Developer Toolkit

- Copy mythbuildw32-1.zip to the Msys home folder e.g.
- Right click the archive and select "Extract All..."
- Start an Msys shell: Start/All Programs/MinGW/MinGW Shell
- cd mythbuildw32
- ./mythbuildw32

The script creates a Windows installation in ./mythinstall/win32 and a
zip installation archive in ./mythinstall/mythtv-w32.zip

To run mythfrontend execute:


More information about the mythtv-dev mailing list