Difference between revisions of "BuildingWindows"
m (→Create the bat file: Add it so ppl. know we have this env variable)
m (→Create the bat file: Qt 4.5.2)
|Line 36:||Line 36:|
Create ''C:\dev'', and inside that directory create a file ''prep.bat'' containing:
Create ''C:\dev'', and inside that directory create a file ''prep.bat'' containing:
Revision as of 23:44, 19 August 2009
- 1 Building Mumble on Windows
- 1.1 Preparations
- 1.2 TortoiseSVN
- 1.3 G15SDK
- 1.4 Boost
- 1.5 Microsoft Windows SDK
- 1.6 Microsoft DirectX SDK
- 1.7 WinDBUS
- 1.8 OpenSSL
- 1.9 MySQL
- 1.10 ZeroC ICE
- 1.11 Qt
- 1.12 libsndfile
- 1.13 libogg
- 1.14 Bonjour
- 1.15 Intel C++ Compiler
- 1.16 Download Mumble and Submodules
- 1.17 Protocol Buffers
- 1.18 Building Mumble and Murmur
- 1.19 Running Mumble and Murmur
Building Mumble on Windows
- Follow these instructions to the letter
- Report any deviations from these instructions
Download the most recent Git from http://code.google.com/p/msysgit/downloads/list and install it. Make sure you select "Run Git from the Windows Command Prompt."
You'll need Visual Studio 2008 (or Visual C++ Express Edition) with SP1.
Visual C++ Express Edition: http://www.microsoft.com/express/vc/ (Look at the bottom right corner for "Visual C++ 2008.")
Visual Leak Detector
Download VLD and install it to C:\dev\vld\.
Note: If you're using VC++ EE, you will need to manually extract the files using a tool like 7-zip . Extract it to C:\dev\' and rename it to vld.
Create the bat file
Create C:\dev, and inside that directory create a file prep.bat containing:
@echo off SET QTDIR=C:\dev\Qt4.5.2 SET DBUSDIR=C:\dev\dbus SET LIB= SET VLD_DIR=C:\dev\vld SET MYSQL=c:\dev\mysql SET ICE=c:\dev\Ice IF DEFINED "%PROGRAMFILES(X86)%" ( CALL "%PROGRAMFILES(X86)%\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" x86 ) ELSE ( CALL "%PROGRAMFILES%\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" x86 ) SET INCLUDE=C:\dev\WinSDK\include;%INCLUDE% SET DXSDK_DIR=C:\dev\DXSDK SET PATH=%QTDIR%\bin;%DBUSDIR%\bin;c:\dev\OpenSSL\bin;c:\dev\libsndfile;c:\dev\cmake\bin;%MYSQL%\lib\opt;%ICE%\bin;c:\dev\protobuf-2.2.0\vsprojects\Release;%PATH%
change the last line to
if you're compiling Mumble 1.1.x.
cd \dev prep
Whenever something appears
Note to those following this guide: When you extract compressed files, sometimes they will have container folders and sometimes they will not. Please ensure (for example) that when you extract a compressed file like QT4.5.1, that you see "bin" "include" and such folders as that directly inside of the folder named "Qt4.5.1". If you just see one folder and no other files, you have done it wrong.
Now go to C:\Program Files\Logitech\GamePanel Software\LCD Manager\SDK and extract "LCDSDK_3.02.173.zip". Take the folder that has been extracted and rename it to G15SDK. Put this folder into c:\dev.
Download http://prdownloads.sf.net/boost/boost_1_39_0.7z?download and http://prdownloads.sf.net/boost/boost-jam-3.1.17-1-ntx86.zip?download and unzip both to c:\dev
cd \dev prep cd boost_1_39_0 copy ..\boost-jam-3.1.17-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_39_0 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=f75f2ca8-c1e4-4801-9281-2f5f28f12dbd . At the time of this writing, the latest version is the "Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 SP1: RC". Install it to C:\dev\WinSDK
Microsoft DirectX SDK
Go to http://msdn.microsoft.com/directx/sdk/ and download the latest SDK. Install it to c:\dev\DXSDK
Download CMake and unpack it to c:\dev. Rename the top directory to just 'cmake'.
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 at this point.
Download and install ActivePerl from here: http://www.activestate.com/activeperl/
Open a new shell (so that %PATH% includes ActivePerl).
You can remove c:\dev\openssl-x.y.z after this.
Download ftp://ftp.trolltech.com/qt/source/qt-win-opensource-src-4.5.2.zip and unzip to c:\dev. Rename the directory from qt-win-opensource-src-4.5.2 to Qt4.5.2
Download http://mumble.sourceforge.net/qt450msvc.patch and put it in c:\dev\Qt4.5.2. Then, start Git Bash, which came with git.
cd /c/dev/Qt4.5.2 patch -lp0 < qt450msvc.patch exit
Start a regular command shell:
cd \dev prep cd Qt4.5.2 configure -debug-and-release -qt-sql-sqlite -qt-sql-mysql -no-qt3support -no-exceptions -qt-zlib -qt-libpng -qt-libjpeg -openssl-linked -dbus-linked -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-msvc2008 nmake
This will also take quite a while.
Download the binary release from http://www.mega-nerd.com/libsndfile/#Download and install it to c:\dev\libsndfile\ . Make sure the libsndfile-1.dll is visible to the executables.
Note that this dependency is not needed 'unless' you want to compile the compatibility client (Mumble 1.1.x). If you do,
Download the latest libogg-1.x.x.zip from http://downloads.xiph.org/releases/ogg/ and unpack it to c:\dev\libogg.
If you want to compile Mumble 1.1.x, you need to go to C:\dev\libogg\win32\VS2008, build the release builds of libogg, and copy C:\dev\libogg\win32\VS2008\Win32\Release_SSE2\libogg.lib to the new Folder C:\dev\libogg\lib\.
Download the bonjour sdk from http://developer.apple.com/networking/bonjour/download/ and install it to c:\dev\Bonjour\ .
Intel C++ Compiler
This is strictly optional and you can compile a perfectly working version of Mumble without this compiler following this guide. This guide does not give information on how to use the Intel compiler with VS2008 to compile Mumble, so you will need to either have the programming experience necessary to know how to do this or find the procedures to do so elsewhere.
Download Mumble and Submodules
To clone the repositories :
cd \dev prep git clone git://mumble.git.sourceforge.net/gitroot/mumble/mumble mumble cd mumble git submodule init git submodule update
To use the v1.1.x branch (which you most likely do) run this command after running the commands above:
git checkout --track -b v1.1.x origin/v1.1.x
If you are using the current branch, you will need to open git bash and cd to the mumble folder that was created. Now cd to
and then do
Download Protocol Buffers from Google (protobuf-x.y.z.zip) and unpack it to c:\dev\protobuf-z.y.z. Follow the documentation in c:\dev\protobuf-x.y.z\vsprojects\readme.txt. Note that if the release number changes you will need to change prep.bat to whatever z.y.z changed to or you won't be able to call protoc.exe.
Building Mumble and Murmur
Once all of the above is done we can get to compiling Mumble itself.
If you want to have ASIO support you have to install an additional, proprietary, ASIO SDK.
There are four dependencies that most people who make their own compiles will not need: g15, asio, bonjour, and 11x. The bonjour dependency is useful if you want to browse servers across a local network, but you can disable it if this feature is not needed.
To compile Mumble without Mumble 1.1.x, replace the qmake command below with this one:
qmake CONFIG+=no-11x CONFIG+=no-asio CONFIG+=no-g15 CONFIG+=no-bonjour -recursive
To compile Mumble with Mumble 1.1.x, replace the qmake command below with this one:
qmake CONFIG+=no-asio CONFIG+=no-bonjour CONFIG+=no-g15 -recursive
Note that the compile will fail if you leave out these build flags and do not have the SDK required.
To compile Mumble:
cd \dev prep cd mumble qmake nmake clean nmake
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
instead of the last
command listed above. This will result in a much smaller binary with fewer dependencies.
Running Mumble and Murmur
cd \dev prep cd mumble\debug (or release)
Then execute either Mumble or Murmur from the command prompt with
If you want to run the release build directly from Windows Explorer, you will need to collect all the library files into one folder, along with the executables you built when you compiled Mumble. Have a look at the files the official Mumble installer creates in Program Files\Mumble to find out which files you will need.