Dolphin-2512

#### Supplemental Linux® From Scratch - Version 13.0

### Chapter 21. Video Game Emulators

- Prev

  Introduction to Nintendo GameCube/Wii Emulation

- Next

  Introduction to Nintendo 64 Emulation

- Up
- Home

# Dolphin-2512

## Introduction to Dolphin

The Dolphin package (not to be confused with the KF6 dolphin file manager) provides a GCN and Wii emulator.

- Download: https://github.com/dolphin-emu/dolphin

### Dolphin Dependencies

#### Required

CMake, FFmpeg, libevdev, OpenGL (libglvnd or Mesa; Mesa's GL is not supported), and Xorg Libraries

#### Recommended

alsa-utils, BlueZ, cURL, enet-1.3.18, fmt, HIDAPI-0.15.0, libspng-0.7.4, libusb, libxkbcommon, libxml2, LLVM, Systemd, minizip from zlib-1.3.2, pugixml-1.15, PulseAudio, Qt-6, SDL3, Speex, and Vulkan-Loader

#### Optional

Mbed-TLS-3.6.5

## Downloading Dolphin

Create a list of the needed tarballs that will be downloaded:

    cat > dolphin-list << "EOF"
    dolphin-emu/dolphin/archive/2512/dolphin-2512.tar.gz
    SFML/SFML/archive/0fa201c969e48ecc253581c5841ce73f44d42f49.tar.gz
    GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator/archive/3bab6924988e5f19bf36586a496156cf72f70d9f.tar.gz
    mozilla/cubeb/archive/54217bca3f3e0cd53c073690a23dd25d83557909.tar.gz
    arsenm/sanitizers-cmake/archive/aab6948fa863bc1cbe5d0850bc46b9ef02ed4c1a.tar.gz
    mutouyun/cpp-ipc/archive/ce0773b3e6d5abaa8d104100c5704321113853ca.tar.gz
    weisslj/cpp-optparse/archive/2265d647232249a53a03b411099863ceca35f0d3.tar.gz
    ocornut/imgui/archive/45acd5e0e82f4c954432533ae9985ff0e1aad6d5.tar.gz
    epezent/implot/archive/3da8bd34299965d3b0ab124df743fe3e076fa222.tar.gz
    mgba-emu/mgba/archive/0b40863f64d0940f333fa1c638e75f86f8a26a33.tar.gz
    miniupnp/miniupnp/archive/bf4215a7574f88aa55859db9db00e3ae58cf42d6.tar.gz
    zlib-ng/minizip-ng/archive/55db144e03027b43263e5ebcb599bf0878ba58de.tar.gz
    RetroAchievements/rcheevos/archive/926e4608f8dca7989267c787bbefb3ab1c835ac5.tar.gz
    KhronosGroup/SPIRV-Cross/archive/ebe2aa0cd80f5eb5cd8a605da604cacf72205f3b.tar.gz
    syoyo/tinygltf/archive/c5641f2c22d117da7971504591a8f6a41ece488b.tar.gz
    e-dant/watcher/archive/b03bdcfc11549df595b77239cefe2643943a3e2f.tar.gz
    Cyan4973/xxHash/archive/e626a72bc2321cd320e953a0ccf1584cad60f363.tar.gz
    zlib-ng/zlib-ng/archive/ce01b1e41da298334f8214389cc9369540a7560f.tar.gz

    # Required if you have not installed some recommended dependencies
    lsalzman/enet/archive/2662c0de09e36f2a2030ccc2c528a3e4c9e8138a.tar.gz
    fmtlib/fmt/archive/e69e5f977d458f2650bb346dadf2ad30c5320281.tar.gz
    randy408/libspng/archive/fb768002d4288590083a476af628e51c3f1d47cd.tar.gz
    libusb/libusb/archive/15a7ebb4d426c5ce196684347d2b7cafad862626.tar.gz
    libusb/hidapi/archive/d6b2a974608dec3b76fb1e36c189f22b9cf3650c.tar.gz
    EOF

Now download the package, its submodules, and needed patches if applicable, using Wget:

    mkdir dolphin-emu &&
    cd    dolphin-emu &&
    grep -v '^#' ../dolphin-list | wget -i- -c \
        -B https://github.com

## Installation of Dolphin

Extract all the tarballs:

    for i in *.tar.?z*; do
      echo "Extracting $i..."
      tar -xf $i
    done

Now that everything has been extracted, the required extracted submodules need to be moved into `dolphin-2512`. Do that by running the following commands:

    mv -T SFML-* dolphin-2512/Externals/SFML/SFML &&
    mv -T VulkanMemoryAllocator-* \
          dolphin-2512/Externals/VulkanMemoryAllocator &&
    mv -T cubeb-* dolphin-2512/Externals/cubeb/cubeb &&
    mv -T sanitizers-cmake-* \
          dolphin-2512/Externals/cubeb/cubeb/cmake/sanitizers-cmake &&
    mv -T cpp-ipc-* dolphin-2512/Externals/cpp-ipc/cpp-ipc &&
    mv -T cpp-optparse-* \
          dolphin-2512/Externals/cpp-optparse/cpp-optparse &&
    mv -T imgui-* dolphin-2512/Externals/imgui/imgui &&
    mv -T implot-* dolphin-2512/Externals/implot/implot &&
    mv -T mgba-* dolphin-2512/Externals/mGBA/mgba &&
    mv -T miniupnp-* dolphin-2512/Externals/miniupnpc/miniupnp &&
    mv -T minizip-ng-* dolphin-2512/Externals/minizip-ng/minizip-ng &&
    mv -T rcheevos-* dolphin-2512/Externals/rcheevos/rcheevos &&
    mv -T SPIRV-Cross-* dolphin-2512/Externals/spirv_cross/SPIRV-Cross &&
    mv -T tinygltf-* dolphin-2512/Externals/tinygltf/tinygltf &&
    mv -T watcher-* dolphin-2512/Externals/watcher/watcher &&
    mv -T xxHash-* dolphin-2512/Externals/xxhash/xxHash &&
    mv -T zlib-ng-* dolphin-2512/Externals/zlib-ng/zlib-ng

If you have not installed enet-1.3.18, move the submodule into `dolphin-2512`:

    mv -T enet-* dolphin-2512/Externals/enet/enet

If you have not installed fmt, move the submodule into `dolphin-2512`:

    mv -T fmt-* dolphin-2512/Externals/fmt/fmt

If you have not installed libspng-0.7.4, move the submodule into `dolphin-2512`:

    mv -T libspng-* dolphin-2512/Externals/libspng/libspng

If you have not installed libusb, move the submodule into `dolphin-2512`:

    mv -T libusb-* dolphin-2512/Externals/libusb/libusb

If you have not installed HIDAPI-0.15.0, move the submodule into `dolphin-2512`:

    mv -T hidapi-* dolphin-2512/Externals/hidapi/hidapi-src

Now go into the `dolphin-2512` directory:

    cd dolphin-2512

Remove a dirty suffix that prevents building for netplay support:

    sed -i 's/--dirty/&=""/' CMake/ScmRevGen.cmake

Install Dolphin by running the following commands:

    mkdir build &&
    cd    build &&

    cmake -D CMAKE_INSTALL_PREFIX=/usr        \
          -D CMAKE_BUILD_TYPE=Release         \
          -D CMAKE_SKIP_INSTALL_RPATH=ON      \
          -D CMAKE_POLICY_VERSION_MINIMUM=3.5 \
          -D ENABLE_TESTS=OFF                 \
          -D USE_SYSTEM_LIBMGBA=OFF           \
          -G Ninja -W no-dev .. &&

    ninja

Now, as the `root` user:

    ninja install

## Command Explanations

`-D CMAKE_SKIP_INSTALL_RPATH=ON`: This switch makes cmake remove hardcoded library search paths (rpath) when installing a binary executable file or a shared library. This package does not need rpath once it's installed into the standard location, and rpath may sometimes cause unwanted effects or even security issues.

`-D CMAKE_POLICY_VERSION_MINIMUM=3.5`: This switch allows building this package with cmake-4.0 or newer.

`-D ENABLE_TESTS=OFF`: This parameter disables building unit tests.

`-D USE_SYSTEM_LIBMGBA=OFF`: This parameter forces the build system to build the vendored copy of mGBA; otherwise, there will be compilation errors if mGBA-afa6fb is installed due to different versions (compiling an older mGBA results in compilation errors because of it requiring an older FFmpeg version).

## Contents

Installed Programs: dolphin-emu, dolphin-emu-nogui, and dolphin-tool
Installed Libraries: None
Installed Directories: /usr/share/dolphin-emu

### Short Descriptions

dolphin-emu | is the GUI version of Dolphin
dolphin-emu-nogui | is the command-line version of Dolphin
dolphin-tool | has multiple functions such as managing disc images

- Prev

  Introduction to Nintendo GameCube/Wii Emulation

- Next

  Introduction to Nintendo 64 Emulation

- Up
- Home