Appimage/zh: Difference between revisions

Ardenet (talk | contribs)
Created page with "[https://appimage.org/ AppImage] 是一种 Linux 应用程序的单体打包格式。它将所有依赖项都包含在一个文件中,该文件由一个可执行文件和一个附加的文件系统组成。"
Tags: Mobile edit Mobile web edit
Ardenet (talk | contribs)
Created page with "== 配置 =="
Line 8: Line 8:
=== 运行 ===
=== 运行 ===


<div lang="en" dir="ltr" class="mw-content-ltr">
在大多数发行版中,只需下载 <code>.AppImage</code> 文件,使用 <code>chmod +x $AppImage</code> 使其可执行,然后执行即可。但这在 NixOS 中无法直接使用,因为 AppImage 文件通常(即使并非总是)依赖于硬编码路径中的某些系统库。
On most distros, all one has to do is download the <code>.AppImage</code> file, make it executable <code>chmod +x $AppImage</code>, and execute it. This doesn't work in NixOS out of the box though, as AppImage files usually (if not always) depend on certain system libraries in hardcoded paths.
</div>


<syntaxhighlight lang="shell">
<syntaxhighlight lang="shell">
Line 16: Line 14:
$ appimage-run $AppImageFile
$ appimage-run $AppImageFile
</syntaxhighlight>
</syntaxhighlight>
<div lang="en" dir="ltr" class="mw-content-ltr">
<span id="Packaging"></span>
=== Packaging ===
=== 打包 ===
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
请参阅 [https://nixos.org/manual/nixpkgs/stable/#sec-pkgs-appimageTools nixpkgs 手册中包装 AppImage 软件的部分]。简而言之,提取 AppImage,并将所有依赖项添加为 nix 构建依赖项。
See the [https://nixos.org/manual/nixpkgs/stable/#sec-pkgs-appimageTools nixpkgs manual on wrapping AppImage packages]. In short, the AppImage is extracted and any dependencies are added as nix build dependencies.
以下示例是 Quba 程序的 Derivation,它以 AppImage 的形式分发。
Following example is a derivation for the program Quba, which is also distributed as AppImage.
</div>


<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
Line 67: Line 62:
</syntaxhighlight>
</syntaxhighlight>


<div lang="en" dir="ltr" class="mw-content-ltr">
<span id="Configuration"></span>
== Configuration ==
== 配置 ==
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">