[cmake] CPMUtil: formatting, git_host, new repos, more system deps, libusb #392
6 changed files with 581 additions and 608 deletions
84
docs/build/Android.md
vendored
84
docs/build/Android.md
vendored
|
@ -1,42 +1,42 @@
|
|||
# Note: These build instructions are a work-in-progress.
|
||||
|
||||
## 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)
|
||||
* [Git](https://git-scm.com/download)
|
||||
|
||||
### WINDOWS ONLY - Additional Dependencies
|
||||
* **[Visual Studio 2022 Community](https://visualstudio.microsoft.com/downloads/)** - **Make sure to select "Desktop development with C++" support in the installer. Make sure to update to the latest version if already installed.**
|
||||
* **[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`.
|
||||
|
||||
## Cloning Eden with Git
|
||||
```
|
||||
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
|
||||
|
||||
## Building
|
||||
1. Start Android Studio, on the startup dialog select `Open`.
|
||||
2. Navigate to the `eden/src/android` directory and click on `OK`.
|
||||
3. In `Build > Select Build Variant`, select `release` or `relWithDebInfo` as the "Active build variant".
|
||||
4. Build the project with `Build > Make Project` or run it on an Android device with `Run > Run 'app'`.
|
||||
|
||||
## Building with Terminal
|
||||
1. Download the SDK and NDK from Android Studio.
|
||||
2. Navigate to SDK and NDK paths.
|
||||
3. Then set ANDROID_SDK_ROOT and ANDROID_NDK_ROOT in terminal via
|
||||
`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`.
|
||||
6. To build the optimised build use `./gradlew assembleGenshinSpoofRelWithDebInfo`.
|
||||
|
||||
### Script
|
||||
A convenience script for building is provided in `.ci/android/build.sh`. The built APK can be put into an `artifacts` directory via `.ci/android/package.sh`. On Windows, these must be done in the Git Bash or MinGW terminal.
|
||||
|
||||
### Additional Resources
|
||||
https://developer.android.com/studio/intro
|
||||
# Note: These build instructions are a work-in-progress.
|
||||
|
||||
## 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)
|
||||
* [Git](https://git-scm.com/download)
|
||||
|
||||
### WINDOWS ONLY - Additional Dependencies
|
||||
* **[Visual Studio 2022 Community](https://visualstudio.microsoft.com/downloads/)** - **Make sure to select "Desktop development with C++" support in the installer. Make sure to update to the latest version if already installed.**
|
||||
* **[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`.
|
||||
|
||||
## Cloning Eden with Git
|
||||
```
|
||||
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
|
||||
|
||||
## Building
|
||||
1. Start Android Studio, on the startup dialog select `Open`.
|
||||
2. Navigate to the `eden/src/android` directory and click on `OK`.
|
||||
3. In `Build > Select Build Variant`, select `release` or `relWithDebInfo` as the "Active build variant".
|
||||
4. Build the project with `Build > Make Project` or run it on an Android device with `Run > Run 'app'`.
|
||||
|
||||
## Building with Terminal
|
||||
1. Download the SDK and NDK from Android Studio.
|
||||
2. Navigate to SDK and NDK paths.
|
||||
3. Then set ANDROID_SDK_ROOT and ANDROID_NDK_ROOT in terminal via
|
||||
`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`.
|
||||
6. To build the optimised build use `./gradlew assembleGenshinSpoofRelWithDebInfo`.
|
||||
|
||||
### Script
|
||||
A convenience script for building is provided in `.ci/android/build.sh`. The built APK can be put into an `artifacts` directory via `.ci/android/package.sh`. On Windows, these must be done in the Git Bash or MinGW terminal.
|
||||
|
||||
### Additional Resources
|
||||
https://developer.android.com/studio/intro
|
||||
|
|
160
docs/build/FreeBSD.md
vendored
160
docs/build/FreeBSD.md
vendored
|
@ -1,81 +1,81 @@
|
|||
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
|
||||
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.
|
276
docs/build/Linux.md
vendored
276
docs/build/Linux.md
vendored
|
@ -1,138 +1,138 @@
|
|||
### 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
|
||||
```
|
||||
### 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
|
||||
```
|
||||
|
|
100
docs/build/Solaris.md
vendored
100
docs/build/Solaris.md
vendored
|
@ -1,51 +1,51 @@
|
|||
# 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.
|
||||
# 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.
|
386
docs/build/Windows.md
vendored
386
docs/build/Windows.md
vendored
|
@ -1,193 +1,193 @@
|
|||
# THIS GUIDE IS INTENDED FOR DEVELOPERS ONLY, SUPPORT WILL ONLY BE GIVEN IF YOU'RE A DEVELOPER.
|
||||
|
||||
## Method I: MSVC Build for Windows
|
||||
|
||||
### Minimal Dependencies
|
||||
|
||||
On Windows, all library dependencies are automatically included within the `externals` folder, or can be downloaded on-demand. To build Eden, you need to install:
|
||||
|
||||
* **[Visual Studio 2022 Community](https://visualstudio.microsoft.com/downloads/)** - **Make sure to select C++ support in the installer. Make sure to update to the latest version if already installed.**
|
||||
* **[CMake](https://cmake.org/download/)** - Used to generate Visual Studio project files. Does not matter if either 32-bit or 64-bit version is installed.
|
||||
* **[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** - We recommend [Git for Windows](https://gitforwindows.org).
|
||||
|
||||

|
||||
|
||||
* 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 Eden with Git
|
||||
|
||||
**Master:**
|
||||
```cmd
|
||||
git clone --recursive https://git.eden-emu.dev/eden-emu/eden
|
||||
cd eden
|
||||
```
|
||||
|
||||

|
||||
|
||||
* *(Note: eden by default downloads to `C:\Users\<user-name>\eden` (Master)
|
||||
|
||||
### Building
|
||||
|
||||
* Open the CMake GUI application and point it to the `eden` (Master)
|
||||
|
||||

|
||||
|
||||
* 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.
|
||||
|
||||

|
||||
|
||||
* *(Note: If you used GitHub's own app to clone, run `git submodule update --init --recursive` to get the remaining dependencies)*
|
||||
|
||||
* *(You may also want to disable `YUZU_TESTS` in this case since Catch2 is not yet supported with this.)*
|
||||
|
||||

|
||||
|
||||
* Click "Generate" to create the project files.
|
||||
|
||||

|
||||
|
||||
* Open the solution file `yuzu.sln` in Visual Studio 2022, which is located in the build folder.
|
||||
|
||||

|
||||
|
||||
* Depending if you want a graphical user interface or not (`eden` has the graphical user interface, while `eden-cmd` doesn't), select `eden` or `eden-cmd` 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 Release).
|
||||
|
||||

|
||||
|
||||
* Right-click the project you want to build and press Build in the submenu or press F5.
|
||||
|
||||

|
||||
|
||||
## Method II: MinGW-w64 Build with MSYS2
|
||||
|
||||
### Prerequisites to install
|
||||
|
||||
* [MSYS2](https://www.msys2.org)
|
||||
* [Vulkan SDK](https://vulkan.lunarg.com/sdk/home#windows) - **Make sure to select Latest SDK.**
|
||||
* Make sure to follow the instructions and update to the latest version by running `pacman -Syu` as many times as needed.
|
||||
|
||||
### Install eden dependencies for MinGW-w64
|
||||
|
||||
* Open the `MSYS2 MinGW 64-bit` (mingw64.exe) shell
|
||||
* 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 glslangValidator to the PATH: `echo 'PATH=$(readlink -e /c/VulkanSDK/*/Bin/):$PATH' >> ~/.bashrc`
|
||||
|
||||
### Clone the eden repository with Git
|
||||
|
||||
```bash
|
||||
git clone --recursive https://git.eden-emu.dev/eden-emu/eden
|
||||
cd eden
|
||||
```
|
||||
|
||||
### Run the following commands to build eden (dynamically linked build)
|
||||
|
||||
```bash
|
||||
mkdir build && cd build
|
||||
cmake -G "MSYS Makefiles" -DYUZU_TESTS=OFF ..
|
||||
make -j$(nproc)
|
||||
# test eden out with
|
||||
./bin/eden.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!)*
|
||||
|
||||
e.g.
|
||||
```Bash
|
||||
cp externals/ffmpeg-*/bin/*.dll bin/
|
||||
```
|
||||
|
||||
Bonus Note: 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.
|
||||

|
||||
|
||||
|
||||
### 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
|
||||
|
||||
## Method III: CLion Environment Setup
|
||||
|
||||
### Minimal Dependencies
|
||||
|
||||
To build eden, you need to install the following:
|
||||
|
||||
* [CLion](https://www.jetbrains.com/clion/) - This IDE is not free; for a free alternative, check Method I
|
||||
* [Vulkan SDK](https://vulkan.lunarg.com/sdk/home#windows) - Make sure to select the Latest SDK.
|
||||
|
||||
### Cloning eden with CLion
|
||||
|
||||
* Clone the Repository:
|
||||
|
||||

|
||||

|
||||

|
||||
|
||||
|
||||
|
||||
### Building & Setup
|
||||
|
||||
* Once Cloned, You will be taken to a prompt like the image below:
|
||||
|
||||

|
||||
|
||||
* 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`
|
||||
|
||||

|
||||
|
||||
* 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
|
||||
|
||||

|
||||
|
||||
* Now run by clicking the play button or pressing Shift+F10, and eden will auto-launch once built.
|
||||
|
||||

|
||||
|
||||
## Building from the command line with MSVC
|
||||
|
||||
```cmd
|
||||
git clone --recursive https://git.eden-emu.dev/eden-emu/eden
|
||||
cd eden
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -G "Visual Studio 17 2022" -A x64
|
||||
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, e.g. `WINDEPLOYQT="/c/Qt/6.9.1/msvc2022_64/bin/windeployqt6.exe" .ci/windows/build.sh`.
|
||||
|
||||
Extra CMake flags should be placed in the arguments of the script.
|
||||
|
||||
Additional environment variables can be used to control building:
|
||||
- `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
|
||||
- `BUNDLE_QT` (default FALSE): Use bundled Qt
|
||||
* Note that using system Qt requires you to include the Qt CMake directory in `CMAKE_PREFIX_PATH`, e.g. `.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`. Note that you must have 7-zip installed and in your PATH. The resulting zip will be placed into `artifacts` in the source directory.
|
||||
# THIS GUIDE IS INTENDED FOR DEVELOPERS ONLY, SUPPORT WILL ONLY BE GIVEN IF YOU'RE A DEVELOPER.
|
||||
|
||||
## Method I: MSVC Build for Windows
|
||||
|
||||
### Minimal Dependencies
|
||||
|
||||
On Windows, all library dependencies are automatically included within the `externals` folder, or can be downloaded on-demand. To build Eden, you need to install:
|
||||
|
||||
* **[Visual Studio 2022 Community](https://visualstudio.microsoft.com/downloads/)** - **Make sure to select C++ support in the installer. Make sure to update to the latest version if already installed.**
|
||||
* **[CMake](https://cmake.org/download/)** - Used to generate Visual Studio project files. Does not matter if either 32-bit or 64-bit version is installed.
|
||||
* **[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** - We recommend [Git for Windows](https://gitforwindows.org).
|
||||
|
||||

|
||||
|
||||
* 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 Eden with Git
|
||||
|
||||
**Master:**
|
||||
```cmd
|
||||
git clone --recursive https://git.eden-emu.dev/eden-emu/eden
|
||||
cd eden
|
||||
```
|
||||
|
||||

|
||||
|
||||
* *(Note: eden by default downloads to `C:\Users\<user-name>\eden` (Master)
|
||||
|
||||
### Building
|
||||
|
||||
* Open the CMake GUI application and point it to the `eden` (Master)
|
||||
|
||||

|
||||
|
||||
* 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.
|
||||
|
||||

|
||||
|
||||
* *(Note: If you used GitHub's own app to clone, run `git submodule update --init --recursive` to get the remaining dependencies)*
|
||||
|
||||
* *(You may also want to disable `YUZU_TESTS` in this case since Catch2 is not yet supported with this.)*
|
||||
|
||||

|
||||
|
||||
* Click "Generate" to create the project files.
|
||||
|
||||

|
||||
|
||||
* Open the solution file `yuzu.sln` in Visual Studio 2022, which is located in the build folder.
|
||||
|
||||

|
||||
|
||||
* Depending if you want a graphical user interface or not (`eden` has the graphical user interface, while `eden-cmd` doesn't), select `eden` or `eden-cmd` 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 Release).
|
||||
|
||||

|
||||
|
||||
* Right-click the project you want to build and press Build in the submenu or press F5.
|
||||
|
||||

|
||||
|
||||
## Method II: MinGW-w64 Build with MSYS2
|
||||
|
||||
### Prerequisites to install
|
||||
|
||||
* [MSYS2](https://www.msys2.org)
|
||||
* [Vulkan SDK](https://vulkan.lunarg.com/sdk/home#windows) - **Make sure to select Latest SDK.**
|
||||
* Make sure to follow the instructions and update to the latest version by running `pacman -Syu` as many times as needed.
|
||||
|
||||
### Install eden dependencies for MinGW-w64
|
||||
|
||||
* Open the `MSYS2 MinGW 64-bit` (mingw64.exe) shell
|
||||
* 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 glslangValidator to the PATH: `echo 'PATH=$(readlink -e /c/VulkanSDK/*/Bin/):$PATH' >> ~/.bashrc`
|
||||
|
||||
### Clone the eden repository with Git
|
||||
|
||||
```bash
|
||||
git clone --recursive https://git.eden-emu.dev/eden-emu/eden
|
||||
cd eden
|
||||
```
|
||||
|
||||
### Run the following commands to build eden (dynamically linked build)
|
||||
|
||||
```bash
|
||||
mkdir build && cd build
|
||||
cmake -G "MSYS Makefiles" -DYUZU_TESTS=OFF ..
|
||||
make -j$(nproc)
|
||||
# test eden out with
|
||||
./bin/eden.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!)*
|
||||
|
||||
e.g.
|
||||
```Bash
|
||||
cp externals/ffmpeg-*/bin/*.dll bin/
|
||||
```
|
||||
|
||||
Bonus Note: 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.
|
||||

|
||||
|
||||
|
||||
### 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
|
||||
|
||||
## Method III: CLion Environment Setup
|
||||
|
||||
### Minimal Dependencies
|
||||
|
||||
To build eden, you need to install the following:
|
||||
|
||||
* [CLion](https://www.jetbrains.com/clion/) - This IDE is not free; for a free alternative, check Method I
|
||||
* [Vulkan SDK](https://vulkan.lunarg.com/sdk/home#windows) - Make sure to select the Latest SDK.
|
||||
|
||||
### Cloning eden with CLion
|
||||
|
||||
* Clone the Repository:
|
||||
|
||||

|
||||

|
||||

|
||||
|
||||
|
||||
|
||||
### Building & Setup
|
||||
|
||||
* Once Cloned, You will be taken to a prompt like the image below:
|
||||
|
||||

|
||||
|
||||
* 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`
|
||||
|
||||

|
||||
|
||||
* 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
|
||||
|
||||

|
||||
|
||||
* Now run by clicking the play button or pressing Shift+F10, and eden will auto-launch once built.
|
||||
|
||||

|
||||
|
||||
## Building from the command line with MSVC
|
||||
|
||||
```cmd
|
||||
git clone --recursive https://git.eden-emu.dev/eden-emu/eden
|
||||
cd eden
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -G "Visual Studio 17 2022" -A x64
|
||||
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, e.g. `WINDEPLOYQT="/c/Qt/6.9.1/msvc2022_64/bin/windeployqt6.exe" .ci/windows/build.sh`.
|
||||
|
||||
Extra CMake flags should be placed in the arguments of the script.
|
||||
|
||||
Additional environment variables can be used to control building:
|
||||
- `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
|
||||
- `BUNDLE_QT` (default FALSE): Use bundled Qt
|
||||
* Note that using system Qt requires you to include the Qt CMake directory in `CMAKE_PREFIX_PATH`, e.g. `.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`. Note that you must have 7-zip installed and in your PATH. The resulting zip will be placed into `artifacts` in the source directory.
|
||||
|
|
183
docs/build/macOS.md
vendored
183
docs/build/macOS.md
vendored
|
@ -1,105 +1,78 @@
|
|||
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.
|
||||
|
||||
## Method I: ninja
|
||||
---
|
||||
If you are compiling on Intel Mac or are using a Rosetta Homebrew installation, you must replace all references of `/opt/homebrew` to `/usr/local`.
|
||||
|
||||
Install dependencies from Homebrew:
|
||||
```sh
|
||||
brew install autoconf automake boost ccache ffmpeg fmt glslang hidapi libtool libusb lz4 ninja nlohmann-json openssl pkg-config qt@6 sdl2 speexdsp zlib zlib zstd cmake Catch2 molten-vk vulkan-loader
|
||||
```
|
||||
|
||||
Clone the repo
|
||||
```sh
|
||||
git clone --recursive https://git.eden-emu.dev/eden-emu/eden
|
||||
|
||||
cd eden
|
||||
```
|
||||
|
||||
Build for release
|
||||
```sh
|
||||
mkdir build && cd build
|
||||
|
||||
export Qt6_DIR="/opt/homebrew/opt/qt@6/lib/cmake"
|
||||
|
||||
export LIBVULKAN_PATH=/opt/homebrew/lib/libvulkan.dylib
|
||||
|
||||
cmake .. -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DYUZU_USE_BUNDLED_VCPKG=OFF -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` after `cmake ..`
|
||||
|
||||
Build with debug symbols (vcpkg is not currently used due to broken boost-context library):
|
||||
```sh
|
||||
mkdir build && cd build
|
||||
export Qt6_DIR="/opt/homebrew/opt/qt@6/lib/cmake"
|
||||
cmake .. -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DYUZU_USE_BUNDLED_VCPKG=OFF -DYUZU_TESTS=OFF -DENABLE_WEB_SERVICE=OFF -DENABLE_LIBUSB=OFF
|
||||
ninja
|
||||
```
|
||||
|
||||
Run the output:
|
||||
```
|
||||
bin/eden.app/Contents/MacOS/eden
|
||||
```
|
||||
|
||||
## Method II: Xcode
|
||||
|
||||
---
|
||||
If you are compiling on Intel Mac or are using a Rosetta Homebrew installation, you must replace all references of `/opt/homebrew` to `/usr/local`.
|
||||
|
||||
Install dependencies from Homebrew:
|
||||
```sh
|
||||
brew install autoconf automake boost ccache ffmpeg fmt glslang hidapi libtool libusb lz4 ninja nlohmann-json openssl pkg-config qt@6 sdl2 speexdsp zlib zlib zstd cmake Catch2 molten-vk vulkan-loader
|
||||
```
|
||||
|
||||
Clone the repo
|
||||
```sh
|
||||
git clone --recursive https://git.eden-emu.dev/eden-emu/eden
|
||||
|
||||
cd eden
|
||||
```
|
||||
|
||||
Build for release
|
||||
```sh
|
||||
mkdir build && cd build
|
||||
|
||||
export Qt6_DIR="/opt/homebrew/opt/qt@6/lib/cmake"
|
||||
|
||||
export LIBVULKAN_PATH=/opt/homebrew/lib/libvulkan.dylib
|
||||
|
||||
cmake .. -GXcode -DCMAKE_BUILD_TYPE=RelWithDebInfo -DYUZU_USE_BUNDLED_VCPKG=OFF -DYUZU_TESTS=OFF -DENABLE_WEB_SERVICE=ON -DENABLE_LIBUSB=OFF -DCLANG_FORMAT=ON -DSDL2_DISABLE_INSTALL=ON -DSDL_ALTIVEC=ON
|
||||
|
||||
xcodebuild build -project eden.xcodeproj -scheme "eden" -configuration "RelWithDebInfo"
|
||||
```
|
||||
|
||||
You may also want to include support for Discord Rich Presence by adding `-DUSE_DISCORD_PRESENCE=ON` after `cmake ..`
|
||||
|
||||
Build with debug symbols (vcpkg is not currently used due to broken boost-context library):
|
||||
```sh
|
||||
mkdir build && cd build
|
||||
export Qt6_DIR="/opt/homebrew/opt/qt@6/lib/cmake"
|
||||
cmake .. -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DYUZU_USE_BUNDLED_VCPKG=OFF -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
|
||||
```
|
||||
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