0. 环境
i5实体机ubuntu22
1. 安装依赖
$ sudo apt install build-essential git cmake ffmpeg libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libevdev-dev libusb-1.0-0-dev libxrandr-dev libxi-dev libpangocairo-1.0-0 qt6-base-private-dev libbluetooth-dev libasound2-dev libpulse-dev libgl1-mesa-dev$ sudo apt install libudev-dev libsystemd-dev || sudo apt install libeudev-dev #distros without systemd like AntiX must use eudev instead
安装qt6
$ sudo apt install qt6-base-dev qt6-base-private-dev qt6-multimedia-dev
$ sudo apt install qt6-l10n-tools qt6-tools-dev qt6-tools-dev-tools
$ sudo apt install libgl-dev
2. 获取源码
$ git clone https://github.com/dolphin-emu/dolphin
$ cd dolphin$ git submodule update --init Externals/mGBA
$ git submodule update --init Externals/spirv_cross
$ git submodule update --init Externals/zlib-ng
$ git submodule update --init Externals/libspng
$ git submodule update --init Externals/VulkanMemoryAllocator
$ git submodule update --init --recursive Externals/cubeb
$ git submodule update --init Externals/implot
$ git submodule update --init Externals/gtest
$ git submodule update --init Externals/rcheevos$ git pull --recurse-submodules
压缩备份
$ tar -zcvf dolphin_git_src_20230729.tar.gz dolphin/
备注:git clone到最后总是提示 curl什么错误,于是到自己买的1C1G1M服务器中克隆下载。
3. 编译
$ mkdir build && cd build
$ cmake ..
$ make -j8
问题:Could NOT find Qt6Svg
方法:sudo apt install libgl-dev libqt6opengl6-dev libvulkan-dev ninja-build pkg-config pkg-kde-tools qt6-base-dev qt6-base-private-dev zlib1g-dev libqt6svg6-dev
这里可以搜索到相关依赖:https://packages.ubuntu.com/source/kinetic/arm64/qt6-svg
问题:No SOURCES given to target: usb(若出现这个问题,需要删除build重新执行编译)
sudo apt install libusb-dev
sudo apt install libusb-1.0-0-dev
问题:No SOURCES given to target: curl
sudo apt install libcurl4-gnutls-dev
4. 运行测试
xxjianvm@xxjianvm-virtual-machine:~/work/dolphin/build/Binaries$ ./dolphin-emu
Warning: Ignoring WAYLAND_DISPLAY on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
An error occurred.Condition: icon.availableSizes().size() > 0File: /home/xxjianvm/work/dolphin/Source/Core/DolphinQt/Resources.cppLine: 53Function: LoadNamedIconIgnore and continue?
Illegal instruction (core dumped)
xxjianvm@xxjianvm-virtual-machine:~/work/dolphin/build/Binaries$
这个问题 在build目录下sudo make install 后解决。
参考:https://github.com/dolphin-emu/dolphin/wiki/Building-for-Linux