Difference between revisions of "BuildingWindows"

From Mumble Wiki
Jump to: navigation, search
m (Changed Arch to x86_64 as this appears to be how the executables are named)
 
(569 intermediate revisions by 25 users not shown)
Line 1: Line 1:
= Building Mumble on Windows =
+
{{Building}}
  
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.
+
= Commandline instructions =
 +
Whenever something appears
 +
like this
 +
you're supposed to enter it in that command shell (or copy it from this webpage and right click in the command window and select ''Paste'').
 +
 
 +
Note that ''each line'' is a separate command. So, if you wanted to do the following,
 +
cd mumble
 +
nmake
 +
you would type "cd mumble" in your command prompt, and press enter, and then you would type "nmake", and press enter.
 +
 
 +
Ok. So you're ready to start working.
 +
 
 +
= Build using MSVC on Windows =
 +
 
 +
== Introduction ==
 +
 
 +
Mumble has quite a few dependencies for building on Windows, and as the feature set grows, so does the list of dependencies. Therefore we have built some automated scripts to create a sane build environment for Mumble. To make this build environment as similar as possible across all of Mumble's supported Platforms, the Windows build is strongly dependent on [https://www.cygwin.com/ Cygwin].
  
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.
+
The [https://github.com/mumble-voip/mumble-releng mumble-releng] Github repository has an [https://github.com/mumble-voip/mumble-releng/blob/master/buildenv/1.3.x/win32-static/README up-to-date README] on how to create the build environment!
 +
{{Notice|message=
 +
The most up-to-date information on how to create a Mumble build environment are always to be found in this README file!
 +
}}
 +
{{Elaboration|message=
 +
There is an older deprecated version of this article at [[BuildingWindows (deprecated)]] showing how to build Mumble manually with QT4 which is far more complex.
 +
}}
  
Also note, that if you are submitting a bug report for a selfbuilt executable, we expect you to either
+
== Software you will need ==
* Follow these instructions to the letter
+
{{Notice|message=
or
+
We currently depend on Visual Studio to be in their default locations, and the Windows 7 SDK to be in ''C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A'' (rather than the default ''C:\Program Files\…'').
* 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".
+
* ''Visual Studio Community 2015 Update 3'': You need MSVC 2015. During installation you can deselect the Windows SDKs, because we are going to install the up-to-date one, listed below.
 +
* [https://www.microsoft.com/en-us/download/details.aspx?id=8279 Windows SDK 7] for XP/x86 Overlay (You may have to [http://stackoverflow.com/questions/19366006/error-when-installing-windows-sdk-7-1#23032807 temporarily remove ''Microsoft Visual C++ 2010 * Redistributable'' for the installer to work].)
 +
* [https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk Windows SDK] (If you are on Windows 7, don't select "Windows Performance Toolkit", because it isn't compatible)
 +
* [https://msysgit.github.io/ Git]: You can use any version of Git, it only has to be in your PATH variable.
  
== Preparations ==
+
== Creating the build environment ==
 +
First you need to clone the mumble-releng repository into a directory in which your Windows user has write access. ''cd'' into that directory, then
 +
git clone https://github.com/mumble-voip/mumble-releng.git mumble-releng
  
Create ''C:\dev'', and inside that directory create a file ''prep.bat'' containing:
+
In the terminal window, change to the directory the scripts for Windows (32-bit) and static build reside in.
@echo off
+
cd mumble-releng/buildenv/1.3.x/win32-static
SET QTDIR=C:\dev\Qt4.3.1
+
and execute
SET DBUSDIR=C:\dev\dbus
+
setup.cmd
SET INCLUDE=
+
This should install a Mumble build environment in your ''C:\MumbleBuild'' directory named with a date and shortened commit hash like ''win32-static-1.3.x-2015-05-25-1234ab7''.
SET LIB=
 
SET PATH=C:\dev\MinGW\bin;%QTDIR%\bin;%DBUSDIR%\bin;C:\dev\openssl\out;C:\dev\openssl;C:\dev\cmake\bin;%PATH%
 
  
Start a new command shell (run ''cmd.exe'') and
+
If everything went right Windows Explorer should open up the new build environment directory as named above.
C:
 
CD \dev
 
prep.bat
 
  
Whenever something appears
+
== Build Mumble's dependencies ==
like this
+
To start building Mumble's dependencies, double-click the "MumbleBuild - cygwin" shortcut. This will open a cygwin terminal. To change the current directory to the ''build environment's local clone'' of the mumble-releng repository type:
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.
+
cd mumble-releng/buildenv/1.3.x/win32-static
 +
 
 +
{{Notice|message=
 +
This mumble-releng directory is a copy. Should you want to update your build environment in the future, proceed from the original.
 +
}}
  
=== Using your computer while compiling ===
+
To download and build all dependencies (this will take a long time!), execute
 +
./build-all.bash
  
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.
+
Once all dependencies are built, you will be returned to your Cygwin shell. Make sure it did not stop because of an error.
  
== TortoiseSVN ==
+
The built dependencies are located in the corresponding ''.build'' folder.
  
Download the most recent version of TortoiseSVN at http://tortoisesvn.net/downloads and install it. The defaults are fine.
+
{{Notice|message=
 +
If you are using Visual Studio on WindowsOS, Please notice that sometimes the install process would not add itself into PATH. It may cause "protobuf.build" cant finish as expected.
 +
}}
  
== Download Mumble SVN ==
+
{{Notice|message=
 +
If you are using a non-English version of Visual Studio on WindowsOS, Please check the page above. The best way to solve is install a Visual Studio English language pack AND set your sysyem language into English.
 +
[https://bugreports.qt.io/browse/QTBUG-56388 QTBUG-56388]
 +
}}
  
Open c:\dev, rightclick and ''SVN Checkout...''
+
== Building Mumble ==
 +
To build Mumble itself using your newly-built build environment, you should use the "MumbleBuild - cmd" shortcut to launch a Windows command prompt.
  
Repository is
+
Next, make a checkout of the Mumble source tree and enter the root of the source tree with
 +
git clone --recursive https://github.com/mumble-voip/mumble.git mumble
 +
cd mumble
 +
to generate Makefiles for use with the build environment, run
 +
qmake -recursive main.pro CONFIG+="release static no-elevation no-g15 no-asio" CONFIG-=sse2
 +
{{Notice|message=
 +
This build environment does not install the libraries and headers needed to build Mumble with G15 LCD or ASIO audio support. If you want to build Mumble with one of them you need to install them to the build environment on your own. In this case remove ''no-g15'' or rather ''no-asio'' accordingly.
 +
}}
  
  https://mumble.svn.sourceforge.net/svnroot/mumble/trunk
+
After all this preparation start the actual Mumble compilation with
 +
  nmake
 +
You should end up with a mumble.exe and a murmur.exe binary (and a whole collection of .DLL files to go along with the two) in the "release" directory in the root of the Mumble source tree.
  
checkout to ''C:\dev\mumble\''
+
If you want to distribute your own mumble.exe you can either create an installer (see below) or collect mumble.exe and the needed .DLL files yourself.
  
== MinGW ==
+
== (Optional) Visual Leak Detector ==
  
Create a directory c:\dev\MinGW
+
{{Notice|message=
 +
VLD is no longer a default requirement for a Mumble build environment. You only have to install it if you want to use it in which case you have to manually enable it with ''CONFIG+=vld''.
 +
}}
  
Download the following files:
+
[http://dmoulding.googlepages.com/vld Download] VLD and install it to its default install location.
* http://downloads.sourceforge.net/tdm-gcc/gcc-4.2.1-tdm-2-core-1.7z
 
* http://downloads.sourceforge.net/tdm-gcc/gcc-4.2.1-tdm-2-g++-1.7z
 
* http://prdownloads.sf.net/mingw/gdb-6.6.tar.bz2?download
 
* http://prdownloads.sf.net/gnuwin32/patch-2.5.9-7-bin.zip?download
 
* http://prdownloads.sf.net/mingw/binutils-2.17.50-20060824-1.tar.gz?download
 
* http://prdownloads.sf.net/mingw/w32api-3.10.tar.gz?download
 
* http://prdownloads.sf.net/mingw/mingw-runtime-3.13.tar.gz?download
 
* http://prdownloads.sf.net/mingw/mingw32-make-3.81-2.tar.gz?download
 
  
and unzip them all to the C:\dev\MinGW directory.
+
If you're using Visual C++ Express Edition, you will need to manually extract the files using a tool like [http://7-zip.org/ 7-zip ]. Extract it to ''C:\dev\'' and adjust [[BuildingWindows#Custom_Dependency_Paths|the VLD_PATH]] to point to it.
  
cd \dev\MinGW\bin
+
{{Notice|message=
copy mingw32-make.exe make.exe
+
VLD is only enabled for debug builds. If you only compile Release builds you do not need it.
 +
}}
  
== Boost ==
+
== (Optional) Custom Dependency Paths ==
  
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\
+
The build files were modified to support custom dependency paths a while ago. This is for the people who have '''the dependencies installed in some other place than the autogenerated directory structure'''. To specify the custom paths you need to '''create a ''winpaths_custom.pri'' file''' to the root of your Mumble project. In this file you can override all paths found in ''winpaths_default.pri''. For example:
  
cd \dev\boost_1_33_1
+
  OPENSSL_PATH = C:\\dev\MyOpenSSLIsSomewhereElse
copy ..\boost-jam-3.1.13-1-ntx86\bjam.exe
+
  ICE_PATH = C:\\Program Files (x86)\\ZeroC\\Ice-3.4.1
bjam -s"TOOLS=mingw" --prefix=C:\dev\Boost install
 
  
This might take a while, but when done you'll have Boost installed.
+
Would make the build process search its OpenSSL and Ice dependencies in the specified folders and use defaults for everything else. Note that you should only override the variables for dependencies you actually installed in non-default locations to prevent clashes with possible future updates.
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''
+
'''Note:''' If you copied ''winpaths_default.pri'' to create your ''winpaths_custom.pri'' make sure to delete the following lines from your ''winpaths_custom.pri'' file:
  
== Microsoft DirectX SDK ==
+
# Include custom file if it exists
 +
exists(winpaths_custom.pri) {
 +
include(winpaths_custom.pri)
 +
}
  
Go to http://msdn.microsoft.com/directx/sdk/ and download the latest SDK. Install it to c:\dev\DXSDK\
+
== (Optional) Build a Mumble installer package ==
 +
If you want to create an installable .msi package from your self-compiled Mumble some additional steps are needed.
  
== WinDBUS ==
+
Download and install the latest WIX stable Version (currently 3.8) from [http://wixtoolset.org/releases/ here].
  
Download http://www.cmake.org/files/v2.4/cmake-2.4.7-win32-x86.zip and unpack it to c:\dev. Rename the top directory to just 'cmake'.
+
Set the following environment variables as needed (see defaults in installer/Settings.wxi):
 +
  MumbleSourceDir  default: \dev\mumble
 +
  MumbleQtDir  default: \dev\QtMumble
 +
  MumbleDebugToolsDir  default: C:\Program Files (x86)\Debugging Tools for Windows (x86)
 +
  MumbleSndFileDir  default: \Program Files (x86)\Mega-Nerd\libsndfile\bin
 +
    Define MumbleNoSndFile to exclude  libsndfile
 +
  MumbleMySQLDir  default: \dev\MySQL
 +
    Define MumbleNoMySQL to exclude  MySQL
 +
  MumbleIceDir  default: \Program Files (x86)\ZeroC\Ice-3.4.2\bin\vc100
 +
    Define MumbleNoIce to exclude Ice
 +
  MumbleOpenSslDir  default: \dev\openssl
 +
  MumbleZlibDir  default: \dev\zlib
 +
  MumbleMergeModuleDir  default: C:\Program Files (x86)\Common Files\Merge Modules
 +
  Define MumbleSSE to include SSE
 +
  Define MumbleNoSSE2 to exclude SSE2
 +
  Define MumbleNoG15 to exclude G15
  
Checkout the SVN of WinDBus from https://windbus.svn.sourceforge.net/svnroot/windbus/trunk to c:\dev\windbus
+
Open installer/MumbleInstall.sln, switch to release and build the installer.
  
Edit windbus\dbus\dbus-spawn-win.c. On line 231, change end_sync_event to start_sync_event
+
Once this completed successfully run the ''build_installer.pl'' script to include all translations into your installer.
Edit windbus\dbus\dbus-sysdeps-win.c. On line 3019, change
 
if(CreateProcessA(dbus_exe_path, dbus_args, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi))
 
to
 
if(CreateProcessA(dbus_exe_path, dbus_args, NULL, NULL, FALSE, CREATE_NO_WINDOW, NULL, NULL, &si, &pi))
 
  
cd \dev\windbus
+
You should now have a working .msi installer.
patch -p0 < DBus-win32.patch
 
cd ..
 
mkdir windbus-build
 
cd windbus-build
 
cmake -DDBUS_DISABLE_ASSERTS=ON -DDBUS_BUILD_TESTS=OFF -DDBUS_ENABLE_VERBOSE_MODE=OFF -DCMAKE_BUILD_TYPE=Release -DDBUS_INSTALL_SYSTEM_LIBS=ON -G "MinGW Makefiles" c:\dev\windbus\cmake
 
  
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)
+
= Build using MXE on Debian and derivates =
  
== OpenSSL ==
+
{{Notice|message=
 +
Mumble supports MinGW since [https://github.com/mumble-voip/mumble/commit/10079ed9867308aad098231f86e260bd831b0ac6 commit 10079ed9867308aad098231f86e260bd831b0ac6] (March 2017, first stable version 1.3.0).
 +
}}
  
Download the latest OpenSSL source, unpack it to c:\dev\openssl
+
== Introduction ==
  
Download and install ActivePerl.
+
It is possible to cross-compile Mumble using a MinGW toolchain. If you're more comfortable with a Unix-like system, you will probably prefer this method. The easiest way to cross-compile Mumble is by using MXE, which provides all the required dependencies.
  
Open a new shell (so the path is correct)
+
Features currently not available with MinGW:
 +
* Overlay
 +
* Logitech G15 LCD
 +
* ZeroC Ice
 +
* Bonjour
  
cd \dev
+
{{Notice|message=
prep
+
In the guide there are some commands with ''${ARCH}'' in them.
cd openssl
+
You need to replace it with the desired architecture, which can be ''x86_64'' (64 bit) or ''i686'' (32 bit).
ms\mingw32
+
(If you are on a 64bit system and the above doesn't work for you, you might want to try ''x86-64'' (with a dash instead of an underscore) instead).
 +
}}
  
== Qt ==
+
== Installing the required MXE packages ==
  
Download ftp://ftp.trolltech.com/qt/source/qt-win-opensource-src-4.3.1.zip and unzip to C:\dev. Rename the directory
+
Add MXE's repository to your system's sources:
from ''qt-win-opensource-src-4.3.1'' to ''Qt4.3.1''
 
  
Go to ''C:\dev\Qt4.3.1\mkspecs\win32-g++'' and open the file ''qmake.conf''. Change the following lines:
+
'''Debian'''
  QMAKE_CFLAGS_RELEASE = -O2
+
echo "deb https://dl.mumble.info/mirror/pkg.mxe.cc/repos/apt stretch main" | sudo tee /etc/apt/sources.list.d/mxe.list
QMAKE_CFLAGS_DEBUG = -g
+
'''Ubuntu'''
into
+
  echo "deb https://dl.mumble.info/mirror/pkg.mxe.cc/repos/apt xenial main" | sudo tee /etc/apt/sources.list.d/mxe.list
QMAKE_CFLAGS_RELEASE = -O2 -march=pentium3 -mtune=generic -mmmx -msse
 
QMAKE_CFLAGS_DEBUG = -O2 -fno-inline -g -march=pentium3 -mtune=generic -mmmx -msse
 
  
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.
+
Add the repository's key:
 +
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 86B72ED9
  
So far, so good. However, in order to use SSE in threads, we'll need to make sure the thread stack is aligned, something neither the Windows runtime, the MinGW runtime or Qt does for us. So we'll hack this into Qt by fudging it's thread creation.
+
Update packages index:
 +
sudo apt update
  
Open ''C:\dev\Qt4.3.1\src\corelib\thread\qthread_win.cpp'' in an editor. Locate the line which says
+
Install the required packages
  void QThread::start(Priority priority)
+
  sudo apt install \
before this line, enter the following:
+
mxe-${ARCH}-w64-mingw32.static-qtbase \
static unsigned int __attribute__((noinline, stdcall)) f_prime (void *p)
+
mxe-${ARCH}-w64-mingw32.static-qtsvg \
{
+
mxe-${ARCH}-w64-mingw32.static-qttools \
  return QThreadPrivate::start(p);
+
  mxe-${ARCH}-w64-mingw32.static-qttranslations \
}
+
mxe-${ARCH}-w64-mingw32.static-boost \
unsigned int __attribute__ ((stdcall)) QThreadStackAligned (void *p)
+
mxe-${ARCH}-w64-mingw32.static-protobuf \
{
+
mxe-${ARCH}-w64-mingw32.static-sqlite \
    (void)__builtin_return_address(1); // to force call frame
+
mxe-${ARCH}-w64-mingw32.static-flac \
    asm volatile ("andl $-16,%%esp" ::: "%esp");
+
  mxe-${ARCH}-w64-mingw32.static-ogg \
    return f_prime (p);
+
mxe-${ARCH}-w64-mingw32.static-vorbis \
}
+
mxe-${ARCH}-w64-mingw32.static-libsndfile
then, inside the ::start() function, change the line
 
    d->handle = (Qt::HANDLE) _beginthreadex(NULL, d->stackSize, QThreadPrivate::start,
 
                                            this, CREATE_SUSPENDED, &(d->id));
 
to read
 
    d->handle = (Qt::HANDLE) _beginthreadex(NULL, d->stackSize, QThreadStackAligned,
 
                                            this, CREATE_SUSPENDED, &(d->id));
 
  
In ''C:\dev\Qt4.3.1\tools\qdbus\src\src.pro'' change
+
== Preparing the environment ==
CONFIG(debug, debug|release):LIBS += -ldbus-1d
 
else:LIBS += -ldbus-1
 
to
 
LIBS += -ldbus-1
 
  
then it's time to compile Qt
+
Clone Mumble's Git repository
 +
git clone https://github.com/mumble-voip/mumble.git
 +
cd mumble
  
  cd \dev\Qt4.3.1
+
Get the ASIO SDK
  configure -debug-and-release -qt-sql-sqlite -no-qt3support -no-exceptions -qt-zlib -qt-libpng -qt-libjpeg -openssl -qdbus -I c:\dev\openssl\outinc -L c:\dev\openssl\out -I c:\dev\dbus\include -L c:\dev\dbus\lib
+
  wget https://www.steinberg.net/sdk_downloads/asiosdk2.3.zip -P /tmp/
  make
+
  unzip /tmp/asiosdk2.3.zip -d /tmp/
 +
  mv /tmp/ASIOSDK2.3 3rdparty/asio
  
This will also take quite a while.
+
Export environment variable to tell QMake where MXE's protobuf compiler is
 +
export MUMBLE_PROTOC=/usr/lib/mxe/usr/x86_64-pc-linux-gnu/bin/protoc
  
== Building Mumble and Murmur ==
+
Add MXE's directory to PATH
 +
PATH=$PATH:/usr/lib/mxe/usr/bin
  
Once all of the above is done...
+
== Build ==
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.
+
Run QMake to process the project(s) files
 +
${ARCH}-w64-mingw32.static-qmake-qt5 -recursive CONFIG+="release g15-emulator no-overlay no-bonjour no-elevation no-ice"
  
cd \dev\mumble
+
Start the build
qmake
 
make clean
 
 
  make
 
  make
 +
 +
[[Category:Development]]

Latest revision as of 11:22, 10 March 2020

Building Guides

This page is one of a set of Building pages/guides for the different OSes with information on building Mumble/Murmur.

BuildingLinux BuildingFreeBSD BuildingOpenBSD BuildingMacOSX BuildingWindows


Commandline instructions

Whenever something appears

like this

you're supposed to enter it in that command shell (or copy it from this webpage and right click in the command window and select Paste).

Note that each line is a separate command. So, if you wanted to do the following,

cd mumble
nmake

you would type "cd mumble" in your command prompt, and press enter, and then you would type "nmake", and press enter.

Ok. So you're ready to start working.

Build using MSVC on Windows

Introduction

Mumble has quite a few dependencies for building on Windows, and as the feature set grows, so does the list of dependencies. Therefore we have built some automated scripts to create a sane build environment for Mumble. To make this build environment as similar as possible across all of Mumble's supported Platforms, the Windows build is strongly dependent on Cygwin.

The mumble-releng Github repository has an up-to-date README on how to create the build environment!

Icons oxygen 48x48 actions view-pim-notes.png
Note:
The most up-to-date information on how to create a Mumble build environment are always to be found in this README file!
Elaboration: There is an older deprecated version of this article at BuildingWindows (deprecated) showing how to build Mumble manually with QT4 which is far more complex.


Software you will need

Icons oxygen 48x48 actions view-pim-notes.png
Note:
We currently depend on Visual Studio to be in their default locations, and the Windows 7 SDK to be in C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A (rather than the default C:\Program Files\…).

Creating the build environment

First you need to clone the mumble-releng repository into a directory in which your Windows user has write access. cd into that directory, then

git clone https://github.com/mumble-voip/mumble-releng.git mumble-releng

In the terminal window, change to the directory the scripts for Windows (32-bit) and static build reside in.

cd mumble-releng/buildenv/1.3.x/win32-static

and execute

setup.cmd

This should install a Mumble build environment in your C:\MumbleBuild directory named with a date and shortened commit hash like win32-static-1.3.x-2015-05-25-1234ab7.

If everything went right Windows Explorer should open up the new build environment directory as named above.

Build Mumble's dependencies

To start building Mumble's dependencies, double-click the "MumbleBuild - cygwin" shortcut. This will open a cygwin terminal. To change the current directory to the build environment's local clone of the mumble-releng repository type:

cd mumble-releng/buildenv/1.3.x/win32-static
Icons oxygen 48x48 actions view-pim-notes.png
Note:
This mumble-releng directory is a copy. Should you want to update your build environment in the future, proceed from the original.

To download and build all dependencies (this will take a long time!), execute

./build-all.bash

Once all dependencies are built, you will be returned to your Cygwin shell. Make sure it did not stop because of an error.

The built dependencies are located in the corresponding .build folder.

Icons oxygen 48x48 actions view-pim-notes.png
Note:
If you are using Visual Studio on WindowsOS, Please notice that sometimes the install process would not add itself into PATH. It may cause "protobuf.build" cant finish as expected.
Icons oxygen 48x48 actions view-pim-notes.png
Note:
If you are using a non-English version of Visual Studio on WindowsOS, Please check the page above. The best way to solve is install a Visual Studio English language pack AND set your sysyem language into English. QTBUG-56388

Building Mumble

To build Mumble itself using your newly-built build environment, you should use the "MumbleBuild - cmd" shortcut to launch a Windows command prompt.

Next, make a checkout of the Mumble source tree and enter the root of the source tree with

git clone --recursive https://github.com/mumble-voip/mumble.git mumble
cd mumble

to generate Makefiles for use with the build environment, run

qmake -recursive main.pro CONFIG+="release static no-elevation no-g15 no-asio" CONFIG-=sse2
Icons oxygen 48x48 actions view-pim-notes.png
Note:
This build environment does not install the libraries and headers needed to build Mumble with G15 LCD or ASIO audio support. If you want to build Mumble with one of them you need to install them to the build environment on your own. In this case remove no-g15 or rather no-asio accordingly.

After all this preparation start the actual Mumble compilation with

nmake

You should end up with a mumble.exe and a murmur.exe binary (and a whole collection of .DLL files to go along with the two) in the "release" directory in the root of the Mumble source tree.

If you want to distribute your own mumble.exe you can either create an installer (see below) or collect mumble.exe and the needed .DLL files yourself.

(Optional) Visual Leak Detector

Icons oxygen 48x48 actions view-pim-notes.png
Note:
VLD is no longer a default requirement for a Mumble build environment. You only have to install it if you want to use it in which case you have to manually enable it with CONFIG+=vld.

Download VLD and install it to its default install location.

If you're using Visual C++ Express Edition, you will need to manually extract the files using a tool like 7-zip . Extract it to C:\dev\ and adjust the VLD_PATH to point to it.

Icons oxygen 48x48 actions view-pim-notes.png
Note:
VLD is only enabled for debug builds. If you only compile Release builds you do not need it.

(Optional) Custom Dependency Paths

The build files were modified to support custom dependency paths a while ago. This is for the people who have the dependencies installed in some other place than the autogenerated directory structure. To specify the custom paths you need to create a winpaths_custom.pri file to the root of your Mumble project. In this file you can override all paths found in winpaths_default.pri. For example:

 OPENSSL_PATH = C:\\dev\MyOpenSSLIsSomewhereElse
 ICE_PATH = C:\\Program Files (x86)\\ZeroC\\Ice-3.4.1

Would make the build process search its OpenSSL and Ice dependencies in the specified folders and use defaults for everything else. Note that you should only override the variables for dependencies you actually installed in non-default locations to prevent clashes with possible future updates.


Note: If you copied winpaths_default.pri to create your winpaths_custom.pri make sure to delete the following lines from your winpaths_custom.pri file:

# Include custom file if it exists
exists(winpaths_custom.pri) {
	include(winpaths_custom.pri)
}

(Optional) Build a Mumble installer package

If you want to create an installable .msi package from your self-compiled Mumble some additional steps are needed.

Download and install the latest WIX stable Version (currently 3.8) from here.

Set the following environment variables as needed (see defaults in installer/Settings.wxi):

 MumbleSourceDir  default: \dev\mumble
 MumbleQtDir  default: \dev\QtMumble
 MumbleDebugToolsDir  default: C:\Program Files (x86)\Debugging Tools for Windows (x86)
 MumbleSndFileDir  default: \Program Files (x86)\Mega-Nerd\libsndfile\bin
   Define MumbleNoSndFile to exclude  libsndfile
 MumbleMySQLDir  default: \dev\MySQL
   Define MumbleNoMySQL to exclude  MySQL
 MumbleIceDir  default: \Program Files (x86)\ZeroC\Ice-3.4.2\bin\vc100
   Define MumbleNoIce to exclude Ice
 MumbleOpenSslDir  default: \dev\openssl
 MumbleZlibDir  default: \dev\zlib
 MumbleMergeModuleDir  default: C:\Program Files (x86)\Common Files\Merge Modules
 Define MumbleSSE to include SSE
 Define MumbleNoSSE2 to exclude SSE2
 Define MumbleNoG15 to exclude G15

Open installer/MumbleInstall.sln, switch to release and build the installer.

Once this completed successfully run the build_installer.pl script to include all translations into your installer.

You should now have a working .msi installer.

Build using MXE on Debian and derivates

Icons oxygen 48x48 actions view-pim-notes.png
Note:
Mumble supports MinGW since commit 10079ed9867308aad098231f86e260bd831b0ac6 (March 2017, first stable version 1.3.0).

Introduction

It is possible to cross-compile Mumble using a MinGW toolchain. If you're more comfortable with a Unix-like system, you will probably prefer this method. The easiest way to cross-compile Mumble is by using MXE, which provides all the required dependencies.

Features currently not available with MinGW:

  • Overlay
  • Logitech G15 LCD
  • ZeroC Ice
  • Bonjour
Icons oxygen 48x48 actions view-pim-notes.png
Note:
In the guide there are some commands with ${ARCH} in them.

You need to replace it with the desired architecture, which can be x86_64 (64 bit) or i686 (32 bit).

(If you are on a 64bit system and the above doesn't work for you, you might want to try x86-64 (with a dash instead of an underscore) instead).

Installing the required MXE packages

Add MXE's repository to your system's sources:

Debian

echo "deb https://dl.mumble.info/mirror/pkg.mxe.cc/repos/apt stretch main" | sudo tee /etc/apt/sources.list.d/mxe.list

Ubuntu

echo "deb https://dl.mumble.info/mirror/pkg.mxe.cc/repos/apt xenial main" | sudo tee /etc/apt/sources.list.d/mxe.list

Add the repository's key:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 86B72ED9

Update packages index:

sudo apt update

Install the required packages

sudo apt install \
	mxe-${ARCH}-w64-mingw32.static-qtbase \
	mxe-${ARCH}-w64-mingw32.static-qtsvg \
	mxe-${ARCH}-w64-mingw32.static-qttools \
	mxe-${ARCH}-w64-mingw32.static-qttranslations \
	mxe-${ARCH}-w64-mingw32.static-boost \
	mxe-${ARCH}-w64-mingw32.static-protobuf \
	mxe-${ARCH}-w64-mingw32.static-sqlite \
	mxe-${ARCH}-w64-mingw32.static-flac \
 	mxe-${ARCH}-w64-mingw32.static-ogg \
	mxe-${ARCH}-w64-mingw32.static-vorbis \
	mxe-${ARCH}-w64-mingw32.static-libsndfile

Preparing the environment

Clone Mumble's Git repository

git clone https://github.com/mumble-voip/mumble.git
cd mumble

Get the ASIO SDK

wget https://www.steinberg.net/sdk_downloads/asiosdk2.3.zip -P /tmp/
unzip /tmp/asiosdk2.3.zip -d /tmp/
mv /tmp/ASIOSDK2.3 3rdparty/asio

Export environment variable to tell QMake where MXE's protobuf compiler is

export MUMBLE_PROTOC=/usr/lib/mxe/usr/x86_64-pc-linux-gnu/bin/protoc

Add MXE's directory to PATH

PATH=$PATH:/usr/lib/mxe/usr/bin

Build

Run QMake to process the project(s) files

${ARCH}-w64-mingw32.static-qmake-qt5 -recursive CONFIG+="release g15-emulator no-overlay no-bonjour no-elevation no-ice"

Start the build

make