Difference between revisions of "BuildingWindows"

From Mumble Wiki
Jump to: navigation, search
m (Mumble)
Line 130: Line 130:
  cd \dev\mumble
  cd \dev\mumble
  qmake mumble.pro
  qmake mumble.pro
lupdate mumble.pro
lrelease mumble.pro
  make clean
  make clean

Revision as of 06:30, 2 December 2006

Building Mumble on Windows

Mumble has quite a few dependencies for building on Windows, and as the feature set grows, so does the list of dependencies. This page will try to detail the steps required to set up a Win32 build environment.

The paths used here equal the defaults assumed in the Mumble build files. You are free to change them, but you'll then need to change the mumble.pro file as well.

Also note, that if you are submitting a bug report for a selfbuilt executable, we expect you to either

  • Follow these instructions to the letter


  • Report any deviations from these instructions

Deviations means anything, from "I installed to the D: drive" to "I changed the gcc build options for Qt" or "I used another version of Speex".


Create C:\dev, and inside that directory create a file prep.bat containing:

@echo off
SET PATH=C:\dev\MinGW\bin;C:\dev\Qt4.2.2\bin;%PATH%
SET QTDIR=C:\dev\Qt4.2.2

Start a new command shell (run cmd.exe) and

CD \dev

Whenever something appears

like this

you're supposed to enter it in that command shell (or copy it from this webpage and rightclick in the command window and select Paste). When you later want to compile things, remember to call prep.bat first to set paths correctly.

Using your computer while compiling

Compilation is a almost 100% CPU bound job. The windows task switcher doesn't really understand that this isn't really an interactive application, and hence will happily make your entire desktop quite laggy just to gain 1% on the compile time. It is therefore recommended to open your task manager (Ctrl-Alt-Del), switch to Processes, locate cmd.exe, rightclick, Set Priority, BelowNormal. And answer Yes. Doing so will make sure your interactive things get priority. Note, however, that if you do other 100% cpu bound things (like play resource-intensive games), compilation will halt until you're done.


Download the most recent version of TortoiseSVN at http://tortoisesvn.net/downloads and install it. The defaults are fine.

Download Mumble SVN

Open c:\dev, rightclick and SVN Checkout...

Repository is https://svn.sourceforge.net/svnroot/mumble/trunk, checkout to C:\dev\mumble\


Create a directory c:\dev\MinGW

Download the following files:

and unzip them all to the C:\dev\MinGW directory. GDB is an installer, install it to C:\dev\MinGW

cd \dev\MinGW\bin
copy mingw32-make.exe make.exe


Download http://prdownloads.sf.net/boost/boost_1_33_1.zip?download and http://prdownloads.sf.net/boost/boost-jam-3.1.13-1-ntx86.zip?download and unzip both to C:\dev\

cd \dev\boost_1_33_1
copy ..\boost-jam-3.1.13-1-ntx86\bjam.exe
bjam -s"TOOLS=mingw" --prefix=C:\dev\Boost install

This might take a while, but when done you'll have Boost installed. Note that none of the other build dependencies do themselves depend on boost, so if you want you can just continue in a new command shell (but remember to call prep.bat). Once all is done, you can safely delete the boost_1_33_1 and boost-jam directories.

Microsoft Speech SDK

Go to http://www.microsoft.com/speech/download/sdk51/ and a bit down on the page is a download button for SpeechSDK51.exe. Download and install it to C:\dev\SpeechSDK

Microsoft DirectX SDK

Go to http://msdn.microsoft.com/directx/sdk/ and download the latest SDK. Install it to c:\dev\DXSDK\


Download http://www.trolltech.com/download?target=ftp://ftp.trolltech.com/qt/source/qt-win-opensource-src-4.2.2.zip and unzip to C:\dev. Rename the directory from qt-win-opensource-src-4.2.2 to Qt4.2.2

Go to C:\\dev\\Qt4.2.2\mkspecs\win32-g++ and open the file qmake.conf. Change the following lines:

QMAKE_LFLAGS		= -mthreads -Wl,-enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc


QMAKE_CFLAGS_RELEASE	= -O3 -march=pentium3 -mtune=pentium4 -mmmx -msse -ffast-math
QMAKE_CFLAGS_DEBUG	= -g -march=pentium3 -mtune=pentium4 -mmmx -msse -ffast-math
QMAKE_LFLAGS		= -Wl,-enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc

This will enable MMX and SSE instructions, and will also make sure Qt is tuned for modern architectures. It will also remove the exception threading support, which removes a few runtime dependencies.

cd \dev\Qt4.2.2
configure -debug-and-release -qt-sql-sqlite -no-qt3support -no-exceptions -qt-zlib  -qt-gif -qt-libpng -qt-libmng -qt-libjpeg 

This will also take quite a while. However, once the configure stage is done, you can continue with the rest of the dependencies in a new window.


Go to C:\dev, rightclick and SVN Checkout. Repository is http://svn.xiph.org/trunk/speex. Checkout to C:\dev\speex, and set Revision to 11909.

cd \dev\mumble
mkdir Debug
mkdir Release
cd \dev\speex\libspeex
copy \dev\mumble\dependencies\libspeex.pro
copy \dev\mumble\dependencies\speex.def
qmake libspeex.pro
mingw32-make clean
mingw32-make debug release
copy release\speex.dll ..\..\mumble\release
copy release\libspeex.a ..\..\mumble\release
copy debug\speex.dll ..\..\mumble\debug
copy debug\libspeex.a ..\..\mumble\debug

This builds both a debug and release version of Speex, so you get full symbol information in your debug builds.

Building Mumble and Murmur

Once all of the above is done... Open C:\dev\mumble\mumble.pro and remove the line which says CONFIG += asio. That is only needed for ASIO support, which requires downloads of proprietary ASIO SDK to compile.

Note that this builds the debug versions, which is what we strongly recommend to use while developing. If you want to send the binary to someone else, use make release instead, which will result in a much smaller binary with fewer dependencies.


cd \dev\mumble
qmake mumble.pro
lupdate mumble.pro
lrelease mumble.pro
make clean


cd \dev\mumble
qmake murmur.pro
make clean