4.7 KiB
THIS GUIDE IS INTENDED FOR DEVELOPERS ONLY, SUPPORT WILL ONLY BE GIVEN IF YOU'RE A DEVELOPER.
Method I: MSVC Build for Windows
Minimal Dependencies
On Windows, all library dependencies are automatically included within the externals
folder, or can be downloaded on-demand. To build yuzu, you need to install:
- Visual Studio 2019 Community - Make sure to select C++ support in the installer.
- CMake - Used to generate Visual Studio project files. Does not matter if either 32-bit or 64-bit version is installed.
- Conan - Installs the dependencies when cmake configures the project.
- Git - We recommend Git for Windows.
- While installing Git Bash, you should tell it to include Git in your system path. (Choose the "Git from the command line and also from 3rd-party software" option.) If you missed that, don't worry, you'll just have to manually tell CMake where your git.exe is, since it's used to include version info into the built executable.
Cloning yuzu with Git
Master:
git clone --recursive https://github.com/yuzu-emu/yuzu.git
cd yuzu
Mainline (no assert):
git clone --recursive https://github.com/yuzu-emu/yuzu-mainline.git
cd yuzu-mainline
- (Note: yuzu by default downloads to
C:\Users\<user-name>\yuzu
(Master) orC:\Users\<user-name>\yuzu-mainline
(Mainline)
Building
-
Open the CMake GUI application and point it to the
yuzu
(Master) oryuzu-mainline
(Mainline) directory. -
For the build directory, use a
/build
subdirectory inside the source directory or some other directory of your choice. (Tell CMake to create it.) -
Click the "Configure" button and choose
Visual Studio 16 2019
, withx64
for the optional platform.- (Note: If you used GitHub's own app to clone, run
git submodule update --init --recursive
to get the remaining dependencies)
- (Note: If you used GitHub's own app to clone, run
-
Click "Generate" to create the project files.
-
Open the solution file
yuzu.sln
in Visual Studio 2019, which is located in the build folder. -
Depending if you want a graphical user interface or not (
yuzu
has the graphical user interface, whileyuzu-cmd
doesn't), selectyuzu
oryuzu-cmd
in the Solution Explorer, right-click andSet as StartUp Project
. -
Select the appropriate build type, Debug for debug purposes or Release for performance (in case of doubt choose Release).
-
Right-click the project you want to build and press Build in the submenu or press F5.
Feel free to ask us in the IRC channel #yuzu-emu @ Freenode or on Discord if you have issues.
Method II: MinGW-w64 Build with MSYS2
Prerequisites to install
-
Make sure to follow the instructions and update to the latest version by running
pacman -Syu
as many times as needed.
Install yuzu dependencies for MinGW-w64
- Open the
MSYS2 MinGW 64-bit
(mingw64.exe) shell - Download and install all dependencies using:
pacman -S mingw-w64-x86_64-toolchain mingw-w64-x86_64-qt5 mingw-w64-x86_64-SDL2 mingw-w64-x86_64-cmake make git python2
Clone the yuzu repository with Git
Master:
git clone --recursive https://github.com/yuzu-emu/yuzu.git
cd yuzu
Mainline (no assert):
git clone --recursive https://github.com/yuzu-emu/yuzu-mainline.git
cd yuzu-mainline
Run the following commands to build yuzu (dynamically linked build)
mkdir build && cd build
cmake -G "MSYS Makefiles" -DCMAKE_MAKE_PROGRAM=mingw32-make -DCMAKE_BUILD_TYPE=Release ..
mingw32-make -j4
# test yuzu out with
./bin/yuzu.exe
- (Note: This build is not a static build meaning that you need to include all of the DLLs with the .exe in order to use it!)
Building without Qt (Optional)
Doesn't require the rather large Qt dependency, but you will lack a GUI frontend:
- Pass the
-DENABLE_QT=no
flag to cmake
Building from the command line with MSVC
git clone --recursive https://github.com/yuzu-emu/yuzu
cd yuzu
mkdir build
cd build
cmake .. -G "Visual Studio 16 2019" -A x64
cmake --build .