- 1 Building Mumble on Windows
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 QTDIR=C:\dev\Qt4.3.4 SET DBUSDIR=C:\dev\dbus SET LIB= SET MYSQL=c:\dev\mysql CALL "C:\Program Files\Intel\Compiler\C++\10.1.020\IA32\Bin\iclvars.bat" SET INCLUDE=C:\dev\WinSDK\include;%INCLUDE% SET PATH=%QTDIR%\bin;%DBUSDIR%\bin;c:\dev\OpenSSL\bin;c:\dev\cmake\bin;%MYSQL%\lib\opt;%PATH% SET PATH=C:\Program Files\GnuWin32\bin
Start a new command shell (run cmd.exe) and: (Note: make sure you have Visual C++ Express edition or Visual Studio 2008, the Intel C++ compiler, and GnuWin32 installed before you run prep.bat or you will get errors).
C: CD \dev prep.bat
Whenever something appears
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...
checkout to C:\dev\mumble\
Visual Studio, Intel Compiler, and GnuWin32
You'll need Visual Studio 2008 (or Visual C++ Express Edition), the Intel C Compiler, and GnuWin32. The first two to compile Mumble, and the last to patch the some of the files you are going to be downloading. Visual Studio is a requirement to get the build tools, and the Intel Compiler is a requirement to get a compiler with modern features. Install all three with their default options. You need to install Microsoft Visual C++ Express Edition OR Visual Studio 2008 BEFORE you install the Intel C Compiler. You can find trials of all of these here:
Visual Studio 2008 Professional 90 day trial: http://msdn2.microsoft.com/en-us/vs2008/products/cc268305.aspx
Visual C++ Express Edition: http://www.microsoft.com/express/download/#webInstall (Look at the bottom right corner for "Visual C++ 2008".)
Intel C Compiler: http://www.intel.com/cd/software/products/asmo-na/eng/219690.htm (Second link from the top under the "Compilers" section.)
Download http://prdownloads.sf.net/boost/boost_1_34_1.zip?download and http://prdownloads.sf.net/boost/boost-jam-3.1.14-1-ntx86.zip?download and unzip both to C:\dev\
cd \dev\boost_1_34_1 copy ..\boost-jam-3.1.14-1-ntx86\bjam.exe bjam --toolset=msvc --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_34_1 and boost-jam directories. If you get the warning, that some targets were skipped or failed, it can be ignored for our purposes.
Microsoft Windows SDK
Go here to download: http://www.microsoft.com/downloads/details.aspx?FamilyId=E6E1C3DF-A74F-4207-8586-711EBE331CDC&displaylang=en . At the time of this writing, the latest version is the "Windows SDK for Windows Server 2008 and .NET Framework 3.5". Install it to C:\dev\WinSDK
As you are going through you will come to a window where you will see two main categories and then subcategories below them. Uncheck the green check boxes next to “Documentation” and “Samples”. Continue with the installation. These take a long time to download and are not really needed for mumble.
Microsoft DirectX SDK
Go to http://msdn.microsoft.com/directx/sdk/ and download the latest SDK. Install it to c:\dev\DXSDK\
From http://download.cegit.de/kde-windows/repository/win32libs/single/ download the lib and bin files for iconv, libxml and zlib. Unpack them to 'c:\Program Files\win32libs'. Note that you may also download the dbus library from there, but if you do it will not automatically spawn dbus-daemon as that needs patching.
Download http://www.cmake.org/files/v2.4/cmake-2.4.8-win32-x86.zip and unpack it to c:\dev. Rename the top directory to just 'cmake'.
Run this command:
cd \dev\windbus patch -p0 < DBus-win32.patch
Now, you'll need to do a small edit.
Edit windbus\dbus\dbus-spawn-win.c. On line 231, change
sitter->end_sync_event = NULL;
sitter->start_sync_event = NULL;
... and then finally, run these commands:
cd \dev mkdir windbus-build cd windbus-build cmake -DCMAKE_BUILD_TYPE=Release -DDBUS_INSTALL_SYSTEM_LIBS=ON -G "NMake Makefiles" c:\dev\windbus\cmake nmake nmake install
Regardless of what you say, Windbus is installed to c:\<Program Files>\dbus. Move that entire directory into c:\dev (so it ends up as c:\dev\dbus)
Copy all .dll files from c:\Program Files\win32libs\bin to c:\dev\dbus\bin
You can remove the c:\dev\windbus and c:\dev\windbus-build directories.
Download the latest OpenSSL source (you can find the latest source at: http://www.openssl.org/source/ , unpack it to c:\dev\ (it will create a directory called openssl-x.y.z)
Download and install ActivePerl. You can find it here: http://www.activestate.com/store/download_file.aspx?binGUID=0e991cbb-7482-4900-88b0-4218add83d01
Open a new shell (so that %PATH% includes ActivePerl).
cd \dev prep cd openssl-x.y.z perl Configure VC-WIN32 --prefix=c:\\dev\\OpenSSL ms\do_masm nmake -f ms\ntdll.mak nmake -f ms\ntdll.mak install
You can remove c:\dev\openssl-x.y.z after this.
Download the latest release of MySQL Server. It can be found here: http://dev.mysql.com/downloads/mysql/5.0.html#downloads . Use a custom install and install only the headers and libraries. Use c:\dev\MySQL as the base directory.
Download ftp://ftp.trolltech.com/qt/source/qt-win-opensource-src-4.3.4.zip and unzip to C:\dev. Rename the directory from qt-win-opensource-src-4.3.4 to Qt4.3.4
cd \dev prep cd Qt4.3.4 patch -p0 < path/to/qt434msvc.patch
configure -debug-and-release -qt-sql-sqlite -qt-sql-mysql-no-qt3support -no-exceptions -qt-zlib -qt-libpng -qt-libjpeg -openssl -qdbus -I c:\dev\OpenSSL\include -L c:\dev\OpenSSL\lib -I c:\dev\dbus\include -L c:\dev\dbus\lib -I c:\dev\mysql\include -L c:\dev\mysql\lib\opt -platform win32-msvc2005 nmake
This will also take quite a while.
Building Mumble and Murmur
Once all of the above is done... Open C:\dev\mumble\src\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 nmake clean nmake