Skip to content

Commit

Permalink
chore: update docs
Browse files Browse the repository at this point in the history
修正文档错误

Log: update docs
  • Loading branch information
chenchongbiao authored and zccrs committed May 31, 2024
1 parent 223d6f7 commit 4329444
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 47 deletions.
18 changes: 9 additions & 9 deletions docs/pages/en/guide/debug/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,28 @@ SPDX-License-Identifier: LGPL-3.0-or-later
Linglong applications run in a container, and the application data will be mounted to `/opt/apps/<appid>`/. Only system data will exist in the `/usr/share` directory, and there will be no application-related data. Therefore, reading directly from `/usr/share` will fail. Suggested processing: Use the `XDG_DATA_DIRS` environment variable to read resources, and `/opt/apps/<appid>/files/share` will exist in this environment variable search path.
2. The font library file cannot be found when the application is running. Why can the corresponding font library be read when the `deb` package is installed?

When the `deb` package is installed, it will depend on the corresponding font library file. The Linglong package format adopts a self-sufficient packaging format. Except for the basic system library, `Qt` library and `dtk` library files provided in `runtime`, do not need to be provided by yourself, other dependent data files need to be provided by yourself. It is recommended to put the corresponding data file under `files/share`, and use the environment variable `XDG_DATA_DIRS` to read the path.
When the `deb` package is installed, it will depend on the corresponding font library file. The Linglong package format adopts a self-sufficient packaging format. Except for the basic system library, `Qt` library and `DTK` library files provided in `runtime`, do not need to be provided by yourself, other dependent data files need to be provided by yourself. It is recommended to put the corresponding data file under `files/share`, and use the environment variable `XDG_DATA_DIRS` to read the path.
3. What is in the Linglong application `runtime`? Can you add some library files to it?

At present, the `runtime` that Linglong application depends on provides the `Qt` library and the `dtk` library. Because `runtime` has a strict size limit, adding additional library files to `runtime` is currently not allowed.
At present, the `runtime` that Linglong application depends on provides the `Qt` library and the `DTK` library. Because `runtime` has a strict size limit, adding additional library files to `runtime` is currently not allowed.
4. The application runs in the container. Can a configuration file be created in any path of the container during the running process?

You can create configuration files under `XDG_CONFIG_HOME`.
5. Where is app data saved? Where can I find it outside the container?

Because Linglong applications follow the principle of non-interference, the `XDG_DATA_HOME`, `XDG_CONFIG_HOME`, `XDG_CACHE_HOME` environment variables are defined in the corresponding path of the host machine, `~/.linglong/<appid>`/. So the user application data will be saved under this path. When writing data while the application is running, it should also be able to read the corresponding environment variable to write the data. Mutual configuration calls between applications are prohibited.
Because Linglong applications follow the principle of non-interference, the `XDG_DATA_HOME`, `XDG_CONFIG_HOME`, `XDG_CACHE_HOME` environment variables are defined in the corresponding path of the host machine, `~/.linglong/<appid>`/. So the user application data will be saved under this path. When writing data while the application is running, it should also be able to read the corresponding environment variable to write the data. Prohibit reading and writing configurations of other applications.
6. The application provides the `dbus service` file, where do I place it? What does the `Exec` segment write?

When the application provides the `dbus service` file, it needs to be placed in the `entries/dbus-1/services` directory. If `Exec` executes the binary in the Linglong package, use the `--exec` option parameter to execute the corresponding binary.
7. After the app is installed, the launcher cannot find it?

TryExec=xxx, if xxx does not exist in the $PATH, the application is considered non-existent and will not be displayed.
8. Why is the icon displayed as a small black dot?
8. Why is the Icon displayed as a small black dot?

The desktop file has an 'icon' field written, but the icon field name is incorrect or an absolute path is being used."。
9. Why is the icon displayed as a gear?
The desktop file has an 'Icon' field written, but the Icon field name is incorrect or an absolute path is being used."。
9. Why is the Icon field as a gear?

The desktop file does not provide icon information.
The desktop file does not provide Icon field.
10. Where are the icons stored?

svg -> $PREFIX/share/icons/hicolor/scalable/apps/
Expand All @@ -51,10 +51,10 @@ SPDX-License-Identifier: LGPL-3.0-or-later
The resource files that the application needs to use and the library files both need to be provided by the application itself. The library files are placed in the `$PREFIX/lib` path.
14. Why has the `Qt WebEngine` rendering process crashed when the application is running?

Due to the system upgrade of `glibc`, the application fails to use the built-in browser, and the application needs to be re-adapted. A temporary solution is to set the environment variable: `export QTWEBENGINE_DISABLE_container=1`.
Due to the system upgrade of `glibc`, the application fails to use the built-in browser, and the application needs to be re-adapted. A temporary solution is to set the environment variable: `export QTWEBENGINE_DISABLE_SANDBOX=1`.
15. When the application is running, the `libqxcb.so` library cannot be found or the `qtwebengine` error is reported. What can I do?

When a `qt.conf` file exists, you need to configure the correct path in the file or use the `QTWEBENGINEPROCESS_PATH`, `QTWEBENGINERESOURCE_PATH`, `QT_QPA_PLATFORM_PLUGIN_PATH`, and `QT_PLUGIN_PATH` environment variables to configure the search path.
When a `qt.conf` file exists, you need to configure the correct path in the file or use the `QTWEBENGINEPROCESS_PATH`, `QTWEBENGINE_RESOURCE_PATH`, `QT_QPA_PLATFORM_PLUGIN_PATH`, and `QT_PLUGIN_PATH` environment variables to configure the search path.
16. Can the application carry the database file by itself and write data to the database during operation?

The file system in the container is a read-only file system and does not allow data to be written to application resource files.
Expand Down
20 changes: 9 additions & 11 deletions docs/pages/en/guide/ll-cli/update.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ SPDX-License-Identifier: LGPL-3.0-or-later

# Update Linglong App

Use `ll-cli update` to update Linglong apps.
Use `ll-cli upgrade` to upgrade Linglong apps.

View the help information for the `ll-cli update` command:
View the help information for the `ll-cli upgrade` command:

```bash
ll-cli update --help
ll-cli upgrade --help
```

Here is the output:

```text
Usage: ll-cli [options] update com.deepin.demo
Usage: ll-cli [options] upgrade com.deepin.demo
Options:
-h, --help Displays help on commandline options.
Expand All @@ -26,26 +26,24 @@ Options:
--module <--module=runtime> the module of app
Arguments:
update update an application
upgrade update an application
appId application id
```

Use `ll-cli update` to update a local app to the latest version in the remote repository, such as:
Use `ll-cli upgrade` to upgrade a local app to the latest version in the remote repository, such as:

```bash
ll-cli update <org.deepin.calculator>
ll-cli upgrade org.deepin.calculator
```

Here is the output:

```text
update org.deepin.calculator , please wait a few minutes...
org.deepin.calculator is updating...
message: update org.deepin.calculator success, version:5.7.16 --> 5.7.21.4
100% Install main:org.deepin.calculator/5.7.21.4/x86_64 success
```

Example of updating the specified version to the latest version:

```bash
ll-cli update <org.deepin.calculator/5.7.16>
ll-cli upgrade org.deepin.calculator/5.7.16
```
4 changes: 2 additions & 2 deletions docs/pages/en/guide/start/how_to_use.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,11 @@ ll-builder run --exec /bin/bash

# Conversion application

Here, we use baidunetdisk as an example for converting to a Linglong package from a deb package.
Here, we use baidunetdisk as an example. We will introduce the process of converting DEB packages into Linglong packages

## Obtain software package

Take baidunetdisk as an example. First, obtain the deb package file.
First, obtain the deb package file.
Currently, only software following the application store packaging
specifications is supported for conversion.

Expand Down
18 changes: 9 additions & 9 deletions docs/pages/guide/debug/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ SPDX-License-Identifier: LGPL-3.0-or-later

1. 应用运行读取 `/usr/share`下应用安装资源文件,为什么读取失败?

玲珑应用是在容器环境中运行,应用数据会挂载到 `/opt/apps/<appid>`/下,`/usr/share`目录下只会存在系统数据,不会存在应用相关数据。因此直接读取 `/usr/share`下会失败。建议处理:采用 `XDG_DATA_DIRS`环境变量读取资源,`/opt/apps/<appid>/files/share`会存在在此环境变量搜索路径中。
玲珑应用是在容器环境中运行,应用数据会挂载到 `/opt/apps/<appid>`/下,`/usr/share`目录下只会存在系统数据,不会存在应用相关数据。因此直接读取 `/usr/share` 会失败。建议处理:采用 `XDG_DATA_DIRS` 环境变量读取资源,`/opt/apps/<appid>/files/share`会存在在此环境变量搜索路径中。
2. 应用运行时找不到字体库文件?为什么 `deb`包安装时能读取到对应的字体库?

`deb`包安装时,会依赖带入对应的字体库文件。而玲珑包格式采用自给自足打包格式。除了基本的系统库,`runtime`里面提供的 `Qt`库与 `dtk`库文件不用自己提供外,其他依赖数据文件,均需自己提供。建议对应的数据文件放入 `files/share`下,采用环境变量 `XDG_DATA_DIRS`读取路径。
`deb`包安装时,会依赖带入对应的字体库文件。而玲珑包格式采用自给自足打包格式。除了基本的系统库,`runtime`里面提供的 `Qt`库与 `DTK`库文件不用自己提供外,其他依赖数据文件,均需自己提供。建议对应的数据文件放入 `files/share`下,采用环境变量 `XDG_DATA_DIRS`读取路径。
3. 玲珑应用 `runtime`里面有什么?能不能往里面添加一些库文件进去?

目前玲珑应用依赖的 `runtime`里面提供的是 `Qt`库与 `dtk`库。因 `runtime`有严格的大小限制。目前不允许往 `runtime`里面添加额外的库文件。
目前玲珑应用依赖的 `runtime`里面提供的是 `Qt`库与 `DTK`库。因 `runtime`有严格的大小限制。目前不允许往 `runtime`里面添加额外的库文件。
4. 应用在容器内运行,运行过程中能不能往容器任意路径下创建配置文件?

可以在 `XDG_CONFIG_HOME` 下创建配置文件。
5. 应用数据保存到哪里?在容器外哪里能找到?

因玲珑应用遵循互不干涉原则,`XDG_DATA_HOME``XDG_CONFIG_HOME``XDG_CACHE_HOME`环境变量被定义到宿主机 `~/.linglong/<appid>`/对应的路径下,因此用户应用数据会保存在此路径下,应用运行过程中写入数据时,也应该读取对应的环境变量写入数据。禁止应用间互相配置调用
因玲珑应用遵循互不干涉原则,`XDG_DATA_HOME``XDG_CONFIG_HOME``XDG_CACHE_HOME`环境变量被定义到宿主机 `~/.linglong/<appid>`/对应的路径下,因此用户应用数据会保存在此路径下,应用运行过程中写入数据时,也应该读取对应的环境变量写入数据。禁止读写其它应用的配置
6. 应用提供了 `dbus service`文件,如何放置?`Exec`段写什么?

应用提供 `dbus service`文件时,需要放到 `entries/dbus-1/services`目录下,如果 `Exec`执行玲珑包内二进制,使用 `--exec`选项参数执行对应的二进制。
Expand All @@ -29,10 +29,10 @@ SPDX-License-Identifier: LGPL-3.0-or-later
TryExec=xxx, 当xxx 在 $PATH 路径中不存在时,会认为该应用不存在不予显示。
8. 为什么图标显示为小黑点?

desktop 写了icon字段,且icon字段名称不对或者使用绝对路径
desktop 写了 Icon 字段,且 Icon 字段名称不对或者使用绝对路径
9. 为什么图标显示为齿轮?

desktop 未提供icon信息
desktop 未提供 Icon 字段
10. 图标存放在哪个路径?

svg -> $PREFIX/share/icons/hicolor/scalable/apps/
Expand All @@ -52,16 +52,16 @@ SPDX-License-Identifier: LGPL-3.0-or-later
14. 应用运行时,为什么 `Qt WebEngine`渲染进程已崩溃?

因系统升级了 `glibc`,导致应用使用内置浏览器时失败,需要应用重新适配。临时解决方案是设置环境变量:`export QTWEBENGINE_DISABLE_SANDBOX=1`
15. 应用运行时,找不到 `libqxcb.so`库或者 `qtwebengin` 报错?
15. 应用运行时,找不到 `libqxcb.so`库或者 `qtwebengine` 报错?

存在 `qt.conf`文件时,在文件中配置正确路径,或者使用 `QTWEBENGINEPROCESS_PATH``QTWEBENGINERESOURCE_PATH``QT_QPA_PLATFORM_PLUGIN_PATH``QT_PLUGIN_PATH`环境变量配置搜索路径。
存在 `qt.conf`文件时,在文件中配置正确路径,或者使用 `QTWEBENGINEPROCESS_PATH``QTWEBENGINE_RESOURCE_PATH``QT_QPA_PLATFORM_PLUGIN_PATH``QT_PLUGIN_PATH`环境变量配置搜索路径。
16. 应用能否自己携带数据库文件,并在运行中往数据库中写入数据?

容器内文件系统是只读文件系统,不允许往应用资源文件中写入数据。
17. 为什么执行携带 `suid``guid`权限二进制失效?

玲珑容器为保证系统安全,容器内禁止执行此类权限二进制。
18. uab离线包格式在debian、ubuntu下输入法无法使用
18. uab离线包格式在 Debian、Ubuntu 下输入法无法使用

建议安装 `fictx`输入法后体验。
19. 怎么知道容器环境中安装了哪些包?
Expand Down
24 changes: 11 additions & 13 deletions docs/pages/guide/ll-cli/update.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ SPDX-License-Identifier: LGPL-3.0-or-later

# 更新应用

`ll-cli update`命令可以更新玲珑应用。
`ll-cli upgrade`命令可以更新玲珑应用。

查看`ll-cli update`命令的帮助信息:
查看 `ll-cli upgrade`命令的帮助信息:

```bash
ll-cli update --help
ll-cli upgrade --help
```

`ll-cli update`命令的帮助信息如下:
`ll-cli upgrade`命令的帮助信息如下:

```text
Usage: ll-cli [options] update com.deepin.demo
Usage: ll-cli [options] upgrade com.deepin.demo
Options:
-h, --help Displays help on commandline options.
Expand All @@ -26,26 +26,24 @@ Options:
--module <--module=runtime> the module of app
Arguments:
update update an application
upgrade update an application
appId application id
```

通过`ll-cli update`命令将本地软件包版本更新到远端仓库中的最新版本,如:
通过 `ll-cli upgrade`命令将本地软件包版本更新到远端仓库中的最新版本,如:

```bash
ll-cli update <org.deepin.calculator>
ll-cli upgrade org.deepin.calculator
```

`ll-cli update org.deepin.calculator`命令输出如下:
`ll-cli upgrade org.deepin.calculator`命令输出如下:

```text
update org.deepin.calculator , please wait a few minutes...
org.deepin.calculator is updating...
message: update org.deepin.calculator success, version:5.7.16 --> 5.7.21.4
100% Install main:org.deepin.calculator/5.7.21.4/x86_64 success
```

更新指定版本到最新版本:

```bash
ll-cli update <org.deepin.calculator/5.7.16>
ll-cli upgrade org.deepin.calculator/5.7.16
```
6 changes: 3 additions & 3 deletions docs/pages/guide/start/how_to_use.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ build: |
cmake --build build --target install
```

linglong.yaml 文件遵循 yaml 语法规范编写的
linglong.yaml 文件遵循 yaml 语法规范

linglong.yaml 中字段的详细解释参考:[构建配置文件简介](../ll-builder/manifests.md)

Expand Down Expand Up @@ -115,11 +115,11 @@ ll-builder run --exec /bin/bash

# 转换 deb 应用

这里使用百度网盘作为 deb 转换玲珑包的例子
以“百度网盘”为例,接下来介绍将 deb 包转为为玲珑包的过程

## 获取软件包

以百度网盘为例。先获取 deb 包文件。目前只支持转换遵循应用商店打包规范的软件。
先获取 deb 包文件。目前只支持转换遵循应用商店打包规范的软件。

```bash
apt download com.baidu.baidunetdisk
Expand Down

0 comments on commit 4329444

Please sign in to comment.