Difference between revisions of "User:Amki/BuildingWindows"

From Mumble Wiki
Jump to: navigation, search
(and so it continues...)
(it is continuing still...)
Line 56: Line 56:
  
 
If everything went right Windows Explorer should open up the directory named above.
 
If everything went right Windows Explorer should open up the directory named above.
 +
 +
To start building Mumble's dependencies, double-click the "MumbleBuild - cygwin" shortcut. This will open a cygwin terminal inside it type:
 +
cd mumble-releng/buildenv/1.3.x/win32-static
 +
to change directory to the ''build environment's local clone'' of the mumble-releng repository.
 +
{{Elaboration|message=
 +
This is not the same mumble-releng clone than what you used to create the ''%USERPROFILE%\MumbleBuild'' directory. Use the one you checked out first (on your own) to update the ''MumbleBuild'' directory should the need arise.
 +
}}
 +
To make the .bash files inside this directory executable do
 +
chmod +x *.bash
 +
and then start the dependency fetch&compile operation with
 +
./build-all.bash
 +
This operation will take a long time (like you can eat something in between long), depending on your hardware and internet connection.
 +
  
 
=== Visual Leak Detector (optional) ===
 
=== Visual Leak Detector (optional) ===
Line 87: Line 100:
 
  include(winpaths_custom.pri)
 
  include(winpaths_custom.pri)
 
  }
 
  }
 
= 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 compiling.
 
 
Start a new command shell (run ''cmd.exe'')
 
cd \dev
 
prep
 
 
After you run prep make sure a message similar to "Setting environment for using Microsoft Visual Studio 2010 x86 tools" appears.
 
 
{{Notice|message=
 
If you set up a shortcut like described in the section above you can open it and it will run prep automatically.
 
}}
 
 
 
'''''When you later want to compile a dependency or program, always remember to call prep.bat first to set paths correctly.'''''
 
 
  
 
= Build a Mumble installer package =
 
= Build a Mumble installer package =

Revision as of 21:52, 27 May 2015

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


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!

Software you will need

Icons oxygen 48x48 actions view-pim-notes.png
Note:
Install everything to it's default locations except explicitly stated otherwise!
Elaboration: Visual Studio 2013 has version number 12.x!


  • Cygwin, either 64-bit or 32-bit. This is only used to fetch and build dependencies, Mumble itself will not depend on Cygwin. You can accept the default settings of the installer.
  • Windows SDK at the time of writing this, the latest version is the "Microsoft Windows SDK for Windows 7 and .NET Framework 4".
  • DirectX SDK (June 2010) Mumble currently expects to use the free-form DirectX SDK, and not the one distributed with the Windows 8 SDK.
Icons oxygen 48x48 actions view-pim-notes.png
Note:
If you get error S1023 during DirectX installation you must uninstall all versions of the Visual C++ 2010 Redistributable before installing the June 2010 DirectX SDK. See https://support.microsoft.com/en-us/kb/2728613
  • Git, you can use any version of git it only has to be in your PATH variable. (If you insist you can also use a git version from cygwin but it still has to be in your PATH)

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.

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 this directory, then

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

afterwards you have to open your Windows Explorer and navigate to buildenv\1.3.x\win32-static\cygwin-deps and put your cygwin installer .exe file in this directory. The installer should be named like setup-x86[_64].exe.

Then run install-cygwin-deps.cmd inside this folder to fetch the required cygwin packets.

Elaboration: The repository's README has a comprehensive list of packages needed, should you for whatever reason not want to use the script.

Back 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 %USERPROFILE% directory named MumbleBuild inside of it should be a directory named like win32-static-1.3.x-2015-05-25-1234ab7.

If everything went right Windows Explorer should open up the directory named above.

To start building Mumble's dependencies, double-click the "MumbleBuild - cygwin" shortcut. This will open a cygwin terminal inside it type:

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

to change directory to the build environment's local clone of the mumble-releng repository.

Elaboration: This is not the same mumble-releng clone than what you used to create the %USERPROFILE%\MumbleBuild directory. Use the one you checked out first (on your own) to update the MumbleBuild directory should the need arise.

To make the .bash files inside this directory executable do

chmod +x *.bash

and then start the dependency fetch&compile operation with

./build-all.bash

This operation will take a long time (like you can eat something in between long), depending on your hardware and internet connection.


Visual Leak Detector (optional)

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.

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 C:\dev 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 = /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)
}

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.