Skip to content

Commit

Permalink
sync docs automatically.
Browse files Browse the repository at this point in the history
  • Loading branch information
ComixHe committed May 13, 2024
1 parent 66bffe9 commit 0447bfd
Show file tree
Hide file tree
Showing 14 changed files with 479 additions and 1,152 deletions.
21 changes: 16 additions & 5 deletions en/guide/ll-builder/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,26 @@ Here is the output:

```text
Usage: ll-builder [options] build
linglong build command tools
Examples:
ll-builder build -v
ll-builder build -v -- bash -c "echo hello"
Options:
-v, --verbose show detail log
-h, --help Displays help on commandline options.
--help-all Displays help including Qt specific options.
--exec <exec> run exec than build script
-v, --verbose show detail log (deprecated, use QT_LOGGING_RULES)
-h, --help Displays help on commandline options.
--help-all Displays help including Qt specific options.
--exec <command> run exec than build script
--offline only use local files. This implies --skip-fetch-source
and --skip-pull-depend
--skip-fetch-source skip fetch sources
--skip-pull-depend skip pull dependency
--skip-run-container skip run container. This implies skip-commit-output
--skip-commit-output skip commit build output
--arch <arch> set the build arch
Arguments:
build build project
build build project
```

The `ll-builder build` command must be run in the root directory of the project, where the `linglong.yaml` file is located.
Expand Down
79 changes: 52 additions & 27 deletions en/guide/ll-builder/create.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Arguments:
The `ll-builder create` command creates a folder in the current directory according to the project name, and generates the `linglong.yaml` template file required for the build. Here is an example:

```bash
ll-builder create <org.deepin.demo>
ll-builder create org.deepin.demo
```

Here is the output:
Expand All @@ -44,33 +44,47 @@ org.deepin.demo/

## Edit linglong.yaml

### The syntax version of the linglong.yaml file.

```yaml
version: "1"
```
### App meta info
```yaml
package:
id: org.deepin.demo
name: deepin-demo
version: 0.0.1
version: 0.0.0.1
kind: app
description: |
simple Qt demo.
```
### runtime
### Base
The minimum root filesystem.
```yaml
runtime:
id: org.deepin.Runtime
version: 23.0.0
base: org.deepin.foundation/23.0.0
```
### Dependencies
### Runtime
On the basis of the rootfs, add fundamental environments such as Qt.
```yaml
depends:
- id: icu
version: 63.1.0
type: runtime
runtime: org.deepin.Runtime/23.0.1
```
### Command
Linglong application startup command.
```yaml
command:
- /opt/apps/org.deepin.demo/files/bin/demo
```
### Source
Expand All @@ -81,40 +95,51 @@ Use git source code
source:
kind: git
url: "https://github.com/linuxdeepin/linglong-builder-demo.git"
commit: 24f78c8463d87ba12b0ac393ec56218240315a9
commit: a3b89c3aa34c1aff8d7f823f0f4a87d5da8d4dc0
```
### Build template
### Build
The source code is a qmake project, and the build type is qmake (see qmake.yaml for the template content).
The commands required to build the project.
```yaml
build:
kind: qmake
build: |
cd /project/linglong/sources/linglong-builder-demo.git
qmake demo.pro
make -j${JOBS}
make install
```
### Completed `linglong.yaml` config

The contents of the `linglong.yaml` file are as follows:

```yaml
version: "1"
package:
id: org.deepin.demo
name: deepin-demo
version: 0.0.1
version: 0.0.0.1
kind: app
description: |
simple Qt demo.
simple qt demo.
runtime:
id: org.deepin.Runtime
version: 23.0.0
command:
- /opt/apps/org.deepin.demo/files/bin/demo
source:
kind: git
url: "https://github.com/linuxdeepin/linglong-builder-demo.git"
commit: a3b89c3aa34c1aff8d7f823f0f4a87d5da8d4dc0
base: org.deepin.foundation/23.0.0
runtime: org.deepin.Runtime/23.0.1
sources:
- kind: git
url: "https://github.com/linuxdeepin/linglong-builder-demo.git"
version: master
commit: a3b89c3aa34c1aff8d7f823f0f4a87d5da8d4dc0
build:
kind: qmake
build: |
cd /project/linglong/sources/linglong-builder-demo.git
qmake -makefile PREFIX=${PREFIX} LIB_INSTALL_DIR=${PREFIX}/lib/${TRIPLET}
make
make install
```
36 changes: 18 additions & 18 deletions en/guide/ll-builder/export.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
SPDX-License-Identifier: LGPL-3.0-or-later
-->

# Export Uab Format
# Export Layer File

Use `ll-builder export` to check out the build content and generate the `bundle` format package (referred to as uab).
Use `ll-builder export` to check out the build content and generate layer file.

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

Expand All @@ -17,19 +17,15 @@ ll-builder export --help
Here is the output:

```text
Usage: ll-builder [options] export [filename]
Usage: ll-builder [options]
Options:
-v, --verbose show detail log
-h, --help Displays this help.
Arguments:
export export build result to uab bundle
filename bundle file name , if filename is empty,export default format
bundle
-v, --verbose show detail log (deprecated, use QT_LOGGING_RULES)
-h, --help Displays help on commandline options.
--help-all Displays help including Qt specific options.
```

The `ll-builder export` command creates a directory named `appid` in the project root directory, then checks out the local build cache to this directory, and produces a `bundle` format package according to the build result.
The `ll-builder export` command creates a directory named `appid` in the project root directory, then checks out the local build cache to this directory, and generate layer file to the build result.

An example of the `ll-builder export` command is as follows:

Expand All @@ -40,21 +36,25 @@ ll-builder export
The directory structure after checkout is as follows:

```text
org.deepin.demo linglong.yaml org.deepin.demo_0.0.1_x86_64.uab
linglong.yaml org.deepin.demo_0.0.0.1_x86_64_develop.layer org.deepin.demo_0.0.0.1_x86_64_runtime.layer
```

Linglong applications have two package formats: `linglong` and `uab`. Currently the `linglong` package format is the main one.
Layer files are divided into two categories: `runtime` and `develop`. The `runtime` includes the application's execution environment, while the `develop` layer, built upon the `runtime`, retains the debugging environment.

Take the `org.deepin.demo` Linglong application as an example. The directory is as follows:

```text
org.deepin.demo
├── entries
│ └── applications
│ └── demo.desktop
│   └── share -> ../files/share
├── files
│ └── bin
│ └── demo
│   ├── bin
│   │   └── demo
│   └── share
│   ├── applications
│   │   └── demo.desktop
│   └── systemd
│   └── user -> ../../lib/systemd/user
├── info.json
└── linglong.yaml
└── org.deepin.demo.install
```
Loading

0 comments on commit 0447bfd

Please sign in to comment.