User Tools

Site Tools


compiling_on_windows

(If you're looking to make an installable release, go to this page.)

Building Mixxx on Windows

Build 32bit version of Mixxx

Programs to install

  • Visual Studio 13 for Windows Desktop. You need a Microsoft account.
  • If you install Visual Studio 2013 or newer, it comes with the latest Windows SDK. The following links are only needed if you have a version of Visual Studio older than this or if you're building for Windows XP.
    • Or the Windows 7.1 (& .NET 4) SDK which is smaller, newer and includes the compilers (so you may not need Visual Studio above if you're just looking to build Mixxx from a command line.) This one has a few bugs however (see below) and is missing files needed to build 64-bit versions if used without Visual Studio.)
  • Python 2.7.x Install for user only! Otherwise scons can't find the installation
  • Install CMake 3.3.x with default options. The CMake directory does not need to be added to the PATH environment variable.
  • A Git client like Git for Windows, TortoiseGit or the github windows client (featuring a unix like command line)

Prepare build environment

  1. Add to or create the following system environment variables (HowTo,) adjusting the paths to match where you actually installed the above.
    PATH = ;C:\Python27;C:\Python27\Scripts # append to the existing variable
  2. There is a bug in at least the Windows 7.1 SDK where it looks in the wrong place for the SDK path. (You will get errors like fatal error C1083: Cannot open include file: 'windows.h': No such file or directory unless this is corrected.)
    1. As an administrator, edit the file C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools\VCVarsQueryRegistry.bat and examine the regquery path under the section :GetWindowsSdkDirHelper (%1 is replaced by HKEY_LOCAL_MACHINE at runtime.)
    2. Run regedit and browse to that path to make sure it exists and that the version number is correct.
    3. If not, adjust the path in the file to match what you found in the registry. (E.g. If you've installed SDK 7.1, change the v7.0A to v7.1 in the regquery path.

Download mixxx dependencies

  1. Clone the Mixxx buildserver repository. Remember the folder to which the repository was saved. We will refer to that folder as WINLIB_PATH later.
  2. In the buildserver repository, checkout the windows_environment branch
  3. Edit %WINLIB_PATH%\build_environment.bat and change the following lines:
    1. SET MSVC_PATH=<path containing the vcvarsall.bat file>
    2. If you're using only the Windows 7.1 SDK (no Visual Studio,) SET MSBUILD=msbuild /p:PlatformToolset=Windows7.1SDK
      • If using the VC++ Build Tools, you may need to add/replace /p:VCTargetsPath=“C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\\”
  4. Download the latest Qt 4.x Sources. Unpack the zip archive into WINLIB_PATH\build
  5. Download the ASIO SDK. You will need a free steinberg development account to do that. Extract the files and rename the directory to remove the version number, so ASIOSDK2.3 becomes ASIOSDK. Move ASIOSDK to WINLIB_PATH\build\pa_stable_v19_20140130\src\hostapi\asio\.

Build dependencies

Start the Windows SDK command prompt (E.g. Start Menu\Microsoft Windows SDK v.7.0\CMD Shell) and change into the WINLIB_PATH directory. Type:

build_environment x86 Release

This step may take a while depending on your computer.

Download mixxx-sources

  1. Clone the Mixxx repository. Remember the folder to which the repository was saved. We will refer to that folder as MIXXX_REPO later.
  2. Start the Windows SDK command prompt (E.g. Start Menu\Microsoft Windows SDK v.7.0\CMD Shell) and change into the MIXXX_REPO directory.
  3. create a file called build.bat with the following content:
REM Clean up after old builds.
del /q /f *.exe
rmdir /s /q dist32
rmdir /s /q dist64

REM XP Compatibility requires the v7.1A SDK
set MSSDK_DIR="C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A"

REM this can be either release or debug. For development you want to use debug
set BUILD_TYPE=release

REM This determines if you build a 32bit or 64bit version of mixxx. 
REM 32bit = i386, 64bit = amd64
set ARCHITECTURE=amd64

REM set this to the folder where you built the dependencies
set WINLIB_PATH="**Enter Path to WINLIB_PATH**"

if "%ARCHITECTURE%" == "i386" (
  set TARGET_MACHINE=x86
  set VCVARS_ARCH=x86
) else ( 
  set TARGET_MACHINE=amd64
  set VCVARS_ARCH=x86_amd64
)

REM Adjust to your environment
call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" %VCVARS_ARCH%

REM Use all CPU cores, allow multiple writers to .pdb file
set CL=/MP

REM Set the -j value to the number of CPU cores (not HT "virtual" cores but physical cores) you have
scons -j2 winlib=%WINLIB_PATH% qtdir=%WINLIB_PATH%\build\qt-everywhere-opensource-src-4.8.6 hss1394=1 mediafoundation=1 opus=1 build=%BUILD_TYPE% machine=%TARGET_MACHINE% toolchain=msvs virtualize=0 test=1 sqlitedll=0 mssdk_dir=%MSSDK_DIR% force32=0

This script will setup the build environment and call scons with the appropriate flags. You have to edit the WINLIB_PATH variable and set it to the absolute path of the folder where you compiled the dependencies for mixxx. Then type:

build.bat

NOTE : if Mixxx compilation complains that libtag and chromaprint are not available, apply the following workaround : http://sourceforge.net/p/mixxx/mailman/message/32981948/ Remove the entire <ItemGroup> that contains the cmake invocations in tag.vcxproj and chromaprint vcxproj and rebuild your build env

Build 64bit version of Mixxx

You have to follow the above guide with two changes.

  1. Build the dependencies with:
    build_environment x64 Release
  2. Use set ARCHITECTURE=amd64 and force32=0 in build.bat

WARNING: DO NOT mix 32 and 64 bits build in the same CMD Shell window or you will have undetermined results. If you need 32 and 64 bits environments together, use different terminal window for 32 bits and 64 bits build_environment and mixxx compilation

Build debug version of Mixxx

You have to follow the above guide with two changes.

  1. Build the dependencies with:
    build_environment xxx Debug
  2. Use set BUILD_TYPE=debug in build.bat
Translations of this page:
compiling_on_windows.txt · Last modified: 2016/09/28 17:18 by pegasus