Browse Source
[docs] refactor: full rewrite, generalization + dedup (#488)
[docs] refactor: full rewrite, generalization + dedup (#488)
"docs but awesome" Combines most of the stuff that was repeated thrice over verbatim into a single common Build Instructions page, with additional caveats marked elsewhere. Prettifies some stuff too because why not. cc: @Lizzie @DraVee @MaranBr @SDK-Chan Co-authored-by: Caio Oliveira <caiooliveirafarias0@gmail.com> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/488 Reviewed-by: Lizzie <lizzie@eden-emu.dev> Reviewed-by: MaranBr <maranbr@eden-emu.dev>pull/2524/head
No known key found for this signature in database
GPG Key ID: 425ACD2D4830EBC6
18 changed files with 573 additions and 650 deletions
-
8README.md
-
160docs/Build.md
-
2docs/CPM.md
-
52docs/Caveats.md
-
214docs/Deps.md
-
24docs/Development.md
-
69docs/Options.md
-
10docs/README.md
-
7docs/build/Android.md
-
81docs/build/FreeBSD.md
-
138docs/build/Linux.md
-
10docs/build/OpenBSD.md
-
51docs/build/Solaris.md
-
259docs/build/Windows.md
-
78docs/build/macOS.md
-
BINdocs/img/creator-1.png
-
31docs/scripts/Linux.md
-
29docs/scripts/Windows.md
@ -0,0 +1,160 @@ |
|||||
|
# Building Eden |
||||
|
|
||||
|
> [!WARNING] |
||||
|
> This guide is intended for developers ONLY. If you are not a developer or packager, you are unlikely to receive support. |
||||
|
|
||||
|
This is a full-fledged guide to build Eden on all supported platforms. |
||||
|
|
||||
|
## Dependencies |
||||
|
First, you must [install some dependencies](Deps.md). |
||||
|
|
||||
|
## Clone |
||||
|
Next, you will want to clone Eden via the terminal: |
||||
|
|
||||
|
```sh |
||||
|
git clone https://git.eden-emu.dev/eden-emu/eden.git |
||||
|
cd eden |
||||
|
``` |
||||
|
|
||||
|
Or use Qt Creator (Create Project -> Import Project -> Git Clone). |
||||
|
|
||||
|
## Android |
||||
|
|
||||
|
Android has a completely different build process than other platforms. See its [dedicated page](build/Android.md). |
||||
|
|
||||
|
## Initial Configuration |
||||
|
|
||||
|
If the configure phase fails, see the `Troubleshooting` section below. Usually, as long as you followed the dependencies guide, the defaults *should* successfully configure and build. |
||||
|
|
||||
|
### Qt Creator |
||||
|
|
||||
|
This is the recommended GUI method for Linux, macOS, and Windows. |
||||
|
|
||||
|
<details> |
||||
|
<summary>Click to Open</summary> |
||||
|
|
||||
|
> [!WARNING] |
||||
|
> On MSYS2, to use Qt Creator you are recommended to *also* install Qt from the online installer, ensuring to select the "MinGW" version. |
||||
|
|
||||
|
Open the CMakeLists.txt file in your cloned directory via File -> Open File or Project (Ctrl+O), if you didn't clone Eden via the project import tool. |
||||
|
|
||||
|
Select your desired "kit" (usually, the default is okay). RelWithDebInfo or Release is recommended: |
||||
|
|
||||
|
 |
||||
|
|
||||
|
Hit "Configure Project", then wait for CMake to finish configuring (may take a while on Windows). |
||||
|
|
||||
|
</details> |
||||
|
|
||||
|
### Command Line |
||||
|
|
||||
|
This is recommended for *BSD, Solaris, Linux, and MSYS2. MSVC is possible, but not recommended. |
||||
|
|
||||
|
<details> |
||||
|
<summary>Click to Open</summary> |
||||
|
|
||||
|
Note that CMake must be in your PATH, and you must be in the cloned Eden directory. On Windows, you must also set up a Visual C++ development environment. This can be done by running `C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat` in the same terminal. |
||||
|
|
||||
|
Recommended generators: |
||||
|
|
||||
|
- MSYS2: `MSYS Makefiles` |
||||
|
- MSVC: Install **[ninja](https://ninja-build.org/)** and use `Ninja`, OR use `Visual Studio 17 2022` |
||||
|
- macOS: `Ninja` (preferred) or `Xcode` |
||||
|
- Others: `Ninja` (preferred) or `UNIX Makefiles` |
||||
|
|
||||
|
BUILD_TYPE should usually be `Release` or `RelWithDebInfo` (debug symbols--compiled executable will be large). If you are using a debugger and annoyed with stuff getting optimized out, try `Debug`. |
||||
|
|
||||
|
Also see the [Options](Options.md) page for additional CMake options. |
||||
|
|
||||
|
```sh |
||||
|
cmake -S . -B build -G "GENERATOR" -DCMAKE_BUILD_TYPE=<BUILD_TYPE> -DYUZU_TESTS=OFF |
||||
|
``` |
||||
|
|
||||
|
If you are on Windows and prefer to use Clang: |
||||
|
|
||||
|
```sh |
||||
|
cmake -S . -B build -G "GENERATOR" -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl |
||||
|
``` |
||||
|
|
||||
|
</details> |
||||
|
|
||||
|
### [CLion](https://www.jetbrains.com/clion/) |
||||
|
|
||||
|
<details> |
||||
|
<summary>Click to Open</summary> |
||||
|
|
||||
|
* Clone the Repository: |
||||
|
|
||||
|
<img src="https://user-images.githubusercontent.com/42481638/216899046-0d41d7d6-8e4d-4ed2-9587-b57088af5214.png" width="500"> |
||||
|
<img src="https://user-images.githubusercontent.com/42481638/216899061-b2ea274a-e88c-40ae-bf0b-4450b46e9fea.png" width="500"> |
||||
|
<img src="https://user-images.githubusercontent.com/42481638/216899076-0e5988c4-d431-4284-a5ff-9ecff973db76.png" width="500"> |
||||
|
|
||||
|
--- |
||||
|
|
||||
|
### Building & Setup |
||||
|
|
||||
|
* Once Cloned, You will be taken to a prompt like the image below: |
||||
|
|
||||
|
<img src="https://user-images.githubusercontent.com/42481638/216899092-3fe4cec6-a540-44e3-9e1e-3de9c2fffc2f.png" width="500"> |
||||
|
|
||||
|
* Set the settings to the image below: |
||||
|
* Change `Build type: Release` |
||||
|
* Change `Name: Release` |
||||
|
* Change `Toolchain Visual Studio` |
||||
|
* Change `Generator: Let CMake decide` |
||||
|
* Change `Build directory: build` |
||||
|
|
||||
|
<img src="https://user-images.githubusercontent.com/42481638/216899164-6cee8482-3d59-428f-b1bc-e6dc793c9b20.png" width="500"> |
||||
|
|
||||
|
* Click OK; now Clion will build a directory and index your code to allow for IntelliSense. Please be patient. |
||||
|
* Once this process has been completed (No loading bar bottom right), you can now build eden |
||||
|
* In the top right, click on the drop-down menu, select all configurations, then select eden |
||||
|
|
||||
|
<img src="https://user-images.githubusercontent.com/42481638/216899226-975048e9-bc6d-4ec1-bc2d-bd8a1e15ed04.png" height="500" > |
||||
|
|
||||
|
* Now run by clicking the play button or pressing Shift+F10, and eden will auto-launch once built. |
||||
|
|
||||
|
<img src="https://user-images.githubusercontent.com/42481638/216899275-d514ec6a-e563-470e-81e2-3e04f0429b68.png" width="500"> |
||||
|
</details> |
||||
|
|
||||
|
## Troubleshooting |
||||
|
|
||||
|
If your initial configure failed: |
||||
|
- *Carefully* re-read the [dependencies guide](Deps.md) |
||||
|
- Clear the CPM cache (`.cache/cpm`) and CMake cache (`<build directory>/CMakeCache.txt`) |
||||
|
- Evaluate the error and find any related settings |
||||
|
- See the [CPM docs](CPM.md) to see if you may need to forcefully bundle any packages |
||||
|
|
||||
|
Otherwise, feel free to ask for help in Revolt or Discord. |
||||
|
|
||||
|
## Caveats |
||||
|
|
||||
|
Many platforms have quirks, bugs, and other fun stuff that may cause issues when building OR running. See the [Caveats page](Caveats.md) before continuing. |
||||
|
|
||||
|
## Building & Running |
||||
|
|
||||
|
### Qt Creator |
||||
|
|
||||
|
Simply hit Ctrl+B, or the "hammer" icon in the bottom left. To run, hit the "play" icon, or Ctrl+R. |
||||
|
|
||||
|
### Command Line |
||||
|
|
||||
|
If you are not on Windows and are using the `UNIX Makefiles` generator, you must also add `-j$(nproc)` to this command. |
||||
|
|
||||
|
``` |
||||
|
cmake --build build |
||||
|
``` |
||||
|
|
||||
|
Your compiled executable will be in: |
||||
|
- `build/bin/eden.exe` for Windows, |
||||
|
- `build/bin/eden.app/Contents/MacOS/eden` for macOS, |
||||
|
- and `build/bin/eden` for others. |
||||
|
|
||||
|
## Scripts |
||||
|
|
||||
|
Some platforms have convenience scripts provided for building. |
||||
|
|
||||
|
- **[Linux](scripts/Linux.md)** |
||||
|
- **[Windows](scripts/Windows.md)** |
||||
|
|
||||
|
macOS scripts will come soon. |
||||
@ -0,0 +1,52 @@ |
|||||
|
# Caveats |
||||
|
|
||||
|
## Arch Linux |
||||
|
|
||||
|
- httplib AUR package is broken. Set `httplib_FORCE_BUNDLED=ON` if you have it installed. |
||||
|
- Eden is also available as an [AUR package](https://aur.archlinux.org/packages/eden-git). If you are unable to build, either use that or compare your process to the PKGBUILD. |
||||
|
|
||||
|
## Gentoo Linux |
||||
|
|
||||
|
Do not use the system sirit or xbyak packages. |
||||
|
|
||||
|
## macOS |
||||
|
|
||||
|
macOS is largely untested. Expect crashes, significant Vulkan issues, and other fun stuff. |
||||
|
|
||||
|
## Solaris |
||||
|
|
||||
|
Qt Widgets appears to be broken. For now, add `-DENABLE_QT=OFF` to your configure command. In the meantime, a Qt Quick frontend is in the works--check back later! |
||||
|
|
||||
|
This is needed for some dependencies that call cc directly (tz): |
||||
|
|
||||
|
```sh |
||||
|
echo '#!/bin/sh' >cc |
||||
|
echo 'gcc $@' >>cc |
||||
|
chmod +x cc |
||||
|
export PATH="$PATH:$PWD" |
||||
|
``` |
||||
|
|
||||
|
Default MESA is a bit outdated, the following environment variables should be set for a smoother experience: |
||||
|
```sh |
||||
|
export MESA_GL_VERSION_OVERRIDE=4.6 |
||||
|
export MESA_GLSL_VERSION_OVERRIDE=460 |
||||
|
export MESA_EXTENSION_MAX_YEAR=2025 |
||||
|
export MESA_DEBUG=1 |
||||
|
export MESA_VK_VERSION_OVERRIDE=1.3 |
||||
|
# Only if nvidia/intel drm drivers cause crashes, will severely hinder performance |
||||
|
export LIBGL_ALWAYS_SOFTWARE=1 |
||||
|
``` |
||||
|
|
||||
|
- Modify the generated ffmpeg.make (in build dir) if using multiple threads (base system `make` doesn't use `-j4`, so change for `gmake`). |
||||
|
- If using OpenIndiana, due to a bug in SDL2's CMake configuration, audio driver defaults to SunOS `<sys/audioio.h>`, which does not exist on OpenIndiana. Using external or bundled SDL2 may solve this. |
||||
|
- System OpenSSL generally does not work. Instead, use `-DYUZU_USE_BUNDLED_OPENSSL=ON` to use a bundled static OpenSSL, or build a system dependency from source. |
||||
|
|
||||
|
## OpenBSD |
||||
|
|
||||
|
After configuration, you may need to modify `externals/ffmpeg/CMakeFiles/ffmpeg-build/build.make` to use `-j$(nproc)` instead of just `-j`. |
||||
|
|
||||
|
## FreeBSD |
||||
|
|
||||
|
Eden is not currently available as a port on FreeBSD, though it is in the works. For now, the recommended method of usage is to compile it yourself. |
||||
|
|
||||
|
The available OpenSSL port (3.0.17) is out-of-date, and using a bundled static library instead is recommended; to do so, add `-DYUZU_USE_BUNDLED_OPENSSL=ON` to your CMake configure command. |
||||
@ -0,0 +1,214 @@ |
|||||
|
# Dependencies |
||||
|
|
||||
|
To build Eden, you MUST have a C++ compiler. |
||||
|
* On Linux, this is usually [GCC](https://gcc.gnu.org/) 11+ or [Clang](https://clang.llvm.org/) v14+ |
||||
|
- GCC 12 also requires Clang 14+ |
||||
|
* On Windows, this is either: |
||||
|
- **[MSVC](https://visualstudio.microsoft.com/downloads/)**, |
||||
|
* *A convenience script to install the **minimal** version (Visual Build Tools) is provided in `.ci/windows/install-msvc.ps1`* |
||||
|
- clang-cl - can be downloaded from the MSVC installer, |
||||
|
- or **[MSYS2](https://www.msys2.org)** |
||||
|
* On macOS, this is Apple Clang |
||||
|
- This can be installed with `xcode-select --install` |
||||
|
|
||||
|
The following additional tools are also required: |
||||
|
|
||||
|
* **[CMake](https://www.cmake.org/)** 3.22+ - already included with the Android SDK |
||||
|
* **[Git](https://git-scm.com/)** for version control |
||||
|
- **[Windows installer](https://gitforwindows.org)** |
||||
|
* On Windows, you must install the **[Vulkan SDK](https://vulkan.lunarg.com/sdk/home#windows)** as well |
||||
|
- *A convenience script to install the latest SDK is provided in `.ci/windows/install-vulkan-sdk.ps1`* |
||||
|
|
||||
|
If you are on desktop and plan to use the Qt frontend, you *must* install Qt 6, and optionally Qt Creator (the recommended IDE for building) |
||||
|
* On Linux, *BSD and macOS, this can be done by the package manager |
||||
|
- If you wish to use Qt Creator, append `qtcreator` or `qt-creator` to the commands seen below. |
||||
|
* MSVC/clang-cl users on Windows must install through the [official installer](https://www.qt.io/download-qt-installer-oss) |
||||
|
* Linux and macOS users may choose to use the installer as well. |
||||
|
* MSYS2 can also install Qt 6 via the package manager |
||||
|
|
||||
|
If you are on Windows and NOT building with MSYS2, you may go [back home](Build.md) and continue. |
||||
|
|
||||
|
## Externals |
||||
|
The following are handled by Eden's externals: |
||||
|
|
||||
|
* [FFmpeg](https://ffmpeg.org/) (should use `-DYUZU_USE_EXTERNAL_FFMPEG=ON`) |
||||
|
* [SDL2](https://www.libsdl.org/download-2.0.php) 2.0.18+ (should use `-DYUZU_USE_EXTERNAL_SDL2=ON` OR `-DYUZU_USE_BUNDLED_SDL2=ON` to reduce compile time) |
||||
|
|
||||
|
All other dependencies will be downloaded and built by [CPM](https://github.com/cpm-cmake/CPM.cmake/) if `YUZU_USE_CPM` is on, but will always use system dependencies if available (UNIX-like only): |
||||
|
|
||||
|
* [Boost](https://www.boost.org/users/download/) 1.57.0+ |
||||
|
* [Catch2](https://github.com/catchorg/Catch2) 3.0.1 if `YUZU_TESTS` or `DYNARMIC_TESTS` are on |
||||
|
* [fmt](https://fmt.dev/) 8.0.1+ |
||||
|
* [lz4](http://www.lz4.org) |
||||
|
* [nlohmann\_json](https://github.com/nlohmann/json) 3.8+ |
||||
|
* [OpenSSL](https://www.openssl.org/source/) 1.1.1+ |
||||
|
* [ZLIB](https://www.zlib.net/) 1.2+ |
||||
|
* [zstd](https://facebook.github.io/zstd/) 1.5+ |
||||
|
* [enet](http://enet.bespin.org/) 1.3+ |
||||
|
* [Opus](https://opus-codec.org/) 1.3+ |
||||
|
* [MbedTLS](https://github.com/Mbed-TLS/mbedtls) 3+ |
||||
|
|
||||
|
Vulkan 1.3.274+ is also needed: |
||||
|
* [VulkanUtilityLibraries](https://github.com/KhronosGroup/Vulkan-Utility-Libraries) |
||||
|
* [VulkanHeaders](https://github.com/KhronosGroup/Vulkan-Headers) |
||||
|
* [SPIRV-Tools](https://github.com/KhronosGroup/SPIRV-Tools) |
||||
|
* [SPIRV-Headers](https://github.com/KhronosGroup/SPIRV-Headers) |
||||
|
|
||||
|
Certain other dependencies will be fetched by CPM regardless. System packages *can* be used for these libraries, but many are either not packaged by most distributions OR have issues when used by the system: |
||||
|
|
||||
|
* [SimpleIni](https://github.com/brofield/simpleini) |
||||
|
* [DiscordRPC](https://github.com/eden-emulator/discord-rpc) |
||||
|
* [cubeb](https://github.com/mozilla/cubeb) |
||||
|
* [libusb](https://github.com/libusb/libusb) |
||||
|
* [VulkanMemoryAllocator](https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator) |
||||
|
* [sirit](https://github.com/eden-emulator/sirit) |
||||
|
* [httplib](https://github.com/yhirose/cpp-httplib) - if `ENABLE_QT_UPDATE_CHECKER` or `ENABLE_WEB_SERVICE` are on |
||||
|
* [cpp-jwt](https://github.com/arun11299/cpp-jwt) 1.4+ - if `ENABLE_WEB_SERVICE` is on |
||||
|
* [unordered-dense](https://github.com/martinus/unordered_dense) |
||||
|
* [mcl](https://github.com/azahar-emu/mcl) - subject to removal |
||||
|
|
||||
|
On amd64: |
||||
|
* [xbyak](https://github.com/herumi/xbyak) - 7.22 or earlier is recommended |
||||
|
* [zycore](https://github.com/zyantific/zycore-c) |
||||
|
* [zydis](https://github.com/zyantific/zydis) 4+ |
||||
|
* Note: zydis and zycore-c MUST match. Using one as a system dependency and the other as a bundled dependency WILL break things |
||||
|
|
||||
|
On aarch64 OR if `DYNARMIC_TESTS` is on: |
||||
|
* [oaknut](https://github.com/merryhime/oaknut) 2.0.1+ |
||||
|
|
||||
|
On riscv64: |
||||
|
* [biscuit](https://github.com/lioncash/biscuit) 0.9.1+ |
||||
|
|
||||
|
## Commands |
||||
|
|
||||
|
These are commands to install all necessary dependencies on various Linux and BSD distributions, as well as macOS. Always review what you're running before you hit Enter! |
||||
|
|
||||
|
Click on the arrows to expand. |
||||
|
|
||||
|
<details> |
||||
|
<summary>Arch Linux</summary> |
||||
|
|
||||
|
```sh |
||||
|
sudo pacman -Syu --needed base-devel boost catch2 cmake enet ffmpeg fmt git glslang libzip lz4 mbedtls ninja nlohmann-json openssl opus qt6-base qt6-multimedia sdl2 zlib zstd zip unzip zydis zycore vulkan-headers vulkan-utility-libraries libusb spirv-tools spirv-headers |
||||
|
``` |
||||
|
|
||||
|
* Building with QT Web Engine requires `qt6-webengine` as well. |
||||
|
* Proper Wayland support requires `qt6-wayland` |
||||
|
* GCC 11 or later is required. |
||||
|
</details> |
||||
|
|
||||
|
<details> |
||||
|
<summary>Ubuntu, Debian, Mint Linux</summary> |
||||
|
|
||||
|
```sh |
||||
|
sudo apt-get install autoconf cmake g++ gcc git glslang-tools libasound2 libboost-context-dev libglu1-mesa-dev libhidapi-dev libpulse-dev libtool libudev-dev libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-render-util0 libxcb-xinerama0 libxcb-xkb1 libxext-dev libxkbcommon-x11-0 mesa-common-dev nasm ninja-build qt6-base-private-dev libmbedtls-dev catch2 libfmt-dev liblz4-dev nlohmann-json3-dev libzstd-dev libssl-dev libavfilter-dev libavcodec-dev libswscale-dev pkg-config zlib1g-dev libva-dev libvdpau-dev qt6-tools-dev libzydis-dev zydis-tools libzycore-dev |
||||
|
``` |
||||
|
|
||||
|
* Ubuntu 22.04, Linux Mint 20, or Debian 12 or later is required. |
||||
|
* To enable QT Web Engine, add `-DYUZU_USE_QT_WEB_ENGINE=ON` when running CMake. |
||||
|
</details> |
||||
|
|
||||
|
<details> |
||||
|
<summary>Fedora Linux</summary> |
||||
|
|
||||
|
```sh |
||||
|
sudo dnf install autoconf ccache cmake fmt-devel gcc{,-c++} glslang hidapi-devel json-devel libtool libusb1-devel libzstd-devel lz4-devel nasm ninja-build openssl-devel pulseaudio-libs-devel qt6-linguist qt6-qtbase{-private,}-devel qt6-qtwebengine-devel qt6-qtmultimedia-devel speexdsp-devel wayland-devel zlib-devel ffmpeg-devel libXext-devel |
||||
|
``` |
||||
|
|
||||
|
* Force system libraries via CMake arguments: |
||||
|
* SDL2: `-DYUZU_USE_BUNDLED_SDL2=OFF -DYUZU_USE_EXTERNAL_SDL2=OFF` |
||||
|
* FFmpeg: `-DYUZU_USE_EXTERNAL_FFMPEG=OFF` |
||||
|
* [RPM Fusion](https://rpmfusion.org/) is required for `ffmpeg-devel` |
||||
|
* Fedora 32 or later is required. |
||||
|
* Fedora 36+ users with GCC 12 need Clang and should configure CMake with: |
||||
|
</details> |
||||
|
|
||||
|
<details> |
||||
|
<summary>macOS</summary> |
||||
|
|
||||
|
Install dependencies from **[Homebrew](https://brew.sh/)** |
||||
|
|
||||
|
```sh |
||||
|
brew install autoconf automake boost ffmpeg fmt glslang hidapi libtool libusb lz4 ninja nlohmann-json openssl pkg-config qt@6 sdl2 speexdsp zlib zstd cmake Catch2 molten-vk vulkan-loader spirv-tools |
||||
|
``` |
||||
|
|
||||
|
If you are compiling on Intel Mac, or are using a Rosetta Homebrew installation, you must replace all references of `/opt/homebrew` with `/usr/local`. |
||||
|
|
||||
|
To run with MoltenVK, install additional dependencies: |
||||
|
```sh |
||||
|
brew install molten-vk vulkan-loader |
||||
|
``` |
||||
|
|
||||
|
</details> |
||||
|
|
||||
|
<details> |
||||
|
<summary>FreeBSD</summary> |
||||
|
|
||||
|
``` |
||||
|
devel/cmake |
||||
|
devel/sdl20 |
||||
|
devel/boost-libs |
||||
|
devel/catch2 |
||||
|
devel/libfmt |
||||
|
devel/nlohmann-json |
||||
|
devel/ninja |
||||
|
devel/nasm |
||||
|
devel/autoconf |
||||
|
devel/pkgconf |
||||
|
devel/qt6-base |
||||
|
|
||||
|
net/enet |
||||
|
|
||||
|
multimedia/ffnvcodec-headers |
||||
|
multimedia/ffmpeg |
||||
|
|
||||
|
audio/opus |
||||
|
|
||||
|
archivers/liblz4 |
||||
|
|
||||
|
lang/gcc12 |
||||
|
|
||||
|
graphics/glslang |
||||
|
graphics/vulkan-utility-libraries |
||||
|
``` |
||||
|
|
||||
|
If using FreeBSD 12 or prior, use `devel/pkg-config` instead. |
||||
|
</details> |
||||
|
|
||||
|
<details> |
||||
|
<summary>OpenBSD</summary> |
||||
|
|
||||
|
```sh |
||||
|
pkg_add -u |
||||
|
pkg_add cmake nasm git boost unzip--iconv autoconf-2.72p0 bash ffmpeg glslang gmake llvm-19.1.7p3 qt6 jq fmt nlohmann-json enet boost vulkan-utility-libraries vulkan-headers spirv-headers spirv-tools catch2 sdl2 libusb1.1.0.27 |
||||
|
``` |
||||
|
</details> |
||||
|
|
||||
|
<details> |
||||
|
<summary>Solaris / OpenIndiana</summary> |
||||
|
|
||||
|
Always consult [the OpenIndiana package list](https://pkg.openindiana.org/hipster/en/index.shtml) to cross-verify availability. |
||||
|
|
||||
|
Run the usual update + install of essential toolings: `sudo pkg update && sudo pkg install git cmake`. |
||||
|
|
||||
|
- **gcc**: `sudo pkg install developer/gcc-14`. |
||||
|
- **clang**: Version 20 is broken, use `sudo pkg install developer/clang-19`. |
||||
|
|
||||
|
Then install the libraries: `sudo pkg install qt6 boost glslang libzip library/lz4 nlohmann-json openssl opus sdl2 zlib compress/zstd unzip pkg-config nasm autoconf mesa library/libdrm header-drm developer/fmt`. |
||||
|
</details> |
||||
|
|
||||
|
<details> |
||||
|
<summary>MSYS2</summary> |
||||
|
|
||||
|
* Open the `MSYS2 MinGW 64-bit` shell (`mingw64.exe`) |
||||
|
* Download and install all dependencies using: |
||||
|
* `pacman -Syu git make mingw-w64-x86_64-SDL2 mingw-w64-x86_64-cmake mingw-w64-x86_64-python-pip mingw-w64-x86_64-qt6 mingw-w64-x86_64-toolchain autoconf libtool automake-wrapper` |
||||
|
* Add MinGW binaries to the PATH: |
||||
|
* `echo 'PATH=/mingw64/bin:$PATH' >> ~/.bashrc` |
||||
|
* Add VulkanSDK to the PATH: |
||||
|
* `echo 'PATH=$(readlink -e /c/VulkanSDK/*/Bin/):$PATH' >> ~/.bashrc` |
||||
|
</details> |
||||
|
|
||||
|
## All Done |
||||
|
|
||||
|
You may now return to the **[root build guide](Build.md)**. |
||||
@ -0,0 +1,69 @@ |
|||||
|
# CMake Options |
||||
|
|
||||
|
To change these options, add `-DOPTION_NAME=NEWVALUE` to the command line. |
||||
|
|
||||
|
- On Qt Creator, go to Project -> Current Configuration |
||||
|
|
||||
|
Notes: |
||||
|
- Defaults are marked per-platform. |
||||
|
- "Non-UNIX" just means Windows/MSVC and Android (yes, macOS is UNIX |
||||
|
- Android generally doesn't need to change anything; if you do, go to `src/android/app/build.gradle.kts` |
||||
|
- To set a boolean variable to on, use `ON` for the value; to turn it off, use `OFF` |
||||
|
- If a variable is mentioned as being e.g. "ON" for a specific platform(s), that means it is defaulted to OFF on others |
||||
|
- TYPE is always boolean unless otherwise specified |
||||
|
- Format: |
||||
|
* `OPTION_NAME` (TYPE DEFAULT) DESCRIPTION |
||||
|
|
||||
|
## Options |
||||
|
|
||||
|
- `YUZU_USE_CPM` (ON for non-UNIX) Use CPM to fetch system dependencies (fmt, boost, etc) if needed. Externals will still be fetched. See the [CPM](CPM.md) and [Deps](Deps.md) docs for more info. |
||||
|
- `ENABLE_WEB_SERVICE` (ON) Enable multiplayer service |
||||
|
- `ENABLE_WIFI_SCAN` (OFF) Enable WiFi scanning (requires iw on Linux) - experimental |
||||
|
- `YUZU_USE_BUNDLED_FFMPEG` (ON for non-UNIX) Download (Windows, Android) or build (UNIX) bundled FFmpeg |
||||
|
- `ENABLE_CUBEB` (ON) Enables the cubeb audio backend |
||||
|
- `YUZU_TESTS` (ON) Compile tests - requires Catch2 |
||||
|
- `YUZU_USE_PRECOMPILED_HEADERS` (ON for non-UNIX) Use precompiled headers |
||||
|
- `YUZU_DOWNLOAD_ANDROID_VVL` (ON) Download validation layer binary for Android |
||||
|
- `YUZU_ENABLE_LTO` (OFF) Enable link-time optimization |
||||
|
* Not recommended on Windows |
||||
|
* UNIX may be better off appending `-flto=thin` to compiler args |
||||
|
- `YUZU_DOWNLOAD_TIME_ZONE_DATA` (ON) Always download time zone binaries |
||||
|
* Currently, build fails without this |
||||
|
- `YUZU_USE_FASTER_LD` (ON) Check if a faster linker is available |
||||
|
* Only available on UNIX |
||||
|
- `USE_SYSTEM_MOLTENVK` (OFF, macOS only) Use the system MoltenVK lib (instead of the bundled one) |
||||
|
- `YUZU_TZDB_PATH` (string) Path to a pre-downloaded timezone database (useful for nixOS) |
||||
|
- `ENABLE_OPENSSL` (ON for Linux and *BSD) Enable OpenSSL backend for the ssl service |
||||
|
* Always enabled if the web service is enabled |
||||
|
- `YUZU_USE_BUNDLED_OPENSSL` (ON for MSVC) Download bundled OpenSSL build |
||||
|
* Always on for Android |
||||
|
* Unavailable on OpenBSD |
||||
|
|
||||
|
The following options are desktop only: |
||||
|
- `ENABLE_SDL2` (ON) Enable the SDL2 desktop, audio, and input frontend (HIGHLY RECOMMENDED!) |
||||
|
* Unavailable on Android |
||||
|
- `YUZU_USE_EXTERNAL_SDL2` (ON for non-UNIX) Compiles SDL2 from source |
||||
|
- `YUZU_USE_BUNDLED_SDL2` (ON for MSVC) Download a prebuilt SDL2 |
||||
|
* Unavailable on OpenBSD |
||||
|
* Only enabled if YUZU_USE_CPM and ENABLE_SDL2 are both ON |
||||
|
- `ENABLE_LIBUSB` (ON) Enable the use of the libusb input frontend (HIGHLY RECOMMENDED) |
||||
|
- `ENABLE_OPENGL` (ON) Enable the OpenGL graphics frontend |
||||
|
* Unavailable on Windows/ARM64 and Android |
||||
|
- `ENABLE_QT` (ON) Enable the Qt frontend (recommended) |
||||
|
- `ENABLE_QT_TRANSLATION` (OFF) Enable translations for the Qt frontend |
||||
|
- `ENABLE_QT_UPDATE_CHECKER` (OFF) Enable update checker for the Qt frontend |
||||
|
- `YUZU_USE_BUNDLED_QT` (ON for MSVC) Download bundled Qt binaries |
||||
|
* Note that using **system Qt** requires you to include the Qt CMake directory in `CMAKE_PREFIX_PATH`, e.g: |
||||
|
* `-DCMAKE_PREFIX_PATH=C:/Qt/6.9.0/msvc2022_64/lib/cmake/Qt6` |
||||
|
- `YUZU_QT_MIRROR` (string) What mirror to use for downloading the bundled Qt libraries |
||||
|
- `YUZU_USE_QT_MULTIMEDIA` (OFF) Use QtMultimedia for camera support |
||||
|
- `YUZU_USE_QT_WEB_ENGINE` (OFF) Use QtWebEngine for web applet implementation (requires the huge QtWebEngine dependency; not recommended) |
||||
|
- `USE_DISCORD_PRESENCE` (OFF) Enables Discord Rich Presence (Qt frontend only) |
||||
|
- `YUZU_ROOM` (ON) Enable dedicated room functionality |
||||
|
- `YUZU_ROOM_STANDALONE` (ON) Enable standalone room executable (eden-room) |
||||
|
* Requires `YUZU_ROOM` |
||||
|
- `YUZU_CMD` (ON) Compile the SDL2 frontend (eden-cli) - requires SDL2 |
||||
|
- `YUZU_CRASH_DUMPS` Compile crash dump (Minidump) support" |
||||
|
* Currently only available on Windows and Linux |
||||
|
|
||||
|
See `src/dynarmic/CMakeLists.txt` for additional options--usually, these don't need changed |
||||
@ -0,0 +1,10 @@ |
|||||
|
# Eden Build Documentation |
||||
|
|
||||
|
This contains documentation created by developers. This contains build instructions, guidelines, instructions/layouts for [cool stuff we made](CPM.md), and more. |
||||
|
|
||||
|
- **[General Build Instructions](Build.md)** |
||||
|
- **[Development Guidelines](Development.md)** |
||||
|
- **[Dependencies](Deps.md)** |
||||
|
- **[CPM - CMake Package Manager](CPM.md)** |
||||
|
- **[Platform-Specific Caveats](Caveats.md)** |
||||
|
- **[User Directory Handling](User.md)** |
||||
@ -1,81 +0,0 @@ |
|||||
Eden is not currently available as a port on FreeBSD, though it is in the works. For now, the recommended method of usage is to compile it yourself. Check back often, as the build process frequently changes. |
|
||||
|
|
||||
## Dependencies. |
|
||||
Eden needs the following dependencies: |
|
||||
|
|
||||
``` |
|
||||
devel/cmake |
|
||||
devel/sdl20 |
|
||||
devel/boost-libs |
|
||||
devel/catch2 |
|
||||
devel/libfmt |
|
||||
devel/nlohmann-json |
|
||||
devel/ninja |
|
||||
devel/nasm |
|
||||
devel/autoconf |
|
||||
devel/pkgconf |
|
||||
devel/qt6-base |
|
||||
|
|
||||
net/enet |
|
||||
|
|
||||
multimedia/ffnvcodec-headers |
|
||||
multimedia/ffmpeg |
|
||||
|
|
||||
audio/opus |
|
||||
|
|
||||
archivers/liblz4 |
|
||||
|
|
||||
lang/gcc12 |
|
||||
|
|
||||
graphics/glslang |
|
||||
graphics/vulkan-utility-libraries |
|
||||
``` |
|
||||
|
|
||||
If using FreeBSD 12 or prior, use `devel/pkg-config` instead. |
|
||||
|
|
||||
--- |
|
||||
|
|
||||
### Build preparations: |
|
||||
Run the following command to clone eden with git: |
|
||||
```sh |
|
||||
git clone --recursive https://git.eden-emu.dev/eden-emu/eden |
|
||||
``` |
|
||||
You usually want to add the `--recursive` parameter as it also takes care of the external dependencies for you. |
|
||||
|
|
||||
Now change into the eden directory and create a build directory there: |
|
||||
```sh |
|
||||
cd eden |
|
||||
mkdir build |
|
||||
``` |
|
||||
|
|
||||
Change into that build directory: |
|
||||
```sh |
|
||||
cd build |
|
||||
``` |
|
||||
|
|
||||
#### 1. Building in Release Mode (usually preferred and the most performant choice): |
|
||||
```sh |
|
||||
cmake .. -GNinja -DYUZU_TESTS=OFF |
|
||||
``` |
|
||||
|
|
||||
#### 2. Building in Release Mode with debugging symbols (useful if you want to debug errors for a eventual fix): |
|
||||
```sh |
|
||||
cmake .. -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DYUZU_TESTS=ON |
|
||||
``` |
|
||||
|
|
||||
Build the emulator locally: |
|
||||
```sh |
|
||||
ninja |
|
||||
``` |
|
||||
|
|
||||
Optional: If you wish to install eden globally onto your system issue the following command: |
|
||||
```sh |
|
||||
sudo ninja install |
|
||||
``` |
|
||||
OR |
|
||||
```sh |
|
||||
doas -- ninja install |
|
||||
``` |
|
||||
|
|
||||
## OpenSSL |
|
||||
The available OpenSSL port (3.0.17) is out-of-date, and using a bundled static library instead is recommended; to do so, add `-DYUZU_USE_CPM=ON` to your CMake configure command. |
|
||||
@ -1,138 +0,0 @@ |
|||||
### Dependencies |
|
||||
|
|
||||
You'll need to download and install the following to build Eden: |
|
||||
|
|
||||
* [GCC](https://gcc.gnu.org/) v11+ (for C++20 support) & misc |
|
||||
* If GCC 12 is installed, [Clang](https://clang.llvm.org/) v14+ is required for compiling |
|
||||
* [CMake](https://www.cmake.org/) 3.22+ |
|
||||
|
|
||||
The following are handled by Eden's externals: |
|
||||
|
|
||||
* [FFmpeg](https://ffmpeg.org/) |
|
||||
* [SDL2](https://www.libsdl.org/download-2.0.php) 2.0.18+ |
|
||||
* [opus](https://opus-codec.org/downloads/) 1.3+ |
|
||||
|
|
||||
All other dependencies will be downloaded and built by [CPM](https://github.com/cpm-cmake/CPM.cmake/) if `YUZU_USE_CPM` is on, but will always use system dependencies if available: |
|
||||
|
|
||||
* [Boost](https://www.boost.org/users/download/) 1.79.0+ |
|
||||
* [Catch2](https://github.com/catchorg/Catch2) 2.13.7 - 2.13.9 |
|
||||
* [fmt](https://fmt.dev/) 8.0.1+ |
|
||||
* [lz4](http://www.lz4.org) 1.8+ |
|
||||
* [nlohmann_json](https://github.com/nlohmann/json) 3.8+ |
|
||||
* [OpenSSL](https://www.openssl.org/source/) 1.1.1+ |
|
||||
* [ZLIB](https://www.zlib.net/) 1.2+ |
|
||||
* [zstd](https://facebook.github.io/zstd/) 1.5+ |
|
||||
* [enet](http://enet.bespin.org/) 1.3+ |
|
||||
* [cubeb](https://github.com/mozilla/cubeb) |
|
||||
* [SimpleIni](https://github.com/brofield/simpleini) |
|
||||
|
|
||||
Certain other dependencies (httplib, jwt, sirit, etc.) will be fetched by CPM regardless. System packages *can* be used for these libraries but this is generally not recommended. |
|
||||
|
|
||||
Dependencies are listed here as commands that can be copied/pasted. Of course, they should be inspected before being run. |
|
||||
|
|
||||
- Arch / Manjaro: |
|
||||
- `sudo pacman -Syu --needed base-devel boost catch2 cmake enet ffmpeg fmt git glslang libzip lz4 mbedtls ninja nlohmann-json openssl opus qt6-base qt6-multimedia sdl2 zlib zstd zip unzip` |
|
||||
- Building with QT Web Engine requires `qt6-webengine` as well. |
|
||||
- Proper wayland support requires `qt6-wayland` |
|
||||
- GCC 11 or later is required. |
|
||||
|
|
||||
- Ubuntu / Linux Mint / Debian: |
|
||||
- `sudo apt-get install autoconf cmake g++ gcc git glslang-tools libasound2 libboost-context-dev libglu1-mesa-dev libhidapi-dev libpulse-dev libtool libudev-dev libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-render-util0 libxcb-xinerama0 libxcb-xkb1 libxext-dev libxkbcommon-x11-0 mesa-common-dev nasm ninja-build qt6-base-private-dev libmbedtls-dev catch2 libfmt-dev liblz4-dev nlohmann-json3-dev libzstd-dev libssl-dev libavfilter-dev libavcodec-dev libswscale-dev pkg-config zlib1g-dev libva-dev libvdpau-dev` |
|
||||
- Ubuntu 22.04, Linux Mint 20, or Debian 12 or later is required. |
|
||||
- Users need to manually specify building with QT Web Engine enabled. This is done using the parameter `-DYUZU_USE_QT_WEB_ENGINE=ON` when running CMake. |
|
||||
- Users need to manually disable building SDL2 from externals if they intend to use the version provided by their system by adding the parameters `-DYUZU_USE_EXTERNAL_SDL2=OFF` |
|
||||
|
|
||||
```sh |
|
||||
git submodule update --init --recursive |
|
||||
cmake .. -GNinja -DCMAKE_C_COMPILER=gcc-11 -DCMAKE_CXX_COMPILER=g++-11 |
|
||||
``` |
|
||||
|
|
||||
- Fedora: |
|
||||
- `sudo dnf install autoconf ccache cmake fmt-devel gcc{,-c++} glslang hidapi-devel json-devel libtool libusb1-devel libzstd-devel lz4-devel nasm ninja-build openssl-devel pulseaudio-libs-devel qt6-linguist qt6-qtbase{-private,}-devel qt6-qtwebengine-devel qt6-qtmultimedia-devel speexdsp-devel wayland-devel zlib-devel ffmpeg-devel libXext-devel` |
|
||||
- Fedora 32 or later is required. |
|
||||
- Due to GCC 12, Fedora 36 or later users need to install `clang`, and configure CMake to use it via `-DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang` |
|
||||
- CMake arguments to force system libraries: |
|
||||
- SDL2: `-DYUZU_USE_BUNDLED_SDL2=OFF -DYUZU_USE_EXTERNAL_SDL2=OFF` |
|
||||
- FFmpeg: `-DYUZU_USE_EXTERNAL_FFMPEG=OFF` |
|
||||
- [RPM Fusion](https://rpmfusion.org/) (free) is required to install `ffmpeg-devel` |
|
||||
|
|
||||
### Cloning Eden with Git |
|
||||
|
|
||||
**Master:** |
|
||||
|
|
||||
```bash |
|
||||
git clone --recursive https://git.eden-emu.dev/eden-emu/eden |
|
||||
cd eden |
|
||||
``` |
|
||||
|
|
||||
The `--recursive` option automatically clones the required Git submodules. |
|
||||
|
|
||||
### Building Eden in Release Mode (Optimised) |
|
||||
|
|
||||
If you need to run ctests, you can disable `-DYUZU_TESTS=OFF` and install Catch2. |
|
||||
|
|
||||
```bash |
|
||||
mkdir build && cd build |
|
||||
cmake .. -GNinja -DYUZU_TESTS=OFF |
|
||||
ninja |
|
||||
sudo ninja install |
|
||||
``` |
|
||||
You may also want to include support for Discord Rich Presence by adding `-DUSE_DISCORD_PRESENCE=ON` after `cmake ..` |
|
||||
|
|
||||
`-DYUZU_USE_EXTERNAL_VULKAN_SPIRV_TOOLS=OFF` might be needed if ninja command failed with `undefined reference to symbol 'spvOptimizerOptionsCreate`, reason currently unknown |
|
||||
|
|
||||
Optionally, you can use `cmake-gui ..` to adjust various options (e.g. disable the Qt GUI). |
|
||||
|
|
||||
### Building Eden in Debug Mode (Slow) |
|
||||
|
|
||||
```bash |
|
||||
mkdir build && cd build |
|
||||
cmake .. -GNinja -DCMAKE_BUILD_TYPE=Debug -DYUZU_TESTS=OFF |
|
||||
ninja |
|
||||
``` |
|
||||
|
|
||||
### Building with debug symbols |
|
||||
|
|
||||
```bash |
|
||||
mkdir build && cd build |
|
||||
cmake .. -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DYUZU -DYUZU_TESTS=OFF |
|
||||
ninja |
|
||||
``` |
|
||||
|
|
||||
### Building with Scripts |
|
||||
A convenience script for building is provided in `.ci/linux/build.sh`. You must provide an arch target for optimization, e.g. `.ci/linux/build.sh amd64`. Valid targets: |
|
||||
- `legacy`: x86_64 generic, only needed for CPUs older than 2013 or so |
|
||||
- `amd64`: x86_64-v3, for CPUs newer than 2013 or so |
|
||||
- `steamdeck` / `zen2`: For Steam Deck or Zen >= 2 AMD CPUs (untested on Intel) |
|
||||
- `rog-ally` / `allyx` / `zen4`: For ROG Ally X or Zen >= 4 AMD CPUs (untested on Intel) |
|
||||
- `aarch64`: For armv8-a CPUs, older than mid-2021 or so |
|
||||
- `armv9`: For armv9-a CPUs, newer than mid-2021 or so |
|
||||
- `native`: Optimize to your native host architecture |
|
||||
|
|
||||
Extra flags to pass to CMake should be passed after the arch target. |
|
||||
|
|
||||
Additional environment variables can be used to control building: |
|
||||
- `NPROC`: Number of threads to use for compilation (defaults to all) |
|
||||
- `TARGET`: Set to `appimage` to disable standalone `eden-cli` and `eden-room` executables |
|
||||
- `BUILD_TYPE`: Sets the build type to use. Defaults to `Release` |
|
||||
|
|
||||
The following environment variables are boolean flags. Set to `true` to enable or `false` to disable: |
|
||||
- `DEVEL` (default FALSE): Disable Qt update checker |
|
||||
- `USE_WEBENGINE` (default FALSE): Enable Qt WebEngine |
|
||||
- `USE_MULTIMEDIA` (default TRUE): Enable Qt Multimedia |
|
||||
|
|
||||
After building, an AppImage can be packaged via `.ci/linux/package.sh`. This script takes the same arch targets as the build script. If the build was created in a different directory, you can specify its path relative to the source directory, e.g. `.ci/linux/package.sh amd64 build-appimage`. Additionally, set the `DEVEL` environment variable to `true` to change the app name to `Eden Nightly`. |
|
||||
|
|
||||
### Running without installing |
|
||||
|
|
||||
After building, the binaries `eden` and `eden-cmd` (depending on your build options) will end up in `build/bin/`. |
|
||||
|
|
||||
```bash |
|
||||
# SDL |
|
||||
cd build/bin/ |
|
||||
./eden-cmd |
|
||||
|
|
||||
# Qt |
|
||||
cd build/bin/ |
|
||||
./eden |
|
||||
``` |
|
||||
@ -1,10 +0,0 @@ |
|||||
# Building for OpenBSD |
|
||||
|
|
||||
```sh |
|
||||
pkg_add -u |
|
||||
pkg_add cmake nasm git boost unzip--iconv autoconf-2.72p0 bash ffmpeg glslang gmake llvm-19.1.7p3 qt6 jq |
|
||||
git --recursive https://git.eden-emu.dev/eden-emu/eden |
|
||||
cmake -DCMAKE_C_COMPILER=clang-19 -DCMAKE_CXX_COMPILER=clang++-19 -DDYNARMIC_USE_PRECOMPILED_HEADERS=OFF -DCMAKE_BUILD_TYPE=Debug -DENABLE_QT=OFF -DENABLE_OPENSSL=OFF -DENABLE_WEB_SERVICE=OFF -B /usr/obj/eden |
|
||||
``` |
|
||||
|
|
||||
- Modify `externals/ffmpeg/CMakeFiles/ffmpeg-build/build.make` to use `-j$(nproc)` instead of just `-j`. |
|
||||
@ -1,51 +0,0 @@ |
|||||
# Building for Solaris |
|
||||
|
|
||||
## Dependencies. |
|
||||
Always consult [the OpenIndiana package list](https://pkg.openindiana.org/hipster/en/index.shtml) to cross-verify availability. |
|
||||
|
|
||||
Run the usual update + install of essential toolings: `sudo pkg update && sudo pkg install git cmake`. |
|
||||
|
|
||||
- **gcc**: `sudo pkg install developer/gcc-14`. |
|
||||
- **clang**: Version 20 is broken, use `sudo pkg install developer/clang-19`. |
|
||||
|
|
||||
Then install the libraies: `sudo pkg install qt6 boost glslang libzip library/lz4 nlohmann-json openssl opus sdl2 zlib compress/zstd unzip pkg-config nasm autoconf mesa library/libdrm header-drm developer/fmt`. |
|
||||
|
|
||||
### Building |
|
||||
|
|
||||
Clone eden with git `git clone --recursive https://git.eden-emu.dev/eden-emu/eden` |
|
||||
|
|
||||
```sh |
|
||||
# Needed for some dependencies that call cc directly (tz) |
|
||||
echo '#!/bin/sh' >cc |
|
||||
echo 'gcc $@' >>cc |
|
||||
chmod +x cc |
|
||||
export PATH="$PATH:$PWD" |
|
||||
``` |
|
||||
|
|
||||
Patch for FFmpeg: |
|
||||
```sh |
|
||||
sed -i 's/ make / gmake /' externals/ffmpeg/CMakeFiles/ffmpeg-build.dir/build.make |
|
||||
``` |
|
||||
|
|
||||
- **Configure**: `cmake -B build -DYUZU_USE_CPM=ON -DCMAKE_CXX_FLAGS="-I/usr/include/SDL2" -DCMAKE_C_FLAGS="-I/usr/include/SDL2"`. |
|
||||
- **Build**: `cmake --build build`. |
|
||||
- **Installing**: `sudo cmake --install build`. |
|
||||
|
|
||||
### Running |
|
||||
|
|
||||
Default Mesa is a bit outdated, the following environment variables should be set for a smoother experience: |
|
||||
```sh |
|
||||
export MESA_GL_VERSION_OVERRIDE=4.6 |
|
||||
export MESA_GLSL_VERSION_OVERRIDE=460 |
|
||||
export MESA_EXTENSION_MAX_YEAR=2025 |
|
||||
export MESA_DEBUG=1 |
|
||||
export MESA_VK_VERSION_OVERRIDE=1.3 |
|
||||
# Only if nvidia/intel drm drivers cause crashes, will severely hinder performance |
|
||||
export LIBGL_ALWAYS_SOFTWARE=1 |
|
||||
``` |
|
||||
|
|
||||
### Notes |
|
||||
|
|
||||
- Modify the generated ffmpeg.make (in build dir) if using multiple threads (base system `make` doesn't use `-j4`, so change for `gmake`). |
|
||||
- If using OpenIndiana, due to a bug in SDL2 cmake configuration; Audio driver defaults to SunOS `<sys/audioio.h>`, which does not exist on OpenIndiana. |
|
||||
- System OpenSSL generally does not work. Instead, use `-DYUZU_USE_CPM=ON` to use a bundled static OpenSSL, or build a system dependency from source. |
|
||||
@ -1,259 +0,0 @@ |
|||||
# ⚠️ This guide is for developers ONLY! Support will be provided to developers ONLY. |
|
||||
|
|
||||
## 📋 Current building methods: |
|
||||
|
|
||||
* [ Minimal Dependencies](#minimal-dependencies) |
|
||||
* [⚡ Method I: MSVC Build for Windows](#method-i-msvc-build-for-windows) |
|
||||
* [🐧 Method II: MinGW-w64 Build with MSYS2](#method-ii-mingw-w64-build-with-msys2) |
|
||||
* [🖥️ Method III: CLion Environment Setup](#method-iii-clion-environment-setup) |
|
||||
* [💻 Building from the command line with MSVC](#building-from-the-command-line-with-msvc) |
|
||||
* [📜 Building with Scripts](#building-with-scripts) |
|
||||
|
|
||||
--- |
|
||||
|
|
||||
|
|
||||
## Minimal Dependencies |
|
||||
|
|
||||
On Windows, **all** library dependencies are **automatically included** within the `externals` folder. |
|
||||
|
|
||||
You still need to install: |
|
||||
|
|
||||
* **[CMake](https://cmake.org/download/)** - Used to generate Visual Studio project files. |
|
||||
* **[Vulkan SDK](https://vulkan.lunarg.com/sdk/home#windows)** - Make sure to select **Latest SDK**. |
|
||||
|
|
||||
* *A convenience script to install the latest SDK is provided in `.ci/windows/install-vulkan-sdk.ps1`* |
|
||||
* **[Git for Windows](https://gitforwindows.org)** - We recommend installing Git for command line use and version control integration. |
|
||||
|
|
||||
<img src="https://i.imgur.com/x0rRs1t.png" width="500"> |
|
||||
|
|
||||
* *While installing Git Bash, select "Git from the command line and also from 3rd-party software". If missed, manually set `git.exe` path in CMake.* |
|
||||
|
|
||||
--- |
|
||||
|
|
||||
## ⚡ Method I: MSVC Build for Windows |
|
||||
|
|
||||
### a. Prerequisites to MSVC Build |
|
||||
|
|
||||
* **[Visual Studio 2022 Community](https://visualstudio.microsoft.com/downloads/)** - Make sure to **select C++ support** in the installer, or **update to the latest version** if already installed. |
|
||||
|
|
||||
* *A convenience script to install the **minimal** version (Visual Build Tools) is provided in `.ci/windows/install-msvc.ps1`* |
|
||||
|
|
||||
--- |
|
||||
|
|
||||
### b. Clone the eden repository with Git |
|
||||
|
|
||||
Open Terminal on |
|
||||
|
|
||||
```cmd |
|
||||
git clone https://git.eden-emu.dev/eden-emu/eden |
|
||||
cd eden |
|
||||
``` |
|
||||
|
|
||||
* *By default `eden` downloads to `C:\Users\<user-name>\eden`* |
|
||||
|
|
||||
--- |
|
||||
|
|
||||
### c. Building |
|
||||
|
|
||||
* Open the CMake GUI application and point it to the `eden` |
|
||||
|
|
||||
<img src="https://i.imgur.com/qOslIWv.png" width="500"> |
|
||||
|
|
||||
* 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`, with `x64` for the optional platform. |
|
||||
|
|
||||
<img src="https://i.imgur.com/DKiREaK.png" width="500"> |
|
||||
|
|
||||
* *(You may also want to disable `YUZU_TESTS` in this case since Catch2 is not yet supported with this.)* |
|
||||
|
|
||||
<img src="https://user-images.githubusercontent.com/22451773/180585999-07316d6e-9751-4d11-b957-1cf57cd7cd58.png" width="500"> |
|
||||
|
|
||||
* Click "Generate" to create the project files. |
|
||||
|
|
||||
<img src="https://i.imgur.com/5LKg92k.png" width="500"> |
|
||||
|
|
||||
* Open the solution file `yuzu.sln` in Visual Studio 2022, which is located in the build folder. |
|
||||
|
|
||||
<img src="https://i.imgur.com/208yMml.png" width="500"> |
|
||||
|
|
||||
* * Depending on whether you want a graphical user interface or not, select in the Solution Explorer: |
|
||||
* `eden` (GUI) |
|
||||
* `eden-cmd` (command-line only) |
|
||||
* Then **right-click** and choose `Set as StartUp Project`. |
|
||||
|
|
||||
<img src="https://i.imgur.com/nPMajnn.png" height="500"> |
|
||||
<img src="https://i.imgur.com/BDMLzRZ.png" height="500"> |
|
||||
|
|
||||
* Select the appropriate build type, `Debug` for debug purposes or `Release` for performance (in case of doubt choose `Release`). |
|
||||
|
|
||||
<img src="https://i.imgur.com/qxg4roC.png" width="500"> |
|
||||
|
|
||||
* **Right-click** the project you want to build and press **Build** in the submenu or press `F5`. |
|
||||
|
|
||||
<img src="https://i.imgur.com/CkQgOFW.png" height="500"> |
|
||||
|
|
||||
--- |
|
||||
|
|
||||
## 🐧 Method II: MinGW-w64 Build with MSYS2 |
|
||||
|
|
||||
### a. Prerequisites to MinGW-w64 |
|
||||
|
|
||||
* **[MSYS2](https://www.msys2.org)** - A versatile and up-to-date development environment for Windows, providing a Unix-like shell, package manager, and toolchain. |
|
||||
|
|
||||
--- |
|
||||
|
|
||||
### b. Install eden dependencies for MinGW-w64 |
|
||||
|
|
||||
* Open the `MSYS2 MinGW 64-bit` shell (`mingw64.exe`) |
|
||||
* Download and install all dependencies using: |
|
||||
* `pacman -Syu git make mingw-w64-x86_64-SDL2 mingw-w64-x86_64-cmake mingw-w64-x86_64-python-pip mingw-w64-x86_64-qt6 mingw-w64-x86_64-toolchain autoconf libtool automake-wrapper` |
|
||||
* Add MinGW binaries to the PATH: |
|
||||
* `echo 'PATH=/mingw64/bin:$PATH' >> ~/.bashrc` |
|
||||
* Add VulkanSDK to the PATH: |
|
||||
* `echo 'PATH=$(readlink -e /c/VulkanSDK/*/Bin/):$PATH' >> ~/.bashrc` |
|
||||
|
|
||||
--- |
|
||||
|
|
||||
### c. Clone the eden repository with Git |
|
||||
|
|
||||
```cmd |
|
||||
git clone https://git.eden-emu.dev/eden-emu/eden |
|
||||
cd eden |
|
||||
``` |
|
||||
|
|
||||
--- |
|
||||
|
|
||||
### d. Building dynamically-linked eden |
|
||||
|
|
||||
* This process will generate a *dynamically* linked build |
|
||||
|
|
||||
```bash |
|
||||
# Make build dir and enter |
|
||||
mkdir build && cd build |
|
||||
|
|
||||
# Generate CMake Makefiles |
|
||||
cmake .. -G "MSYS Makefiles" -DYUZU_TESTS=OFF |
|
||||
|
|
||||
# Build |
|
||||
make -j$(nproc) |
|
||||
|
|
||||
# Run eden! |
|
||||
./bin/eden.exe |
|
||||
``` |
|
||||
|
|
||||
* *Warning: 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 or other systems!* |
|
||||
|
|
||||
--- |
|
||||
|
|
||||
### Additional notes |
|
||||
|
|
||||
|
|
||||
* Eden doesn't require the rather large Qt dependency, but you will lack a GUI frontend |
|
||||
|
|
||||
```bash |
|
||||
# ... |
|
||||
|
|
||||
# Generate CMake Makefiles (withou QT) |
|
||||
cmake .. -G "MSYS Makefiles" -DYUZU_TESTS=OFF -DENABLE_QT=no |
|
||||
|
|
||||
$ ... |
|
||||
``` |
|
||||
|
|
||||
* Running programs from inside `MSYS2 MinGW x64` shell has a different `%PATH%` than directly from explorer. |
|
||||
* This different `%PATH%` has the locations of the other DLLs required. |
|
||||
|
|
||||
<img src="https://user-images.githubusercontent.com/190571/165000848-005e8428-8a82-41b1-bb4d-4ce7797cdac8.png" width="500"> |
|
||||
|
|
||||
--- |
|
||||
|
|
||||
## 🖥️ Method III: CLion Environment Setup |
|
||||
|
|
||||
### a. Prerequisites to CLion |
|
||||
|
|
||||
* [CLion](https://www.jetbrains.com/clion/) - This IDE is not free; for a free alternative, check Method I |
|
||||
|
|
||||
--- |
|
||||
|
|
||||
### b. Cloning eden with CLion |
|
||||
|
|
||||
* Clone the Repository: |
|
||||
|
|
||||
<img src="https://user-images.githubusercontent.com/42481638/216899046-0d41d7d6-8e4d-4ed2-9587-b57088af5214.png" width="500"> |
|
||||
<img src="https://user-images.githubusercontent.com/42481638/216899061-b2ea274a-e88c-40ae-bf0b-4450b46e9fea.png" width="500"> |
|
||||
<img src="https://user-images.githubusercontent.com/42481638/216899076-0e5988c4-d431-4284-a5ff-9ecff973db76.png" width="500"> |
|
||||
|
|
||||
--- |
|
||||
|
|
||||
### c. Building & Setup |
|
||||
|
|
||||
* Once Cloned, You will be taken to a prompt like the image below: |
|
||||
|
|
||||
<img src="https://user-images.githubusercontent.com/42481638/216899092-3fe4cec6-a540-44e3-9e1e-3de9c2fffc2f.png" width="500"> |
|
||||
|
|
||||
* Set the settings to the image below: |
|
||||
* Change `Build type: Release` |
|
||||
* Change `Name: Release` |
|
||||
* Change `Toolchain Visual Studio` |
|
||||
* Change `Generator: Let CMake decide` |
|
||||
* Change `Build directory: build` |
|
||||
|
|
||||
<img src="https://user-images.githubusercontent.com/42481638/216899164-6cee8482-3d59-428f-b1bc-e6dc793c9b20.png" width="500"> |
|
||||
|
|
||||
* Click OK; now Clion will build a directory and index your code to allow for IntelliSense. Please be patient. |
|
||||
* Once this process has been completed (No loading bar bottom right), you can now build eden |
|
||||
* In the top right, click on the drop-down menu, select all configurations, then select eden |
|
||||
|
|
||||
<img src="https://user-images.githubusercontent.com/42481638/216899226-975048e9-bc6d-4ec1-bc2d-bd8a1e15ed04.png" height="500" > |
|
||||
|
|
||||
* Now run by clicking the play button or pressing Shift+F10, and eden will auto-launch once built. |
|
||||
|
|
||||
<img src="https://user-images.githubusercontent.com/42481638/216899275-d514ec6a-e563-470e-81e2-3e04f0429b68.png" width="500"> |
|
||||
|
|
||||
--- |
|
||||
|
|
||||
## 💻 Building from the command line with MSVC |
|
||||
|
|
||||
```cmd |
|
||||
# Clone eden and enter |
|
||||
git clone https://git.eden-emu.dev/eden-emu/eden |
|
||||
cd eden |
|
||||
|
|
||||
# Make build dir and enter |
|
||||
mkdir build && cd build |
|
||||
|
|
||||
# Generate CMake Makefiles |
|
||||
cmake .. -G "Visual Studio 17 2022" -A x64 -DYUZU_TESTS=OFF |
|
||||
|
|
||||
# Build |
|
||||
cmake --build . --config Release |
|
||||
``` |
|
||||
|
|
||||
## 📜 Building with Scripts |
|
||||
|
|
||||
* A convenience script for building is provided in `.ci/windows/build.sh`. |
|
||||
* You must run this with Bash, e.g. Git Bash or MinGW TTY. |
|
||||
* To use this script, you must have `windeployqt` installed (usually bundled with Qt) and set the `WINDEPLOYQT` environment variable to its canonical Bash location: |
|
||||
* `WINDEPLOYQT="/c/Qt/6.9.1/msvc2022_64/bin/windeployqt6.exe" .ci/windows/build.sh`. |
|
||||
* You can use `aqtinstall`, more info on <https://github.com/miurahr/aqtinstall> and <https://ddalcino.github.io/aqt-list-server/> |
|
||||
|
|
||||
|
|
||||
* Extra CMake flags should be placed in the arguments of the script. |
|
||||
|
|
||||
#### Additional environment variables can be used to control building: |
|
||||
|
|
||||
* `BUILD_TYPE` (default `Release`): Sets the build type to use. |
|
||||
|
|
||||
* The following environment variables are boolean flags. Set to `true` to enable or `false` to disable: |
|
||||
|
|
||||
* `DEVEL` (default FALSE): Disable Qt update checker |
|
||||
* `USE_WEBENGINE` (default FALSE): Enable Qt WebEngine |
|
||||
* `USE_MULTIMEDIA` (default TRUE): Enable Qt Multimedia |
|
||||
* `BUNDLE_QT` (default FALSE): Use bundled Qt |
|
||||
|
|
||||
* Note that using **system Qt** requires you to include the Qt CMake directory in `CMAKE_PREFIX_PATH` |
|
||||
* `.ci/windows/build.sh -DCMAKE_PREFIX_PATH=C:/Qt/6.9.0/msvc2022_64/lib/cmake/Qt6` |
|
||||
|
|
||||
* After building, a zip can be packaged via `.ci/windows/package.sh`. You must have 7-zip installed and in your PATH. |
|
||||
* The resulting zip will be placed into `artifacts` in the source directory. |
|
||||
|
|
||||
@ -1,78 +0,0 @@ |
|||||
Please note this article is intended for development, and Eden on macOS is not currently ready for regular use. |
|
||||
|
|
||||
This article was written for developers. Eden support for macOS is not ready for casual use. |
|
||||
|
|
||||
## Dependencies |
|
||||
Install dependencies from Homebrew: |
|
||||
```sh |
|
||||
brew install autoconf automake boost ffmpeg fmt glslang hidapi libtool libusb lz4 ninja nlohmann-json openssl pkg-config qt@6 sdl2 speexdsp zlib zstd cmake Catch2 molten-vk vulkan-loader spirv-tools |
|
||||
``` |
|
||||
|
|
||||
If you are compiling on Intel Mac, or are using a Rosetta Homebrew installation, you must replace all references of `/opt/homebrew` with `/usr/local`. |
|
||||
|
|
||||
Now, clone the repo: |
|
||||
```sh |
|
||||
git clone --recursive https://git.eden-emu.dev/eden-emu/eden |
|
||||
cd eden |
|
||||
``` |
|
||||
|
|
||||
## Method I: ninja |
|
||||
|
|
||||
--- |
|
||||
Build for release |
|
||||
```sh |
|
||||
export Qt6_DIR="/opt/homebrew/opt/qt@6/lib/cmake" |
|
||||
export LIBVULKAN_PATH=/opt/homebrew/lib/libvulkan.dylib |
|
||||
cmake -B build -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DYUZU_TESTS=OFF -DENABLE_WEB_SERVICE=ON -DENABLE_LIBUSB=OFF -DCLANG_FORMAT=ON -DSDL2_DISABLE_INSTALL=ON -DSDL_ALTIVEC=ON |
|
||||
ninja |
|
||||
``` |
|
||||
|
|
||||
You may also want to include support for Discord Rich Presence by adding `-DUSE_DISCORD_PRESENCE=ON` |
|
||||
```sh |
|
||||
export Qt6_DIR="/opt/homebrew/opt/qt@6/lib/cmake" |
|
||||
cmake -B build -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DYUZU_TESTS=OFF -DENABLE_WEB_SERVICE=OFF -DENABLE_LIBUSB=OFF |
|
||||
ninja |
|
||||
``` |
|
||||
|
|
||||
Run the output: |
|
||||
``` |
|
||||
bin/eden.app/Contents/MacOS/eden |
|
||||
``` |
|
||||
|
|
||||
## Method II: Xcode |
|
||||
|
|
||||
--- |
|
||||
Build for release |
|
||||
```sh |
|
||||
export Qt6_DIR="/opt/homebrew/opt/qt@6/lib/cmake" |
|
||||
export LIBVULKAN_PATH=/opt/homebrew/lib/libvulkan.dylib |
|
||||
# Only if having errors about Xcode 15.0 |
|
||||
sudo /usr/bin/xcode-select --switch /Users/admin/Downloads/Xcode.ap |
|
||||
cmake -B build -GXcode -DCMAKE_BUILD_TYPE=RelWithDebInfo -DYUZU_TESTS=OFF -DENABLE_WEB_SERVICE=ON -DENABLE_LIBUSB=OFF -DCLANG_FORMAT=ON -DSDL2_DISABLE_INSTALL=ON -DSDL_ALTIVEC=ON |
|
||||
xcodebuild build -project yuzu.xcodeproj -scheme "yuzu" -configuration "RelWithDebInfo" |
|
||||
``` |
|
||||
|
|
||||
Build with debug symbols: |
|
||||
```sh |
|
||||
export Qt6_DIR="/opt/homebrew/opt/qt@6/lib/cmake" |
|
||||
cmake -B build -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DYUZU_TESTS=OFF -DENABLE_WEB_SERVICE=OFF -DENABLE_LIBUSB=OFF |
|
||||
ninja |
|
||||
``` |
|
||||
|
|
||||
Run the output: |
|
||||
``` |
|
||||
bin/eden.app/Contents/MacOS/eden |
|
||||
``` |
|
||||
|
|
||||
--- |
|
||||
|
|
||||
To run with MoltenVK, install additional dependencies: |
|
||||
```sh |
|
||||
brew install molten-vk vulkan-loader |
|
||||
``` |
|
||||
|
|
||||
Run with Vulkan loader path: |
|
||||
```sh |
|
||||
export LIBVULKAN_PATH=/opt/homebrew/lib/libvulkan.dylib |
|
||||
bin/eden.app/Contents/MacOS/eden |
|
||||
``` |
|
||||
|
After Width: 699 | Height: 562 | Size: 63 KiB |
@ -0,0 +1,31 @@ |
|||||
|
# Linux Build Scripts |
||||
|
|
||||
|
* Provided script: `.ci/linux/build.sh` |
||||
|
* Must specify arch target, e.g.: `.ci/linux/build.sh amd64` |
||||
|
* Valid targets: |
||||
|
* `native`: Optimize to your native host architecture |
||||
|
* `legacy`: x86\_64 generic, only needed for CPUs older than 2013 or so |
||||
|
* `amd64`: x86\_64-v3, for CPUs newer than 2013 or so |
||||
|
* `steamdeck` / `zen2`: For Steam Deck or Zen >= 2 AMD CPUs (untested on Intel) |
||||
|
* `rog-ally` / `allyx` / `zen4`: For ROG Ally X or Zen >= 4 AMD CPUs (untested on Intel) |
||||
|
* `aarch64`: For armv8-a CPUs, older than mid-2021 or so |
||||
|
* `armv9`: For armv9-a CPUs, newer than mid-2021 or so |
||||
|
* Extra CMake flags go after the arch target. |
||||
|
|
||||
|
### Environment Variables |
||||
|
|
||||
|
* `NPROC`: Number of compilation threads (default: all cores) |
||||
|
* `TARGET`: Set `appimage` to disable standalone `eden-cli` and `eden-room` |
||||
|
* `BUILD_TYPE`: Build type (default: `Release`) |
||||
|
|
||||
|
Boolean flags (set `true` to enable, `false` to disable): |
||||
|
|
||||
|
* `DEVEL` (default `FALSE`): Disable Qt update checker |
||||
|
* `USE_WEBENGINE` (default `FALSE`): Enable Qt WebEngine |
||||
|
* `USE_MULTIMEDIA` (default `FALSE`): Enable Qt Multimedia |
||||
|
|
||||
|
* AppImage packaging script: `.ci/linux/package.sh` |
||||
|
|
||||
|
* Accepts same arch targets as build script |
||||
|
* Use `DEVEL=true` to rename app to `Eden Nightly` |
||||
|
* This should generally not be used unless in a tailor-made packaging environment (e.g. Actions/CI) |
||||
@ -0,0 +1,29 @@ |
|||||
|
# Windows Build Scripts |
||||
|
|
||||
|
* A convenience script for building is provided in `.ci/windows/build.sh`. |
||||
|
* You must run this with Bash, e.g. Git Bash or the MinGW TTY. |
||||
|
* To use this script, you must have `windeployqt` installed (usually bundled with Qt) and set the `WINDEPLOYQT` environment variable to its canonical Bash location: |
||||
|
* `WINDEPLOYQT="/c/Qt/6.9.1/msvc2022_64/bin/windeployqt6.exe" .ci/windows/build.sh`. |
||||
|
* You can use `aqtinstall`, more info on <https://github.com/miurahr/aqtinstall> and <https://ddalcino.github.io/aqt-list-server/> |
||||
|
|
||||
|
|
||||
|
* Extra CMake flags should be placed in the arguments of the script. |
||||
|
|
||||
|
#### Additional environment variables can be used to control building: |
||||
|
|
||||
|
* `BUILD_TYPE` (default `Release`): Sets the build type to use. |
||||
|
|
||||
|
* The following environment variables are boolean flags. Set to `true` to enable or `false` to disable: |
||||
|
|
||||
|
* `DEVEL` (default FALSE): Disable Qt update checker |
||||
|
* `USE_WEBENGINE` (default FALSE): Enable Qt WebEngine |
||||
|
* `USE_MULTIMEDIA` (default FALSE): Enable Qt Multimedia |
||||
|
* `BUNDLE_QT` (default FALSE): Use bundled Qt |
||||
|
|
||||
|
* Note that using **system Qt** requires you to include the Qt CMake directory in `CMAKE_PREFIX_PATH` |
||||
|
* `.ci/windows/build.sh -DCMAKE_PREFIX_PATH=C:/Qt/6.9.0/msvc2022_64/lib/cmake/Qt6` |
||||
|
|
||||
|
* After building, a zip can be packaged via `.ci/windows/package.sh`. You must have 7-zip installed and in your PATH. |
||||
|
* The resulting zip will be placed into `artifacts` in the source directory. |
||||
|
|
||||
|
|
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue