旧版本 Wine (6.13) 的 Flatpak 创建问题

旧版本 Wine (6.13) 的 Flatpak 创建问题

我正在尝试为 Wine 6.13 的旧开发版本创建一个 flatpak,但遇到了问题。bwrap: execvp wine: No such file or directory尽管编译成功,但尝试执行 flatpak 时,显示停止程序会出现错误。我已经能够获得稍新的版本 6.16 来执行,但我需要这个特定的旧版本来运行某些在从未版本的 Wine 中无法运行的软件。不幸的是,由于直到 6.16 才修复的错误,我被迫使用较旧的运行时集。我如何尝试的详细信息如下:

我首先下载了 Wine 的 flathub 清单存储库,因为它存在于版本 6.0.2 中: https://github.com/flathub/org.winehq.Wine/tree/a954b18213547d4acaeb7b6e7f5157205fed45b4

然后,我将 yml 和 xml 文件重命名为: org.oldbuild.wine-6-13.yml org.oldbuild.wine-6-13.appdata.xml

在 中org.oldbuild.wine-6-13.yml,我更改了 ID 和对 appdata 文件的引用,添加了一行提供主机文件系统权限,并更改了下载的 wine 版本:

id: org.oldbuild.wine-6-13

- --filesystem=host

        url: https://dl.winehq.org/wine/source/6.x/wine-6.13.tar.xz
        sha256: e03a21a011d45d2ae9f222040fb7690b97156376e7431f861f20073eaf24f28a

path: org.oldbuild.wine-6-13.appdata.xml

然后,在 中org.oldbuild.wine-6-13.appdata.xml,我更改了 ID 和发布版本行:

<id>org.oldbuild.wine-6-13</id>

<release version="6.13" date="2021-07-20"/>

我还添加了以下modules/spirv-headers.json文件:

{
        "name": "spirv",
        "buildsystem": "cmake-ninja",
        "cleanup": [
            "/bin",
            "/include",
            "/lib/cmake",
            "/lib/pkgconfig",
            "/share/man",
            "*.so"
        ],
        "sources": [
                {
                        "type": "archive",
                        "url": "https://github.com/KhronosGroup/SPIRV-Headers/archive/refs/tags/sdk-1.3.236.0.tar.gz",
                        "sha256": "4d74c685fdd74469eba7c224dd671a0cb27df45fc9aa43cdd90e53bd4f2b2b78"
                }
        ]
}

完成上述操作后,我尝试使用以下命令构建它:flatpak run org.flatpak.Builder wine-6-13 org.oldbuild.wine-6-13.yml

一切成功编译后,在编写元数据时出现错误:

Composing metadata...
Run failed, some data was ignored.
Errors were raised during this compose run:
general
  E: filters-but-no-output

org.oldbuild.wine-6-13
  E: no-valid-category
Refer to the generated issue report data for details on the individual problems.
Error: ERROR: appstreamcli compose failed: Child process exited with code 1

此时,我进入wine-6-13目录并尝试手动创建metadatametadata.debuginfometadata.org.winehq.Wine.geckometadata.org.winehq.Wine.mono文件。我使用 6.0.2 版本作为参考,并根据需要进行更改。

name=org.oldbuild.wine-6-13

[Extension org.oldbuild.wine-6-13.Debug]

built-extensions=org.oldbuild.wine-6-13.Debug;org.winehq.Wine.gecko;org.winehq.Wine.mono;

[Runtime]
name=name=org.oldbuild.wine-6-13.Debug

[ExtensionOf]
ref=app/org.oldbuild.wine-6-13/x86_64/stable-21.08
[Runtime]
name=org.winehq.Wine.gecko

[ExtensionOf]
ref=app/org.oldbuild.wine-6-13/x86_64/stable-23.08
[Runtime]
name=org.winehq.Wine.mono

[ExtensionOf]
ref=app/org.oldbuild.wine-6-13/x86_64/stable-21.08

完成上述操作后,我运行了flatpak build-finish wine-6-13,然后手动放置了一个wine-6-13/export/share/metainfo/org.oldbuild.wine-6-13.metainfo.xmlorg.oldbuild.wine-6-13.appdata.xml.

从这里,我运行命令来完成创建 flatpak 文件并安装它:

flatpak build-export export-6-13 wine-6-13

flatpak build-bundle export-6-13 org.oldbuild.wine-6-13.flatpak org.oldbuild.wine-6-13 --runtime-repo=https://flathub.org/repo/flathub.flatpakrepo

flatpak install org.oldbuild.wine-6-13.flatpak

我不知道为什么元数据无法构建,但是手动完成的 flatpak 无法启动 wine,并出现以下错误。

my_bash_prompt$ flatpak run org.oldbuild.wine-6-13 some_windows_program.exe
bwrap: execvp wine: No such file or directory

有谁知道是什么原因导致这个问题?我不知道从哪里开始解决这个问题。提前致谢!

相关内容