我尝试为Instant meshes创建一个 flatpak 应用程序,具体清单如下:
id: org.flatpak.InstantMeshes
runtime: org.gnome.Platform
runtime-version: "44"
sdk: org.gnome.Sdk
command: InstantMeshes
desktop-file-name-suffix: " (Nightly)"
finish-args:
- --share=ipc
- --socket=x11
- --socket=wayland
- --filesystem=home
- --device=dri
modules:
- name: zenity
buildsystem: meson
sources:
- type: archive
url: https://download.gnome.org/sources/zenity/3.41/zenity-3.41.0.tar.xz
sha256: 19b676c3510e22badfcc3204062d432ba537402f5e0ae26128c0d90c954037e1
- name: build instant meshes
buildsystem: cmake
build-commands:
- cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/app
- make -j 4
- install -D "./Instant Meshes" /app/bin/InstantMeshes
sources:
- type: git
url: https://github.com/wjakob/instant-meshes.git
branch: master
build-options:
append-path: "/usr/lib/"
- name: Intant Meshes
buildsystem: simple
build-commands:
# - install /app/bin/zenity /usr/bin/zenity
- install -D InstantMeshes.desktop /app/share/applications/org.flatpak.InstantMeshes.desktop
- install -D instantmeshes.png /app/share/icons/hicolor/256x256/apps/instantmeshes.png
ensure-writable:
- /app/bin/zenity
sources:
- type: file
path: InstantMeshes.desktop
- type: file
path: instantmeshes.png
但是在运行时尝试打开文件夹时出现错误:
sh: line 1: /usr/bin/zenity: File o directory do not exist
这是因为 zenity 位于 /app/bin 路径中,但它是只读的,我无法从基本 flatpak 清单中进行修改。是否有可能将 zenity 引入 /usr/bin 文件夹?可能使用运行时?