Skip to content

Commit

Permalink
sync docs automatically.
Browse files Browse the repository at this point in the history
  • Loading branch information
black-desk committed Mar 11, 2024
1 parent 7e7c3f9 commit 78fc586
Show file tree
Hide file tree
Showing 4 changed files with 154 additions and 0 deletions.
76 changes: 76 additions & 0 deletions en/guide/ll-builder/convert.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
<!--
SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
SPDX-License-Identifier: LGPL-3.0-or-later
-->

# convert `appimage` format( `.appimage` or `.AppImage` ) pkg to linglong format( `.layer` or `.uab` ) pkg

Use `ll-builder convert` to convert `appimage` format( `.appimage` or `.AppImage` ) pkg to linglong format( `.layer` or `.uab` ) pkg.

View the help information for the `ll-builder convert` command:

```bash
ll-builder convert --help
```

Here is the output:

```text
Usage: apps/ll-builder/ll-builder [options] convert
Options:
-v, --verbose show detail log
-h, --help Displays help on commandline
options.
--help-all Displays help including Qt
specific options.
-f, --file <*.deb,*.AppImage(*.appimage)> app package file, it not required option,
you can ignore this option when you
set -u option
-u, --url <pkg url> pkg url, it not required option,
you can ignore this option when you
set -f option
--hs, --hash <pkg hash value> pkg hash value, it must be used
with --url option
-i, --id <app id> the unique name of the app
-n, --name <app description> the description the app
-V, --version <app version> the version of the app
-d, --description <app description> detailed description of the app
-o, --output <script name> not required option, it will
generate linglong.yaml and
script,you can modify
linglong.yaml,then enter the
directory(app name) and execute the
script to generate the linglong
.layer(.uab)
Arguments:
convert convert app with
(deb,AppImage(appimage)) format to
linglong format, you can generate
convert config file by use -o
option
```

The `ll-builder convert` command will generate a directory according to specified app name( `--name` option), it will as a root directory of the linglong project, where the `linglong.yaml` file is located. and it supports two convert methods:

1. you can use `--file` option to convert to linglong pkg according to specified appimage file;
2. you can use `--url` and `--hash` option to convert to linglong pkg according to specified appimage url and hash value;

you can use `--output` option to generate config file( `linglong.yaml` ) of linglong project and a script of build linglong `.layer`(`.uab`)
then you can execute script file to generate after you modify the `linglong.yaml` file. if you do not specify this option, it will export linglong `.layer` or linglong `.uab` directly.

Take converting [BrainWaves](https://github.com/makebrainwaves/BrainWaves/releases/download/v0.15.1/BrainWaves-0.15.1.AppImage) into linglong `.layer` through `--url` as an example, the main steps as follows:

Specify the relevant parameters of the linglong package you want to convert, you can acquire `io.github.brainwaves_0.15.1_x86_64_runtime.layer` or `io.github.brainwaves_0.15.1_x86_64_runtime.uab` wait a moment.

```bash
ll-builder convert --url "https://github.com/makebrainwaves/BrainWaves/releases/download/v0.15.1/BrainWaves-0.15.1.AppImage" --hash "04fcfb9ccf5c0437cd3007922fdd7cd1d0a73883fd28e364b79661dbd25a4093" --name "io.github.brainwaves" --id "io.github.brainwaves" --version "0.15.1" --description "io.github.brainwaves" -v
```

Take converting BrainWaves-0.15.1.AppImage into linglong.layer through `--file` as an example, the main steps as follows:

```bash
ll-builder convert -f ~/Downloads/BrainWaves-0.15.1.AppImage --name "io.github.brainwaves" --id "io.github.brainwaves" --version "0.15.1" --description "io.github.brainwaves" -v
```
1 change: 1 addition & 0 deletions en/guide/ll-builder/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,5 @@ Arguments:
run
export
push
convert
```
76 changes: 76 additions & 0 deletions guide/ll-builder/convert.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
<!--
SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
SPDX-License-Identifier: LGPL-3.0-or-later
-->

# 转换 `appimage` 包格式( `.appimage``.AppImage` ) 到玲珑包格式( `.layer``.uab` )

使用 `ll-builder convert` 转换 appimage 包格式( `.appimage``.AppImage` )为玲珑包格式( `.layer``.uab` )

查看 `ll-builder convert` 命令的帮助信息:

```bash
ll-builder convert --help
```

`ll-builder convert` 命令的帮助信息如下:

```text
Usage: apps/ll-builder/ll-builder [options] convert
Options:
-v, --verbose show detail log
-h, --help Displays help on commandline
options.
--help-all Displays help including Qt
specific options.
-f, --file <*.deb,*.AppImage(*.appimage)> app package file, it not required option,
you can ignore this option when you
set -u option
-u, --url <pkg url> pkg url, it not required option,
you can ignore this option when you
set -f option
--hs, --hash <pkg hash value> pkg hash value, it must be used
with --url option
-i, --id <app id> the unique name of the app
-n, --name <app description> the description the app
-V, --version <app version> the version of the app
-d, --description <app description> detailed description of the app
-o, --output <script name> not required option, it will
generate linglong.yaml and
script,you can modify
linglong.yaml,then enter the
directory(app name) and execute the
script to generate the linglong
.layer(.uab)
Arguments:
convert convert app with
(deb,AppImage(appimage)) format to
linglong format, you can generate
convert config file by use -o
option
```

`ll-builder convert` 命令会根据指定的应用名称( `--name` 选项)生成一个目录,该目录会作为玲珑项目的根目录,即 `linglong.yaml` 文件所在的位置。它支持两种转换方法:

1. 你可以使用 `--file` 选项将指定的 `appimage` 文件转换为玲珑包文件;
2. 你可以使用 `--url``--hash` 选项将指定的 `appimage url``hash` 值转换为玲珑包文件;

你可以使用 `--output` 选项生成玲珑项目的配置文件( `linglong.yaml` )和构建玲珑 `.layer` ( `.uab` )的脚本文件
然后你可以执行该脚本去生成对应的玲珑包当你修改 `linglong.yaml` 配置文件后。如果不指定该选项,将直接导出对应的玲珑包。

以通过 `--url` 选项将 [BrainWaves](https://github.com/makebrainwaves/BrainWaves/releases/download/v0.15.1/BrainWaves-0.15.1.AppImage) `appimage` 文件转换为玲珑 `.layer` 文件为例,主要步骤如下:

指定要转换的玲珑包的相关参数,稍等片刻后你就可以得到 `io.github.brainwaves_0.15.1_x86_64_runtime.layer` 或者 `io.github.brainwaves_0.15.1_x86_64_runtime.uab` 包文件。

```bash
ll-builder convert --url "https://github.com/makebrainwaves/BrainWaves/releases/download/v0.15.1/BrainWaves-0.15.1.AppImage" --hash "04fcfb9ccf5c0437cd3007922fdd7cd1d0a73883fd28e364b79661dbd25a4093" --name "io.github.brainwaves" --id "io.github.brainwaves" --version "0.15.1" --description "io.github.brainwaves" -v
```

以通过 `--file` 选项将 `BrainWaves-0.15.1.AppImage` 转换为玲珑 `.layer` 为例,主要步骤如下:

```bash
ll-builder convert -f ~/Downloads/BrainWaves-0.15.1.AppImage --name "io.github.brainwaves" --id "io.github.brainwaves" --version "0.15.1" --description "io.github.brainwaves" -v
```
1 change: 1 addition & 0 deletions guide/ll-builder/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,5 @@ Arguments:
run
export
push
convert
```

0 comments on commit 78fc586

Please sign in to comment.