(想用 LibreWolf 试试但是死活登不上去,只能用 Chrome(对,不是 Chromium)凑合一下了)
0. 前言
这玩意折腾了我**三天。**少折腾 86Box,咱还是多多看看我这个教程吧。
1. Linux 上编译 Qt 6 版 86Box
我这个电脑是 Debian 13,自带的 KDE Plasma 版本就是 6 点儿,呃… 6.3,本质上用的就是 Qt 6。86Box 默认用的 Qt 5,但是 Plasma 6 说实话不是那么太兼容 Qt 5/KF51 的程序的。
于是呢,这 86Box 也是一个典型 CMake 程序,我们直接用 cmake . -D USE_QT6=ON 得了… 等会:
plaintext
CMake Warning at src/qt/CMakeLists.txt:53 (find_package):
Found package configuration file:
/usr/lib/x86_64-linux-gnu/cmake/Qt6/Qt6Config.cmake
but it set Qt6_FOUND to FALSE so package "Qt6" is considered to be NOT
FOUND. Reason given by package:
Failed to find required Qt component "GuiPrivate".
Expected Config file at
"/usr/lib/x86_64-linux-gnu/cmake/Qt6GuiPrivate/Qt6GuiPrivateConfig.cmake"
does NOT exist
Configuring with --debug-find-pkg=Qt6GuiPrivate might reveal details why
the package was not found.
Configuring with -DQT_DEBUG_FIND_PACKAGE=ON will print the values of some
of the path variables that find_package uses to try and find the package.
这是啥意思呢,上网一查,Krita 也有个类似毛病
(葡萄干!),然后发现这应该是 Qt 6.8 更新导致 GuiPrivate 被合并了(傻逼 Qt),解决方法很简单:
原先的 [src/qt/CMakeLists.txt] 是这么写的
cmake
find_package(Threads REQUIRED)
find_package(Qt${QT_MAJOR} COMPONENTS Core Widgets Network OpenGL Gui REQUIRED)
find_package(Qt${QT_MAJOR}LinguistTools REQUIRED NO_CMAKE_FIND_ROOT_PATH)
if(USE_QT6)
set(QT_NO_PRIVATE_MODULE_WARNING ON)
find_package(Qt6 COMPONENTS GuiPrivate)
else()
include_directories(${Qt5Gui_PRIVATE_INCLUDE_DIRS})
endif()
把这行 find_package(Qt6 COMPONENTS GuiPrivate) 注释掉就能编译了。cmake --build .。编译很快。紧接着下载
roms,也是很简单,照做就可以了。
然后照做 BetaWiki 的 VM 配置,这里用的是 NT 4 的配置改的(但是装的确实是 3.51)
Footnotes
-
KDE Framework,KDE 额外给 Plasma 和其他应用写的框架 ↩