mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-10-11 14:17:54 +00:00
[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>
This commit is contained in:
parent
249e006667
commit
e1ffeec212
18 changed files with 573 additions and 650 deletions
7
docs/build/Android.md
vendored
7
docs/build/Android.md
vendored
|
@ -2,7 +2,7 @@
|
|||
|
||||
## Dependencies
|
||||
* [Android Studio](https://developer.android.com/studio)
|
||||
* [NDK 25.2.9519653 and CMake 3.22.1](https://developer.android.com/studio/projects/install-ndk#default-version)
|
||||
* [NDK 27+ and CMake 3.22.1](https://developer.android.com/studio/projects/install-ndk#default-version)
|
||||
* [Git](https://git-scm.com/download)
|
||||
|
||||
### WINDOWS ONLY - Additional Dependencies
|
||||
|
@ -16,8 +16,7 @@ git clone --recursive https://git.eden-emu.dev/eden-emu/eden.git
|
|||
```
|
||||
Eden by default will be cloned into -
|
||||
* `C:\Users\<user-name>\eden` on Windows
|
||||
* `~/eden` on Linux
|
||||
* And wherever on macOS
|
||||
* `~/eden` on Linux and macOS
|
||||
|
||||
## Building
|
||||
1. Start Android Studio, on the startup dialog select `Open`.
|
||||
|
@ -32,7 +31,7 @@ Eden by default will be cloned into -
|
|||
`export ANDROID_SDK_ROOT=path/to/sdk`
|
||||
`export ANDROID_NDK_ROOT=path/to/ndk`.
|
||||
4. Navigate to `eden/src/android`.
|
||||
5. Then Build with `./gradlew assemblerelWithDebInfo`.
|
||||
5. Then Build with `./gradlew assembleRelWithDebInfo`.
|
||||
6. To build the optimised build use `./gradlew assembleGenshinSpoofRelWithDebInfo`.
|
||||
|
||||
### Script
|
||||
|
|
81
docs/build/FreeBSD.md
vendored
81
docs/build/FreeBSD.md
vendored
|
@ -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.
|
138
docs/build/Linux.md
vendored
138
docs/build/Linux.md
vendored
|
@ -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
|
||||
```
|
10
docs/build/OpenBSD.md
vendored
10
docs/build/OpenBSD.md
vendored
|
@ -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`.
|
51
docs/build/Solaris.md
vendored
51
docs/build/Solaris.md
vendored
|
@ -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.
|
259
docs/build/Windows.md
vendored
259
docs/build/Windows.md
vendored
|
@ -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.
|
||||
|
78
docs/build/macOS.md
vendored
78
docs/build/macOS.md
vendored
|
@ -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
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue