mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-10-06 00:02:44 +02:00
[docs] add into docs/ and make links local (#93)
Co-authored-by: crueter <crueter@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/93 Co-authored-by: lizzie <lizzie@eden-emu.dev> Co-committed-by: lizzie <lizzie@eden-emu.dev>
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
# SPDX-FileCopyrightText: 2025 eden Emulator Project
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
export ARCH="$(uname -m)"
|
||||
|
||||
case "$1" in
|
||||
amd64|"")
|
||||
@@ -11,15 +10,15 @@ case "$1" in
|
||||
ARCH="amd64_v3"
|
||||
ARCH_FLAGS="-march=x86-64-v3"
|
||||
;;
|
||||
steamdeck)
|
||||
steamdeck|zen2)
|
||||
echo "Making Steam Deck (Zen 2) optimized build of Eden"
|
||||
ARCH="steamdeck"
|
||||
ARCH_FLAGS="-march=znver2 -mtune=znver2"
|
||||
;;
|
||||
rog-ally|allyx)
|
||||
rog-ally|allyx|zen4)
|
||||
echo "Making ROG Ally X (Zen 4) optimized build of Eden"
|
||||
ARCH="rog-ally-x"
|
||||
ARCH_FLAGS="-march=znver3 -mtune=znver4" # GH actions runner is a Zen 3 CPU, so a small workaround
|
||||
ARCH_FLAGS="-march=znver4 -mtune=znver4"
|
||||
;;
|
||||
legacy)
|
||||
echo "Making amd64 generic build of Eden"
|
||||
@@ -36,8 +35,13 @@ case "$1" in
|
||||
ARCH=armv9
|
||||
ARCH_FLAGS="-march=armv9-a -mtune=generic -w"
|
||||
;;
|
||||
native)
|
||||
echo "Making native build of Eden"
|
||||
ARCH="$(uname -m)"
|
||||
ARCH_FLAGS="-march=native -mtune=native"
|
||||
;;
|
||||
*)
|
||||
echo "Invalid target $1 specified, must be one of amd64, steamdeck, allyx, rog-ally, legacy, aarch64, armv9"
|
||||
echo "Invalid target $1 specified, must be one of native, amd64, steamdeck, zen2, allyx, rog-ally, zen4, legacy, aarch64, armv9"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
@@ -16,11 +16,11 @@ case "$1" in
|
||||
echo "Packaging amd64-v3 optimized build of Eden"
|
||||
ARCH="amd64_v3"
|
||||
;;
|
||||
steamdeck)
|
||||
steamdeck|zen2)
|
||||
echo "Packaging Steam Deck (Zen 2) optimized build of Eden"
|
||||
ARCH="steamdeck"
|
||||
;;
|
||||
rog-ally|allyx)
|
||||
rog-ally|allyx|zen4)
|
||||
echo "Packaging ROG Ally X (Zen 4) optimized build of Eden"
|
||||
ARCH="rog-ally-x"
|
||||
;;
|
||||
@@ -36,6 +36,11 @@ case "$1" in
|
||||
echo "Packaging armv9-a build of Eden"
|
||||
ARCH=armv9
|
||||
;;
|
||||
native)
|
||||
echo "Packaging native build of Eden"
|
||||
ARCH="$BASE_ARCH"
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
export BUILDDIR="$2"
|
||||
|
@@ -1,19 +0,0 @@
|
||||
echo off
|
||||
|
||||
call C:\tools\cygwin\cygwinsetup.exe -q -P autoconf,automake,libtool,make,pkg-config
|
||||
|
||||
REM Create wrapper batch files for Cygwin tools in a directory that will be in PATH
|
||||
REM uncomment this for first-run only
|
||||
REM call mkdir C:\cygwin-wrappers
|
||||
|
||||
REM Create autoconf.bat wrapper
|
||||
call echo @echo off > C:\cygwin-wrappers\autoconf.bat
|
||||
call echo C:\tools\cygwin\bin\bash.exe -l -c "autoconf %%*" >> C:\cygwin-wrappers\autoconf.bat
|
||||
|
||||
REM Add other wrappers if needed for other Cygwin tools
|
||||
call echo @echo off > C:\cygwin-wrappers\automake.bat
|
||||
call echo C:\tools\cygwin\bin\bash.exe -l -c "automake %%*" >> C:\cygwin-wrappers\automake.bat
|
||||
|
||||
REM Add the wrappers directory to PATH
|
||||
call echo C:\cygwin-wrappers>>"%GITHUB_PATH%"
|
||||
call echo C:\tools\cygwin\bin>>"%GITHUB_PATH%"
|
@@ -3,7 +3,7 @@
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
$VulkanSDKVer = "1.3.250.1"
|
||||
$VulkanSDKVer = "1.4.321.1"
|
||||
$ExeFile = "VulkanSDK-$VulkanSDKVer-Installer.exe"
|
||||
$Uri = "https://sdk.lunarg.com/sdk/download/$VulkanSDKVer/windows/$ExeFile"
|
||||
$Destination = "./$ExeFile"
|
||||
|
@@ -1,7 +0,0 @@
|
||||
# This is specific to the CI runner and is unlikely to work on your machine.
|
||||
QTDIR="/c/Qt/6.9.0/msvc2022_64"
|
||||
|
||||
export QT_ROOT_DIR="$QTDIR"
|
||||
export QT_PLUGIN_PATH="$QTDIR/plugins"
|
||||
export QML2_IMPORT_PATH="$QTDIR/qml"
|
||||
export PATH="${PATH};$QTDIR/bin"
|
2
.gitignore
vendored
2
.gitignore
vendored
@@ -5,7 +5,7 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
# Build directory
|
||||
[Bb]uild*/
|
||||
/[Bb]uild*/
|
||||
doc-build/
|
||||
AppDir/
|
||||
uruntime
|
||||
|
14
README.md
14
README.md
@@ -9,13 +9,13 @@
|
||||
|
||||
<h1 align="center">
|
||||
<br>
|
||||
<a href="https://git.eden-emu.dev/eden-emu/eden"><img src="https://git.eden-emu.dev/eden-emu/eden/raw/branch/master/dist/qt_themes/default/icons/256x256/eden_named.png" alt="Eden" width="200"></a>
|
||||
<a href="https://git.eden-emu.dev/eden-emu/eden"><img src="./dist/qt_themes/default/icons/256x256/eden_named.png" alt="Eden" width="200"></a>
|
||||
<br>
|
||||
<b>Eden</b>
|
||||
<br>
|
||||
</h1>
|
||||
|
||||
<h4 align="center"><b>Eden</b> is the world's most popular open-source Nintendo Switch emulator, forked from the Yuzu emulator — started by former Citron developer Camille LaVey and the Eden team.
|
||||
<h4 align="center"><b>Eden</b> is a open-source Nintendo Switch emulator, forked from the Yuzu emulator — started by former Citron developer Camille LaVey and the Eden team.
|
||||
<br>
|
||||
It is written in C++ with portability in mind, and we actively maintain builds for Windows, Linux and Android.
|
||||
</h4>
|
||||
@@ -54,13 +54,15 @@ You can also contact any of the developers on Discord to learn more about the cu
|
||||
|
||||
## Building
|
||||
|
||||
* **Windows**: [Windows Building Guide](https://git.eden-emu.dev/eden-emu/eden/wiki/Building-for-Windows.-)
|
||||
* **Linux**: [Linux Building Guide](https://git.eden-emu.dev/eden-emu/eden/wiki/Building-for-Linux.-)
|
||||
* **Android**: [Android Building Guide](https://git.eden-emu.dev/eden-emu/eden/wiki/Building-for-Android.-)
|
||||
* **Windows**: [Windows Building Guide](./docs/build/Windows.md)
|
||||
* **Linux**: [Linux Building Guide](./docs/build/Linux.md)
|
||||
* **Android**: [Android Building Guide](./docs/build/Android.md)
|
||||
* **FreeBSD**: [FreeBSD Building Guide](./docs/build/FreeBSD.md)
|
||||
* **macOS**: [macOS Building Guide](./docs/build/macOS.md)
|
||||
|
||||
## Download
|
||||
|
||||
You will be able to download the latest releases from [here](https://github.com/eden-emulator/Releases/releases).
|
||||
You can download the latest releases from [here](https://github.com/eden-emulator/Releases/releases).
|
||||
|
||||
## Support
|
||||
|
||||
|
42
docs/build/Android.md
vendored
Normal file
42
docs/build/Android.md
vendored
Normal file
@@ -0,0 +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
|
81
docs/build/FreeBSD.md
vendored
Normal file
81
docs/build/FreeBSD.md
vendored
Normal file
@@ -0,0 +1,81 @@
|
||||
## One word of caution before proceeding.
|
||||
This is not the usual or preferred way to build programs on FreeBSD.
|
||||
As of writing there is no official fresh port available for eden-emu, but it is in the works.
|
||||
After it is available you can find a link to the eden-emu fresh port here and on Escarys github repo.
|
||||
See this build as an App Image alternative for FreeBSD.
|
||||
|
||||
## Dependencies.
|
||||
Before we start we need some dependencies.
|
||||
These dependencies are generally needed to build eden-emu on FreeBSD.
|
||||
|
||||
```
|
||||
devel/cmake
|
||||
devel/sdl20
|
||||
devel/boost-libs
|
||||
devel/catch2
|
||||
devel/libfmt
|
||||
devel/nlohmann-json
|
||||
devel/ninja
|
||||
devel/nasm
|
||||
devel/autoconf
|
||||
devel/pkg-config
|
||||
devel/qt6-base
|
||||
|
||||
multimedia/ffnvcodec-headers
|
||||
multimedia/ffmpeg
|
||||
|
||||
audio/opus
|
||||
|
||||
archivers/liblz4
|
||||
|
||||
lang/gcc12
|
||||
|
||||
graphics/glslang
|
||||
graphics/vulkan-utility-libraries
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### 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
|
||||
```
|
||||
|
||||
Now choose one option either 1 or 2, but not both as one option overwrites the other.
|
||||
|
||||
#### 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
|
||||
```
|
135
docs/build/Linux.md
vendored
Normal file
135
docs/build/Linux.md
vendored
Normal file
@@ -0,0 +1,135 @@
|
||||
### 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/)
|
||||
|
||||
All other dependencies will be downloaded by [vcpkg](https://vcpkg.io/) if needed:
|
||||
|
||||
* [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/)
|
||||
* [ZLIB](https://www.zlib.net/) 1.2+
|
||||
* [zstd](https://facebook.github.io/zstd/) 1.5+
|
||||
|
||||
If an ARM64 build is intended, export `VCPKG_FORCE_SYSTEM_BINARIES=1`.
|
||||
|
||||
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 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++-11 gcc-11 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 qtbase6-dev qtbase6-private-dev qtwebengine6-dev qtmultimedia6-dev libmbedtls-dev catch2 libfmt-dev liblz4-dev nlohmann-json3-dev libzstd-dev libssl-dev libavfilter-dev libavcodec-dev libswscale-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 specify building with GCC 11. This can be done by adding the parameters `-DCMAKE_C_COMPILER=gcc-11 -DCMAKE_CXX_COMPILER=g++-11` when running CMake. i.e.
|
||||
- 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`
|
||||
|
||||
```
|
||||
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 qt5-linguist qt5-qtbase{-private,}-devel qt5-qtwebengine-devel qt5-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
|
||||
```
|
195
docs/build/Windows.md
vendored
Normal file
195
docs/build/Windows.md
vendored
Normal file
@@ -0,0 +1,195 @@
|
||||
# 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)*
|
||||
|
||||
* If you get an error about missing packages, enable `YUZU_USE_BUNDLED_VCPKG`, and then click Configure again.
|
||||
|
||||
* *(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_USE_BUNDLED_VCPKG=ON -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.
|
105
docs/build/macOS.md
vendored
Normal file
105
docs/build/macOS.md
vendored
Normal file
@@ -0,0 +1,105 @@
|
||||
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
|
||||
```
|
Reference in New Issue
Block a user