Appimage/zh: Difference between revisions
Created page with "[https://appimage.org/ AppImage] 是一种 Linux 应用程序的单体打包格式。它将所有依赖项都包含在一个文件中,该文件由一个可执行文件和一个附加的文件系统组成。" Tags: Mobile edit Mobile web edit |
Created page with "== 配置 ==" |
||
Line 8: | Line 8: | ||
=== 运行 === | === 运行 === | ||
在大多数发行版中,只需下载 <code>.AppImage</code> 文件,使用 <code>chmod +x $AppImage</code> 使其可执行,然后执行即可。但这在 NixOS 中无法直接使用,因为 AppImage 文件通常(即使并非总是)依赖于硬编码路径中的某些系统库。 | |||
<syntaxhighlight lang="shell"> | <syntaxhighlight lang="shell"> | ||
Line 16: | Line 14: | ||
$ appimage-run $AppImageFile | $ appimage-run $AppImageFile | ||
</syntaxhighlight> | </syntaxhighlight> | ||
< | <span id="Packaging"></span> | ||
=== | === 打包 === | ||
请参阅 [https://nixos.org/manual/nixpkgs/stable/#sec-pkgs-appimageTools nixpkgs 手册中包装 AppImage 软件的部分]。简而言之,提取 AppImage,并将所有依赖项添加为 nix 构建依赖项。 | |||
以下示例是 Quba 程序的 Derivation,它以 AppImage 的形式分发。 | |||
<syntaxhighlight lang="nix"> | <syntaxhighlight lang="nix"> | ||
Line 67: | Line 62: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
< | <span id="Configuration"></span> | ||
== | == 配置 == | ||
<div lang="en" dir="ltr" class="mw-content-ltr"> | <div lang="en" dir="ltr" class="mw-content-ltr"> |