mirror of
https://github.com/citra-emu/citra.git
synced 2024-12-24 18:40:05 +00:00
Page:
Building for Windows
Pages
AES Keys
Archive of 3DS Documentation
Archive of 3DS Tests
Building for Android
Building for Linux
Building for OpenBSD
Building for Windows
Building for macOS
CPU
Citra Android user data and storage
Citra Legacy Builds
Citra Web Service
Common Issues
Compatibility List
Contributing
Default Keyboard Bindings
Developer Information
Dumping Config Savegame from a 3DS Console
Dumping Extra Data from a 3DS Console
Dumping Game Cartridges
Dumping Installed Titles
Dumping Save Data from a 3DS Console
Dumping System Archives and the Shared Fonts from a 3DS Console
Dumping Updates and DLCs
FAQ
Home
Installing FFmpeg for the Video Dumper
Issue Labels
Lifetime of an LLE library applet
Log Filters
Set Up APK Signing in Bitrise
Stack Trace Guide for Citra
Typical Git Workflow
User Directory
Using a Controller or Android Phone for Motion or Touch Input
56
Building for Windows
Steveice10 edited this page 2024-02-26 10:27:57 -08:00
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 Citra, you simply need to install:
- Visual Studio 2022 - Make sure to select C++ support in the installer.
- CMake - Used to generate Visual Studio project files.
- 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 Citra in Git:
Master:
git clone --recursive https://github.com/citra-emu/citra.git
cd citra
Canary:
git clone --recursive https://github.com/citra-emu/citra-canary.git
cd citra-canary
(Note: Citra by default downloads to C:\Users\<user-name>\citra
(Master) or C:\Users\<user-name>\citra-canary
(Canary)
Building
- Open the CMake GUI application and point it to the
citra
(Master) orcitra-canary
(Canary) 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 17 2022
, withx64
for the optional platform.
* NOTE: If you get errors like "XXX does not contain a CMakeLists.txt file" at this step, it means you didn't use the `--recursive` flag in the clone step, or you used tools other than the git CLI. Please run "git submodule update --init --recursive" to get remaining dependencies.
- Click "Generate" to create the project files.
- Open the solution file citra.sln in Visual Studio 2022, which is located in the build folder.
- Depending on which frontend (SDL2 or Qt) you want to build or run, select "citra" or "citra-qt" in the Solution Explorer, right-click and "Set as Startup Project".
- Select the appropriate build type, Debug for debug purposes or Release for performance (in case of doubt choose the latter).
- Press F5 or select Build → Rebuild Solution in the menu.
- NOTE: Please refer to Common Issues if any errors. If you did not find a solution feel free to ask us in the IRC channel: #citra @ Freenode.
Clang 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 Citra dependencies
- Open the "MSYS2 Clang64" (clang64.exe) shell
- Download and install all dependencies using:
pacman -S mingw-w64-clang-x86_64-{gcc,qt6,cmake} make git
Clone the Citra repository with git.
git clone --recursive https://github.com/citra-emu/citra.git
cd citra
Run the following commands to build Citra (dynamic linked build)
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make -j4
# test Citra out with
./bin/citra-qt.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