libmumble-legacy icon indicating copy to clipboard operation
libmumble-legacy copied to clipboard

libmumble is an attempt at writing a cross-platform C++ library for implementing Mumble clients

What is libmumble?

libmumble is an attempt at writing a cross-platform C++ library for implementing Mumble clients. The initial client of libmumble is MumbleKit, the Objective-C Mumble framework for iOS and Mac OS X.

Building libmumble on Unix-like systems

To build libmumble and run its test suite (the only application that's really worth running right now), you can use the test.bash script in the root of the source tree.

Running the test.bash script is simple:

$ ./test.bash

This will generate build scripts suitable for your environment (Ninja, Make or an Xcode project on Macs). It'll perform a build and execute the libmumble-test binary, which runs the libmumble test suite.

Building libmumble for Windows

To build libmumble on Windows, you'll need Bash, Perl and Python.

  • For Python, we recommend a native Windows install of Python 2.7, and C:\Python27 in your %PATH%.
  • For Bash and Perl, we recommend that they're acquired through Cygwin.
  • We also recommend that your Cygwin bin folder is in your global %PATH%, since the generated project files will depend on there being 'bash' and 'perl' executables readily available.

Besides the above, you'll also need a copy of YASM to build OpenSSL with assembly optimizations. Download the appropriate Windows executable from http://yasm.tortall.net/Download.html and copy it to 3rdparty/yasm/yasm.exe.

When you're ready, simply execute:

c:\users\foo\libmumble> test.bat

From the root of the source tree. This will generate the necessary Visual Studio projet files, run msbuild on the generated solution, and finally run the libmumble test suite.

Note that by default, test.bat will build an x64 binary on Windows with OpenSSL assembly enabled. If you wish to target something else, you can change the values of -Dopenssl_asm=gnuas-x86_64 -Dtarget_arch=x64. For example, to build for 32-bit x86 with ASM, you can use the following set of options:

-Dopenssl_asm= -Dtarget_arch=ia32

Don't have Visual Studio 2012? For now, gyp's MSVS target is set in test.bat, but please be aware that we've only tested the build using Visual Studio 2012.

Building libmumble for Android

It's possible to build libmumble for Android. Currently, the only thing that really runs is the libmumble-test executable.

Can you use the library in an app? Probably. But I don't know how to hook it up. Feel free to contribute, if this is something you need urgently.

To build and test, run: $ ./test.bash libmumble-test android from the root of the source tree.

This will build and run (via adb) the libmumble-test executable on a conneted Android device. You should probably only have a single device connected at a time for this to work - the script isn't too considerate of other scenarios.

Prerequisites

Running the libmumble-test binary on Android requires a device with a /usr/bin/su binary installed, allowing the test.bash script to gain root privileges in order to mount a tmpfs file system on which the libmumble test data and test executable will live and execute from.

The test.bash script also expects that you have the <ANDROID_SDK>/platform-tools and <ANDROID_NDK> paths in your PATH environment variable.

NDK prerequisites

If you're using NDK r8e, you will need to patch your local NDK with the following CL to be able to build libprotobuf-lite:

https://android-review.googlesource.com/#/c/54201/

Building libmumble for iOS

It's also possible to build libmumble for iOS. You can generate an .xcodeproj hierarchy by running ./build/iphoneos/generate.bash, and the generated Xcode project files will be written to

build/iphoneos/xcode

To build the libmumble-test app (the only app that really runs at the moment), simply open libmumble.xcodeproj, select the 'libmumble-test' target, and your target device in the target/device picker, and click Run.

Note: You may need to ensure you have a provisioning profile for 'info.mumble.libmumble-test' installed before trying this. If you can't create a provisioning profile with that name, feel free to change the bundle identifier in build/iphoneos/test-bundle/Info.plist.