Wine 运行时构建
提供的运行时
Section titled “提供的运行时”wine-build 仓库用于可复现地构建和打包 Bob-Ddong-Iri-Hoyo 启动器使用的 macOS Wine 运行时。
目前维护三个运行时系列。
| 运行时 | 构建命令 | 输出路径 |
|---|---|---|
wine-winehq-11.11 | ./scripts/winehq-11.11/build-all.sh | artifacts/wine-winehq-11.11/wine-winehq-11.11 |
wine-winehq-11 | ./scripts/winehq-11/build-all.sh | artifacts/wine-winehq-11/wine-winehq-11 |
wine-crossover-26.1.0 | ./scripts/crossover-26.1.0/build-all.sh | artifacts/wine-crossover-26.1.0/wine-crossover-26.1.0 |
WineHQ 11.11 是当前 WineHQ 系列的基准构建。 WineHQ 11.0 是独立的对比和兼容系列。 CrossOver 26.1.0 使用基于 CrossOver 的独立 patch set,默认不包含 WineHQ 专用的 DWProton extras 或 HoYoPlay proxy。
构建流程以 macOS 为基准。 请先准备 Homebrew 依赖和共享 toolchain。
./scripts/common/install-brew-deps.sh./scripts/common/fetch-toolchain.sh每个 build-all.sh 也会调用共享 toolchain 步骤。
首次构建时先执行上面的准备命令,可以更容易区分依赖问题和运行时构建问题。
按目标运行时执行对应的 build-all.sh。
./scripts/winehq-11.11/build-all.sh./scripts/winehq-11/build-all.sh./scripts/crossover-26.1.0/build-all.sh需要干净重放 patch 时,请先执行目标运行时的 clean.sh。
./scripts/winehq-11.11/clean.sh./scripts/winehq-11.11/build-all.shclean.sh 会移除所选 flavor 的 source 和 output,但保留共享下载缓存和 toolchain。
验证 patch 应用状态时,建议不要使用 --keep-source,而是执行 clean build。
CrossOver 系列按以下流程构建。
common/fetch-toolchain.shcrossover-26.1.0/fetch-source.shcrossover-26.1.0/apply-patches.shcrossover-26.1.0/configure.shcommon/build.shcommon/install.shcommon/package.shWineHQ 系列还会准备 DWProton extras 和 HoYoPlay proxy。
common/fetch-toolchain.shBDIH-HelperProgram/hoyoplay-proxy/build.shwinehq-*/fetch-source.shwinehq-*/apply-patches.shwinehq-*/fetch-dwproton-source.shwinehq-*/prepare-dwproton-lsteamclient.shwinehq-*/configure.shcommon/build.shwinehq-*/build-proton-steam.shcommon/install.shcommon/package.shWineHQ 包包含 DWProton steam.exe、lsteamclient、HoYoPlay proxy、GStreamer、macOS msync、Steam CEF 兼容补丁和 HoYoPlay 路由 backend。
CrossOver 包包含 Steam 和 object-directory 兼容补丁,以及共享 process telemetry 补丁,但默认不包含 WineHQ 专用 extras。
Steam 基准
Section titled “Steam 基准”WineHQ 和 CrossOver 系列对符合条件的 steamwebhelper.exe 进程使用同一组 Steam UI 稳定性参数。
--no-sandbox --in-process-gpu --disable-gpu这些参数不会附加到 steam.exe 本身。
它们也不会注入到 crashpad handler 或 host-resolver helper 中。
Steam overlay DLL override 不是 Wine 补丁的一部分,进行 overlay 对比测试时需要单独指定。
HoYoPlay 基准
Section titled “HoYoPlay 基准”WineHQ 系列包含一个 backend,用于检测 HoYoPlay 试图启动的游戏 child process,并发送 route event,让启动器可以在独立 game prefix 中启动真正的游戏。 这种结构把 HoYoPlay 登录和更新状态留在 launcher prefix 中,把 DXMT、media、HoYoProtect、msync 等游戏状态分离到 game prefix。
这并不是 Wine 单独完成的用户流程。 Bob-Ddong-Iri-Hoyo 启动器需要负责 prefix 创建、事件验证、game profile 准备、实际启动和进程追踪。
Eternal Return 相关记录
Section titled “Eternal Return 相关记录”WineHQ 11.11 在 Eternal Return 运行时曾观察到比 WineHQ 11.0 更高的 set_timer 和 select wineserver 请求量。
本文档将其视为可能影响 CPU 和散热余量的性能调查项,而不是已确认的 regression 或 release blocker。
发布构建中不应留下临时 request counter。 只有在确认 frametime 改善,并且 Steam 与 HoYoverse workload 没有回归后,相关变更才应进入 release patch set。
常用 override 示例:
BUILD_NAME=winehq-11-test ./scripts/winehq-11/build-all.shBREW_PREFIX="$(brew --prefix)" ./scripts/crossover-26.1.0/build-all.shBUNDLE_PROTON_EXTRAS=0 ./scripts/winehq-11/build-all.shBUNDLE_DXMT_RUNTIME=1 \DXMT_RUNTIME_DIR=/path/to/dxmt-runtime \./scripts/winehq-11.11/build-all.sh打包结果会生成以下结构。
artifacts/wine-$BUILD_NAME/ wine-$BUILD_NAME-build/ wine-$BUILD_NAME-install/ wine-$BUILD_NAME/ wine-$BUILD_NAME.tar.gz wine-$BUILD_NAME.tar.gz.sha256 wine-$BUILD_NAME.json