Skip to content

Building for Windows

shuffle2 edited this page Dec 19, 2019 · 50 revisions

Prerequisites

  • Windows 7 SP1 or higher, 64-bit version
  • Visual Studio 2017
    • You can use any version of VS (Community Edition is free)
    • Minimum components to install for building and basic debugging:
      Visual Studio Options
    • Required to get source and build:
      • Git for Windows (Note: The standalone git installer is more recent and is compatible with VS)
      • Latest VC++ toolset (x64)
      • Latest Windows SDK for Desktop C++ x64
    • Recommended (development / debugging)
      • Just-In-Time debugger
      • C++ profiling tools (pulls in graphics debugging features)
      • Profiling tools
      • Testing tools core features
    • Recommended (other)
      • GitHub extension for Visual Studio
  • clang-format 7
    • Install a 7.x version of the LLVM tools from http://releases.llvm.org
    • In VS options > Text Editor > C/C++ > Formatting > General, enable "Use custom clang-format.exe file" and point it to the binary.
    • You could also use Tools\lint.sh via WSL to execute a linux-native version over the dolphin sources

Get and Build Dolphin

Cloning

  1. Open the Team Explorer and choose "Clone" under "Local Git Repositories".
  2. Enter repository URL as it appears on the GitHub project page.
  3. Click Clone to start downloading.
  4. Protips:
    • Enable NTFS compression on the root of your source directory (saves a lot of space with negligible perf overhead).
    • Store the sources on the fastest disk as possible (e.g. fast SSD).

You may of course eschew the Visual Studio git integration and use any method of dealing with git outside of Visual Studio.

Qt Dependencies

  • If you want to build the DolphinQt project, you should get the required dependencies from a submodule provided for Dolphin.
    • In Team Explorer, go to Changes > Actions > Open Command Prompt and execute git submodule update --init --recursive.
  • If you do not care about DolphinQt, you can just right click on the project and click "Unload Project".

Building

  1. Open Source/dolphin-emu.sln.
  2. Select the target you'd like to build:
    Target Example
  3. Press F7 or choose Build > Build Solution from the menu bar.