diff --git a/en/guide/ll-builder/build.md b/en/guide/ll-builder/build.md index e356ffa..55e7019 100644 --- a/en/guide/ll-builder/build.md +++ b/en/guide/ll-builder/build.md @@ -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 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 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 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. diff --git a/en/guide/ll-builder/create.md b/en/guide/ll-builder/create.md index 25b92c0..f22a0e5 100644 --- a/en/guide/ll-builder/create.md +++ b/en/guide/ll-builder/create.md @@ -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 +ll-builder create org.deepin.demo ``` Here is the output: @@ -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 @@ -81,16 +95,19 @@ 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 @@ -98,23 +115,31 @@ build: 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 ``` diff --git a/en/guide/ll-builder/export.md b/en/guide/ll-builder/export.md index 145aba5..fa5041c 100644 --- a/en/guide/ll-builder/export.md +++ b/en/guide/ll-builder/export.md @@ -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: @@ -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: @@ -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 ``` diff --git a/en/guide/ll-builder/manifests.md b/en/guide/ll-builder/manifests.md index 8744e8d..a6ffdfd 100644 --- a/en/guide/ll-builder/manifests.md +++ b/en/guide/ll-builder/manifests.md @@ -13,7 +13,7 @@ SPDX-License-Identifier: LGPL-3.0-or-later ```bash {project-root} ├── linglong.yaml -└── .linglong-target +└── linglong {user-home} └── .cache @@ -30,83 +30,40 @@ SPDX-License-Identifier: LGPL-3.0-or-later package: id: org.deepin.calculator name: deepin-calculator - version: 5.7.21 + version: 5.7.21.0 kind: app description: | calculator for deepin os. ``` -| name | description | -| ----------- | ---------------------------------------------------------------------------------------------------- | -| description | Detailed description of the build product | -| id | Unique name of the build product | -| kind | The type of build product: app, runtime, lib, representing application, library in turn | -| version | version of the build product | +| name | description | +| ----------- | ----------------------------------------------------------------------------- | +| description | Detailed description of the build product | +| id | Unique name of the build product | +| kind | The type of build product: app, runtime, representing Application and Runtime | +| version | version of the build product, require a four-digit number. | -### Runtime - -Describes the build and run dependencies of the application. - -```yaml -runtime: - id: org.deepin.Runtime - version: 23.0.0 - # NOT IMPLEMENTATION NOW - digest: 4d85525f09211381c77d2085c9c1057 -``` +### Base -The `id` can also be written to include the version as: +The minimum root filesystem. -```text -runtime: - id: org.deepin.Runtime/20.5.0 -``` +| name | description | +| ------- | ---------------------------------------------------------------------------------------- | +| id | Unique name of the base | +| version | Base version, A three-digit number can be loosely matched with a potential fourth digit | -| name | description | -| ------- | --------------------------------------------------------------------------------------- | -| id | Unique name of the runtime | -| version | Runtime version | -| digest | (not used yet, this field can be used to bind a unique version of the runtime) | - -### Dependencies +### Runtime -Describes the build dependencies and runtime dependencies of the application. +Describes the build and run dependencies of the application. -```yaml -depends: - - id: dde-qt-dbus-factory - version: 5.5.12 - - id: googletest - version: 1.8.1 - - id: icu - version: 63.1.0 - type: runtime - - id: xcb-util - version: 0.3.8.1 - type: runtime +```text +runtime: org.deepin.Runtime/23.0.1 ``` -| name | description | -| ------- | ---------------------------------------------------------------------------------------------------- | -| id | Unique name of the dependency | -| type | The type of dependency, the type of runtime dependency, will be submitted with the build content | -| version | Dependency version | -| digest | (not used yet, this field can be used to bind a unique version of the dependency) | - -`ll-builder` will pull dependencies from the remote repository to the local when the project is built. If the dependency does not exist in the remote repository or cannot meet the requirements, you can add source and build content, and `ll-builder` will build and apply this type of dependency first to the project build. - -```yaml -depends: - - id: icu - version: 63.1.0 - source: - kind: git - url: https://github.com/deepin-community/icu.git - version: master - commit: 3c651bcc40748fc5d02d9134fcaee14fda44ab62 - build: - kind: autotools -``` +| name | description | +| ------- | ------------------------------------------------------------------------------------------- | +| id | Unique name of the runtime | +| version | Runtime version, A three-digit number can be loosely matched with a potential fourth digit | ### Source @@ -119,455 +76,123 @@ source: version: master commit: d7e207b4a71bbd97f7d818de5044228c1a6e2c92 patch: - -patches/fix-install-prefix-path.patch + - patches/fix-install-prefix-path.patch - patches/fix-lib-install-path.patch ``` -| name | description | -| ------- | -------------------------------------------------------------------- | -| kind | Source code type, optional types local, archive, git | -| url | Source address, fill in when the type is archive or git | -| version | Source branch version, fill in when the type is git | -| digest | The Hash value of archive file encrypted using sha256 algorithm, fill in when the type is git | -| commit | The hash value of a source code commit, fill in when the type is git | -| patch | Source patch path | +| name | description | +| ------- | --------------------------------------------------------------------------------------------- | +| kind | Source code type, optional types local, archive, git | +| url | Source address, fill in when the type is archive or git | +| version | Source branch version, fill in when the type is git | +| digest | The Hash value of archive file encrypted using sha256 algorithm, fill in when the type is git | +| commit | The hash value of a source code commit, fill in when the type is git | +| patch | Source patch path | ### Build rules Describes the build rules. ```yaml -build: - kind: manual - manual: - configure: | - mkdir build - cd build - qmake -r PREFIX=${PREFIX} .. - build: | - make -j - make test - install: | - make -j install -``` - -```yaml -build: - kind: autotools - manual: - configure: | - ./bootstrap.sh +build: | + qmake -makefile PREFIX=${PREFIX} LIB_INSTALL_DIR=${PREFIX}/lib/${TRIPLET} + make + make install ``` -| name | description | -| --------- | --------------------------------------------------------------------------------------------------------- | -| build | build rules at build time | -| configure | build-time configure rules | -| install | build-time install rules | -| kind | Build type, optional manual, autotools, cmake, qmake | -| manual | Build rules, when manual is declared, it means custom rules, that is, rewriting build, install, configure | +| name | description | +| ----- | ------------------------- | +| build | build rules at build time | ### Variables Describes the variables that can be used by the build. -```yaml -variables: - build_dir: | - dest_dir: | - conf_args: | - --prefix=${PREFIX} - --libdir=lib/${TRIPLET} - extra_args: | - --doc=enable - jobs: | - -j64 - -build: - kind: manual - manual: - configure: | - ./configure ${conf_args} ${extra_args} - build: | - make ${jobs} - install: | - make DESTDIR=${dest_dir} install -``` - -| name | description | -| ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| build_dir | Built-in variables, assigned in the variable field, used in the build field | -| dest_dir | Same as build_dir | -| conf_args | Same as build_dir | -| extra_args | Same as build_dir | -| jobs | Same as build_dir | -| PREFIX | One of the environment variables, which can be used under the variable and build fields; provide the installation path when building | -| TRIPLET | One of the environment variables, which can be used under the variable and build fields; provide a triple containing architecture information, such as x86_64-linux-gnu | +| name | description | +| ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| PREFIX | One of the environment variables, which can be used under the variable and build fields; provide the installation path when buildingTRIPLET, such as /opt/apps/org.deepin.calculator | +| TRIPLET | One of the environment variables, which can be used under the variable and build fields; provide a triple containing architecture information, such as x86_64-linux-gnu | ## Complete example -### Build app - -```yaml -package: - id: org.deepin.calculator - name: deepin-calculator - version: 5.7.21 - kind: app - description: | - calculator for deepin os. - -runtime: - id: org.deepin.Runtime - version: 23.0.0 - -depends: - - id: dde-qt-dbus-factory - version: 5.5.12 - - id: googletest - version: 1.8.1 - - id: icu - version: 63.1.0 - type: runtime - - id: xcb-util - version: 0.3.8.1 - type: runtime - -source: - kind: git - url: https://github.com/linuxdeepin/deepin-calculator.git - version: master - commit: d7e207b4a71bbd97f7d818de5044228c1a6e2c92 - -variables: - extra_args: | - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_SAFETYTEST_ARG="CMAKE_SAFETYTEST_ARG_OFF" \ - -DAPP_VERSION=5.7.21 \ - -DVERSION=5.7.21 +### Build Root FileSystem -build: - kind: cmake +```bash +git clone git@github.com:linglongdev/org.deepin.foundation.git +cd org.deepin.foundation +bash build_base.sh eagle amd64 ``` -### Build dependencies - -```yaml -package: - id: libopenjp2 - kind: lib - version: 2.4.0 - -base: - id: org.deepin.base - version: 23.0.0 +该项目用来构建玲珑使用的根文件系统。eagle 指发行版代号,amd64 指架构。 -source: - kind: git - url: https://github.com/uclouvain/openjpeg - version: 2.4.0 - commit: 37ac30ceff6640bbab502388c5e0fa0bff23f505 - -build: - kind: cmake -``` +| Distribution version | Arch | +| -------------------- | ------------------------- | +| eagle (uos 20) | amd64、arm64、loongarch64 | +| beige (deepin 23) | amd64、arm64 | ### Build runtime ```yaml -package: - id: org.deepin.Runtime - kind: runtime - version: 23.0.0 - description: | - runtime of deepin. - -base: - id: org.deepin.base/23.0.0 - -depends: - - id: qtbase/5.15.7 - - id: qttranslations/5.15.7 - - id: qt3d/5.15.7 - - id: qtcharts/5.15.7 - - id: qtconnectivity/5.15.7 - - id: qtgamepad/5.15.7 - - id: qtsensors/5.15.7 - - id: qtspeech/5.15.7 - - id: qtvirtualkeyboard/5.15.7 - - id: qtserialport/5.15.7 - - id: qtnetworkauth/5.15.7 - - id: qttools/5.15.7 - - id: qtx11extras/5.15.7 - - id: qtdeclarative/5.15.7 - - id: qtsvg/5.15.7 - - id: qtscript/5.15.7 - - id: qtgraphicaleffects/5.15.7 - - id: qtquickcontrols/5.15.7 - - id: qtquickcontrols2/5.15.7 - - id: qtxmlpatterns/5.15.7 - - id: qtwayland/5.15.7 - - id: qtmultimedia/5.15.7 - - id: qtwebchannel/5.15.7 - - id: qtwebsockets/5.15.7 - - id: qtimageformats/5.15.7 - - id: qtlocation/5.15.7 - - id: spdlog/1.10.0 - - id: fmtlib/10.1.2 - - id: dtkcommon/5.6.0.3 - - id: dtkcore/5.6.0.9 - - id: dtkgui/5.6.0.13 - - id: dtkwidget/5.6.0.6 - - id: dtkdeclarative/5.6.0.7 - - id: qt5integration/5.6.0.5 - - id: qt5platform-plugins/5.6.0.5 - - id: libqtxdg/3.6.0.1 - - id: double-conversion/3.1.0.3 - - id: deepin-shortcut-viewer/5.0.6.1 - - id: fcitx-qt5/1.2.6.6 - - id: gsettings-qt/0.3.1.1 - - id: linglong-config/0.0.1.2 - -build: - kind: manual - manual: - configure: | - echo skip configure -``` - -When the package type is runtime, all dependencies will be submitted. - -## Build tools template - -### Automake type build template - -`autotools.yaml` provides a generic `automake` type build template, the template file is as follows: - -```yaml -variables: - build_dir: build_dir - conf_args: | - --prefix=${PREFIX} \ - --libdir=${PREFIX}/lib/${TRIPLET} - extra_args: | - dest_dir: | - jobs: -j${JOBS} - -build: - kind: autotools - manual: - configure: | - #autogon.sh, bootstrap.sh - autoreconf -ivf - ./configure ${conf_args} ${extra_args} - build: | - make ${jobs} - install: | - make ${jobs} DESTDIR=${dest_dir} install +git clone git@github.com:linglongdev/org.deepin.Runtime.git -b v23 +cd org.deepin.Runtime +./depend-deb-list.sh | ./tools/download_deb_depend.bash +ll-builder build --skip-fetch-source ``` -Build tool: - -```yaml -build: - kind: autotools -``` +On the basis of the rootfs, add fundamental environments such as Qt. -### qmake build template - -`qmake.yaml` provides a generic `qmake` build template, the template file is as follows: - -```yaml -variables: - build_dir: build_dir - conf_args: | - PREFIX=${PREFIX} \ - LIB_INSTALL_DIR=${PREFIX}/lib/${TRIPLET} - extra_args: | - dest_dir: | - jobs: -j${JOBS} - -build: - kind: qmake - manual : - configure: | - qmake -makefile ${conf_args} ${extra_args} - build: | - make ${jobs} - install: | - make ${jobs} DESTDIR=${dest_dir} install -``` +### Build app -Build tool: +#### calculator ```yaml -build: - kind: qmake -``` - -### cmake build templates - -`cmake.yaml` provides a generic `cmake` build template, the template file is as follows: +version: "1" -```yaml -variables: - build_dir: build_dir - conf_args: | - -DCMAKE_INSTALL_PREFIX=${PREFIX} \ - -DCMAKE_INSTALL_LIBDIR=${PREFIX}/lib/${TRIPLET} - extra_args: | - dest_dir: | - jobs: -j${JOBS} - -build: - kind: cmake - manual : - configure: | - cmake -B ${build_dir} ${conf_args} ${extra_args} - build: | - cmake --build ${build_dir} -- ${jobs} - install: | - env DESTDIR=${dest_dir} cmake --build ${build_dir} --target install -``` - -Build tool: +package: + id: org.deepin.calculator + name: deepin-calculator + version: 5.7.21.0 + kind: app + description: | + calculator for deepin os. -```yaml -build: - kind: cmake +command: + - /opt/apps/org.deepin.demo/files/bin/deepin-calculator + +base: org.deepin.foundation/23.0.0 +runtime: org.deepin.Runtime/23.0.1 + +sources: + - kind: git + url: https://github.com/linuxdeepin/deepin-calculator.git + version: master + commit: d7e207b4a71bbd97f7d818de5044228c1a6e2c92 + + - kind: git + url: https://github.com/linuxdeepin/dde-qt-dbus-factory.git + version: master + +build: | + # build dde-qt-dbus-factory + cd /project/linglong/sources/dde-qt-dbus-factory.git + qmake -makefile \ + PREFIX=${PREFIX} \ + LIB_INSTALL_DIR=${PREFIX}/lib/${TRIPLET} \ + INSTALL_ROOT=${PREFIX} + + make + make install + + # build calculator + cd /project/linglong/sources/deepin-calculator.git + cmake -Bbuild \ + -DCMAKE_INSTALL_PREFIX=${PREFIX} \ + -DCMAKE_INSTALL_LIBDIR=${PREFIX}/lib/${TRIPLET} + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_SAFETYTEST_ARG="CMAKE_SAFETYTEST_ARG_OFF" \ + -DAPP_VERSION=5.7.21 \ + -DVERSION=5.7.21 + + cmake --build build + cmake --build build --target install ``` - -## Runtime 23.0.0 includes these dependencies: - -| id | version | -| ---------------------- | --------- | -| qtbase | 5.15.7 | -| qt3d | 5.15.7 | -| qtcharts | 5.15.7 | -| qtconnectivity | 5.15.7 | -| qtgamepad | 5.15.7 | -| qtsensors | 5.15.7 | -| qtspeech | 5.15.7 | -| qtvirtualkeyboard | 5.15.7 | -| qtserialport | 5.15.7 | -| qtnetworkauth | 5.15.7 | -| qttools | 5.15.7 | -| qtx11extras | 5.15.7 | -| qtdeclarative | 5.15.7 | -| qtsvg | 5.15.7 | -| qtscript | 5.15.7 | -| qtgraphicaleffects | 5.15.7 | -| qtquickcontrols | 5.15.7 | -| qtquickcontrols2 | 5.15.7 | -| qtxmlpatterns | 5.15.7 | -| qtwayland | 5.15.7 | -| qtmultimedia | 5.15.7 | -| qtwebchannel | 5.15.7 | -| qtwebsockets | 5.15.7 | -| qtimageformats | 5.15.7 | -| qtlocation | 5.15.7 | -| dtkcommon | 5.6.0.3 | -| dtkcore | 5.6.0.9 | -| dtkgui | 5.6.0.13 | -| dtkwidget | 5.6.0.6 | -| dtkdeclarative | 5.6.0.7 | -| libqtxdg | 3.6.0.3 | -| qt5integration | 5.6.0.5 | -| double-conversion | 3.1.0.2 | -| deepin-shortcut-viewer | 5.0.6.1 | -| fcitx-qt5 | 1.2.6.6 | -| gsettings-qt | 0.3.1.1 | -| qt5platform-plugins | 5.6.0.5 | -| spdlog | 1.10.0 | -| fmtlib | 10.1.2 | - -## Other available dependencies: - -| id | version | -| -------------------- | ---------- | -| aria2 | 1.34.0 | -| bzip2 | 1.0.6 | -| cdparanoia | 3.10.2 | -| dde-control-center | 5.5.23 | -| dde-dock | 5.5.15 | -| disomaster | 5.0.7 | -| djvulibre | 3.5.27.1 | -| ffmpeg | 4.1.8 | -| ffmpegthumbnailer | 2.1.1 | -| freeimage | 3.18.0 | -| gio-qt | 0.0.11 | -| gst-plugins-good1.0 | 1.14.5 | -| gstreamer1.0 | 1.14.6 | -| ilmbase | 2.2.1 | -| image-editor | 1.0.9 | -| jxrlib | 1.1.1 | -| karchive | 5.54.0 | -| kcodecs | 5.54.0 | -| kconfig | 5.54.0 | -| kcoreaddons | 5.54.0 | -| kcrash | 5.54.0 | -| kdbusaddons | 5.54.0 | -| kglobalaccel | 5.54.0 | -| ki18n | 5.54.0 | -| kservice | 5.54.0 | -| ksyntax-highlighting | 5.54.0 | -| kwayland | 5.57.0 | -| kwindowsystem | 5.54.0 | -| leveldb | 1.20 | -| libarchive | 3.3.3 | -| libchardet | 1.0.4 | -| libdbusmenu-qt | 0.9.3 | -| libdmr | 5.9.13 | -| libdv | 1.0.0 | -| libepoxy | 1.5.3 | -| libevent | 2.1.8 | -| libraw | 0.19.2 | -| libvisual | 0.4.0 | -| libxrandr | 1.5.1 | -| libxtst | 5.5.15 | -| libzip | 1.5.1.8 | -| minizip | 1.1.1 | -| mpv | 0.29.1.37 | -| opencv | 3.2.0 | -| openexr | 2.2.1.4 | -| procps | 3.3.15 | -| qtdbusextended | 0.0.3 | -| qtmpris | 0.1.0.1 | -| sqlite3 | 3.27.2.3 | -| taglib | 1.11.1 | -| uchardet | 0.0.6 | -| udisks2-qt5 | 5.0.3 | -| vlc | 3.0.11 | -| xcb-util | 0.3.8.1 | -| icu | 63.1 | -| dde-qt-dbus-factory | 5.5.12 | -| gst-plugins-base1.0 | 1.14.4.2 | -| libdvdnav | 6.0.0 | -| libdvdread | 6.0.0 | -| libical3 | 3.0.4 | -| libva | 2.4.0 | -| libxcursor | 1.1.15 | -| orc | 0.4.28 | -| poppler | 0.71.0.2 | -| kmod | 26.1 | -| pciutils | 3.5.2.4 | -| xz-utils | 5.2.4.1 | -| libxslt | 1.1.32.3 | -| v4l-utils | 1.20.0 | -| portaudio19 | 19.6.0 | -| gst-plugins-bad1.0 | 1.14.4.2 | -| gst-plugins-ugly1.0 | 1.14.4.2 | -| nettle | 3.4.1.2 | -| aom | 1.0.0.1 | -| codec2 | 0.8.1 | -| libdc1394 | 2.2.5 | -| libmysofa | 0.6 | -| x264 | 0.155.2917 | -| x265 | 2.9 | -| xavs2 | 1.4.1 | -| cunit | 2.1 | -| lapack | 3.8.0.1 | -| openblas | 0.3.5 | -| crystalhd | 0.0.1 | -| davs2 | 1.7.1 | -| elfutils | 0.176.2 | diff --git a/en/guide/ll-cli/introduction.md b/en/guide/ll-cli/introduction.md index f12d58b..a5f5da8 100644 --- a/en/guide/ll-cli/introduction.md +++ b/en/guide/ll-cli/introduction.md @@ -20,17 +20,30 @@ Here is the output: Usage: ll-cli [options] subcommand [sub-option] Options: - -h, --help Displays help on commandline options. - --help-all Displays help including Qt specific options. - -Arguments: - subcommand run - ps - exec - kill - install - uninstall - update - query - list + -h --help Show this screen. + --version Show version. + --json Use json to output command result. + --no-dbus Use peer to peer DBus, this is used only in case that DBus daemon is not available. + --no-dbus-proxy Do not enable linglong-dbus-proxy. + --dbus-proxy-cfg=PATH Path of config of linglong-dbus-proxy. + --file=FILE you can refer to https://linglong.dev/guide/ll-cli/run.html to use this parameter. + --url=URL you can refer to https://linglong.dev/guide/ll-cli/run.html to use this parameter. + --working-directory=PATH Specify working directory. + --type=TYPE Filter result with tiers type. One of "lib", "app" or "dev". [default: app] + --state=STATE Filter result with the tiers install state. Should be "local" or "remote". [default: local] + --prune Remove application data if the tier is an application and all version of that application has been removed. + +Subcommands: + run Run an application. + ps List all pagodas. + exec Execute command in a pagoda. + enter Enter a pagoda. + kill Stop applications and remove the pagoda. + install Install tier(s). + uninstall Uninstall tier(s). + upgrade Upgrade tier(s). + search Search for tiers. + list List known tiers. + repo Display or modify information of the repository currently using. + info Display the information of layer ``` diff --git a/en/guide/ll-cli/query.md b/en/guide/ll-cli/query.md index 0457707..9185d33 100644 --- a/en/guide/ll-cli/query.md +++ b/en/guide/ll-cli/query.md @@ -4,44 +4,36 @@ SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. SPDX-License-Identifier: LGPL-3.0-or-later --> -# Query Apps From Remote +# Search Apps From Remote -Use `ll-cli query` to search app meta info from remote repository. +Use `ll-cli search` to search app meta info from remote repository. -View the help information for the `ll-cli query` command: +View the help information for the `ll-cli search` command: ```bash -ll-cli query --help +ll-cli search --help ``` Here is the output: ```text -Usage: ll-cli [options] query com.deepin.demo +Usage: ll-cli [options] search com.deepin.demo Options: -h, --help Displays help on commandline options. --help-all Displays help including Qt specific options. --repo-point <--repo-point=flatpak> app repo type to use - --force query from server directly, not from - cache Arguments: query query app info appId application id ``` -Use `ll-cli query` to search app meta info from remote repository and local cache: +Use `ll-cli search` to search app meta info from remote repository and local cache: ```bash -ll-cli query -``` - -Add `--force` to force search app info from remote repository: - -```bash -ll-cli query --force +ll-cli search calculator ``` This command returns the info of all apps whose `appid` (appid is the app's unique identifier) contains the keyword "calculator", including the complete `appid`, application name, version, CPU architecture and descriptions. diff --git a/en/guide/ll-cli/run.md b/en/guide/ll-cli/run.md index 3413bcc..ea5bb2b 100644 --- a/en/guide/ll-cli/run.md +++ b/en/guide/ll-cli/run.md @@ -43,25 +43,25 @@ Arguments: When the application is installed normally, use the `ll-cli run` command to start it: ```bash -ll-cli run +ll-cli run org.deepin.calculator ``` By default, executing the run command will start the application of the highest version. If you want to run the application of the specified version, you need to append the corresponding version number after `appid`: ```bash -ll-cli run +ll-cli run org.deepin.calculator/5.7.21.4 ``` -By default, `ll-dbus-proxy` is used to intercept and forward `dbus` messages. If you do not want to use `ll-dbus-proxy`, you can use the `--no-proxy` parameter: +By default, `ll-dbus-proxy` is used to intercept and forward `dbus` messages. If you do not want to use `ll-dbus-proxy`, you can use the `--no-dbus-proxy` parameter: ```bash -ll-cli run --no-proxy +ll-cli run org.deepin.calculator --no-dbus-proxy ``` Use the `ll-cli run` command to enter the specified program container: ```bash -ll-cli run --exec /bin/bash +ll-cli run org.deepin.calculator --exec /bin/bash ``` After entering, execute `shell` commands, such as `gdb`, `strace`, `ls`, `find`, etc. diff --git a/guide/ll-builder/build.md b/guide/ll-builder/build.md index 28b4937..ddbfd83 100644 --- a/guide/ll-builder/build.md +++ b/guide/ll-builder/build.md @@ -8,7 +8,7 @@ SPDX-License-Identifier: LGPL-3.0-or-later `ll-builder build`命令用来构建玲珑应用。 -查看`ll-builder build`命令的帮助信息: +查看 `ll-builder build`命令的帮助信息: ```bash ll-builder build --help @@ -18,41 +18,52 @@ ll-builder build --help ```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 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 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 set the build arch Arguments: - build build project + build build project ``` -`ll-builder build`命令必须运行在工程的根目录,即`linglong.yaml`文件所在位置。 +`ll-builder build`命令必须运行在工程的根目录,即 `linglong.yaml`文件所在位置。 -以玲珑项目`org.deepin.demo`为例,构建玲珑应用主要步骤如下: +以玲珑项目 `org.deepin.demo`为例,构建玲珑应用主要步骤如下: -进入到`org.deepin.demo`项目工程目录: +进入到 `org.deepin.demo`项目工程目录: ```bash cd org.deepin.demo ``` -执行`ll-builder build`命令将开始构建玲珑应用: +执行 `ll-builder build`命令将开始构建玲珑应用: ```bash ll-builder build ``` -构建完成后,构建内容将自动提交到本地`ostree`缓存中。导出构建内容见 `ll-builder export`。 +构建完成后,构建内容将自动提交到本地 `ostree`缓存中。导出构建内容见 `ll-builder export`。 -使用`--exec`参数可在构建脚本执行前进入玲珑容器: +使用 `--exec`参数可在构建脚本执行前进入玲珑容器: ```bash ll-builder build --exec /bin/bash ``` -进入容器后,可执行`shell`命令,如`gdb`、`strace` 等。 +进入容器后,可执行 `shell`命令,如 `gdb`、`strace` 等。 -玲珑应用`debug`版本更多调试信息请参考:[DEBUG](../debug/debug.md)。 +玲珑应用 `debug`版本更多调试信息请参考:[DEBUG](../debug/debug.md)。 diff --git a/guide/ll-builder/create.md b/guide/ll-builder/create.md index 16500b4..e015b6b 100644 --- a/guide/ll-builder/create.md +++ b/guide/ll-builder/create.md @@ -8,7 +8,7 @@ SPDX-License-Identifier: LGPL-3.0-or-later `ll-builder create`命令用来创建玲珑项目。 -查看`ll-builder create`命令的帮助信息: +查看 `ll-builder create`命令的帮助信息: ```bash ll-builder create --help @@ -29,10 +29,10 @@ Arguments: name project name ``` -`ll-builder create`命令根据输入的项目名称在当前目录创建对应的文件夹,同时生成构建所需的`linglong.yaml`模板文件。示例如下: +`ll-builder create`命令根据输入的项目名称在当前目录创建对应的文件夹,同时生成构建所需的 `linglong.yaml`模板文件。示例如下: ```bash -ll-builder create +ll-builder create org.deepin.demo ``` `ll-builder create org.deepin.demo`命令输出如下: @@ -44,33 +44,47 @@ org.deepin.demo/ ## 编辑linglong.yaml +### linglong.yaml 文件语法的版本 + +``` +version: "1" +``` + ### 软件包元信息配置 ```yaml package: id: org.deepin.demo name: deepin-demo - version: 0.0.1 + version: 0.0.0.1 kind: app description: | simple Qt demo. ``` +### 基础环境 + +最小的根文件系统。 + +```yaml +base: org.deepin.foundation/23.0.0 +``` + ### 运行时 +在根文件系统基础上添加 Qt 等基础环境。 + ```yaml -runtime: - id: org.deepin.Runtime - version: 23.0.0 +runtime: org.deepin.Runtime/23.0.1 ``` -### 依赖项 +### 启动命令 + +玲珑应用的启动命令。 ```yaml -depends: - - id: icu - version: 63.1.0 - type: runtime +command: + - /opt/apps/org.deepin.demo/files/bin/demo ``` ### 源码 @@ -81,16 +95,20 @@ depends: source: kind: git url: "https://github.com/linuxdeepin/linglong-builder-demo.git" - commit: 24f78c8463d87ba12b0ac393ec56218240315a9 + version: master + commit: a3b89c3aa34c1aff8d7f823f0f4a87d5da8d4dc0 ``` -### 选择构建模板 +### 构建 -源码为qmake工程,填写build 类型为qmake(模板内容见qmake.yaml)。 +在容器内构建项目需要的命令。 ```yaml -build: - kind: qmake +build: | + cd /project/linglong/sources/linglong-builder-demo.git + qmake demo.pro + make -j${JOBS} + make install ``` ### 完整的linglong.yaml配置 @@ -98,28 +116,31 @@ build: `linglong.yaml`文件内容如下: ```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 -depends: - - id: icu - version: 63.1.0 - type: runtime +base: org.deepin.foundation/23.0.0 +runtime: org.deepin.Runtime/23.0.1 -source: - kind: git - url: "https://github.com/linuxdeepin/linglong-builder-demo.git" - commit: a3b89c3aa34c1aff8d7f823f0f4a87d5da8d4dc0 +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 ``` diff --git a/guide/ll-builder/export.md b/guide/ll-builder/export.md index 8354027..2659d06 100644 --- a/guide/ll-builder/export.md +++ b/guide/ll-builder/export.md @@ -4,11 +4,11 @@ SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. SPDX-License-Identifier: LGPL-3.0-or-later --> -# 导出uab格式应用 +# 导出 layer 文件 -`ll-builder export`命令用来检出构建内容, 生成`bundle`格式软件包(简称 uab)。 +`ll-builder export`命令用来检出构建内容, 生成 layer 文件。 -查看`ll-builder export`命令的帮助信息: +查看 `ll-builder export`命令的帮助信息: ```bash ll-builder export --help @@ -17,19 +17,15 @@ ll-builder export --help `ll-builder export`命令的帮助信息如下: ```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. ``` -`ll-builder export`命令在工程根目录下创建以`appid`为名称的目录,并将本地构建缓存检出到该目录。同时根据该构建结果制作出`bundle`格式软件包。 +`ll-builder export`命令在工程根目录下创建以 `appid`为名称的目录,并将本地构建缓存检出到该目录。同时根据该构建结果生成 layer 文件。 `ll-builder export`命令使用示例如下: @@ -40,19 +36,25 @@ ll-builder export 检出后的目录结构如下: ```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 ``` -以`org.deepin.demo`玲珑应用为例,目录如下: +layer 文件分为,runtime 和 develop, runtime 包含应用的运行环境,develop 在 runtime 的基础上保留调试环境。 + +以 `org.deepin.demo` 玲珑应用为例,目录如下: ```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 ``` diff --git a/guide/ll-builder/manifests.md b/guide/ll-builder/manifests.md index 3b1dc92..d8b4344 100644 --- a/guide/ll-builder/manifests.md +++ b/guide/ll-builder/manifests.md @@ -13,7 +13,7 @@ SPDX-License-Identifier: LGPL-3.0-or-later ```bash {project-root} ├── linglong.yaml -└── .linglong-target +└── linglong {user-home} └── .cache @@ -30,84 +30,40 @@ SPDX-License-Identifier: LGPL-3.0-or-later package: id: org.deepin.calculator name: deepin-calculator - version: 5.7.21 + version: 5.7.21.0 kind: app description: | calculator for deepin os. ``` -| name | description | -| ----------- | ----------------------------------------------------------- | -| description | 构建产物的详细描述 | -| id | 构建产物的唯一名称 | -| kind | 构建产物的类型:app、runtime、lib,依次代表应用、运行时、库 | -| version | 构建产物的版本 | +| name | description | +| ----------- | -------------------------------------------------- | +| description | 构建产物的详细描述 | +| id | 构建产物的唯一名称 | +| kind | 构建产物的类型:app、runtime,依次代表应用、运行时 | +| version | 构建产物的版本,要求四位数字。 | -### 运行时(runtime) - -应用运行时依赖,同时也是构建依赖。 +### 基础环境(base) -```yaml -runtime: - id: org.deepin.Runtime - version: 23.0.0 - # NOT IMPLEMENTATION NOW - digest: 4d85525f09211381c77d2085c9c1057 -``` +最小根文件系统。 -可简写为以下形式: +| name | description | +| ------- | ---------------------------------------------------------------------------------------- | +| id | Unique name of the base | +| version | Base version, A three-digit number can be loosely matched with a potential fourth digit | -```text -runtime: - id: org.deepin.Runtime/23.0.0 -``` - -| name | description | -| ------- | ------------------------------------------------------- | -| id | 运行时(runtime)的唯一名称 | -| version | 运行时(runtime)版本 | -| digest | (暂未使用, 该字段可用来绑定唯一版本的运行时) | - -### 依赖项 +### 运行时(runtime) -描述应用的构建依赖与运行依赖。 +应用运行时依赖,同时也是构建依赖。 -```yaml -depends: - - id: dde-qt-dbus-factory - version: 5.5.12 - - id: googletest - version: 1.8.1 - - id: icu - version: 63.1.0 - type: runtime - - id: xcb-util - version: 0.3.8.1 - type: runtime +```text +runtime: org.deepin.Runtime/23.0.1 ``` -| name | description | -| ------- | ----------------------------------------------------------- | -| id | 依赖的唯一名称 | -| type | 依赖的类型,类型为 runtime 的依赖,将会和构建内容一起被提交;未设置type时, 该依赖仅参与构建| -| version | 依赖的版本 | -| digest | (暂未使用,该字段可用来绑定唯一版本的依赖) | - -ll-builder在项目构建时将从远程存储库拉取dpends下包含的依赖到本地。若远程存储库不存在该依赖或其无法满足要求, -可新增source与build内容, ll-builder将优先构建包含source与build类型的依赖并应用到项目构建中。 - -```yaml -depends: - - id: icu - version: 63.1.0 - source: - kind: git - url: https://github.com/deepin-community/icu.git - version: master - commit: 3c651bcc40748fc5d02d9134fcaee14fda44ab62 - build: - kind: autotools -``` +| name | description | +| ------- | ----------------------------------------------- | +| id | 运行时(runtime)的唯一名称 | +| version | 运行时(runtime)版本,三位数可以模糊匹配第四位 | ### 源码 @@ -124,453 +80,119 @@ source: - patches/fix-lib-install-path.patch ``` -| name | description | -| ------- | --------------------------------------- | -| kind | 源码类型,可选类型 local、archive、git | -| url | 源码地址,类型为 archive、git 时填写 | -| version | 源码分支版本,类型为 git 时填写 | +| name | description | +| ------- | --------------------------------------------------------- | +| kind | 源码类型,可选类型 local、archive、git | +| url | 源码地址,类型为 archive、git 时填写 | +| version | 源码分支版本,类型为 git 时填写 | | digest | 归档文件的hash值,使用sha256算法加密,类型为archive时填写 | -| commit | 源码某次提交 hash 值,类型为 git 时填写 | -| patch | 源码补丁路径 | +| commit | 源码某次提交 hash 值,类型为 git 时填写 | +| patch | 源码补丁路径 | ### 构建规则 描述构建规则。 ```yaml -build: - kind: manual - manual: - configure: | - mkdir build - cd build - qmake -r PREFIX=${PREFIX} .. - build: | - make -j - make test - install: | - make -j install +build: | + qmake -makefile PREFIX=${PREFIX} LIB_INSTALL_DIR=${PREFIX}/lib/${TRIPLET} + make + make install ``` - - -```yaml -build: - kind: autotools - manual: - configure: | - ./bootstrap.sh -``` - -| name | description | -| --------- | -------------------------------------------------------------------------------- | -| build | 构建时build规则 | -| configure | 构建时configure规则 | -| install | 构建时install规则 | -| kind | 构建类型,可选类型 manual、autotools、cmake、qmake | -| manual | 构建规则,声明使用 manual 时,表示自定义规则,即对build、install、configure 重写 | +| name | description | +| ----- | --------------- | +| build | 构建时build规则 | ### 变量 描述构建可以使用的变量,配合build构建使用。 -```yaml -variables: - build_dir: | - dest_dir: | - conf_args: | - --prefix=${PREFIX} - --libdir=lib/${TRIPLET} - extra_args: | - --doc=enable - jobs: | - -j64 - -build: - kind: manual - manual: - configure: | - ./configure ${conf_args} ${extra_args} - build: | - make ${jobs} - install: | - make DESTDIR=${dest_dir} install -``` - -| name | description | -| ---------- | ----------------------------------------------------------------------------------------- | -| build_dir | 内置变量之一,variables字段下自定义赋值,build字段下使用 | -| dest_dir | 同build_dir | -| conf_args | 同build_dir | -| extra_args | 同build_dir | -| jobs | 同build_dir | -| PREFIX | 环境变量之一,可在variable、build字段下使用;提供构建时的安装路径 | -| TRIPLET | 环境变量之一,可在variable、build字段下使用;提供包含架构信息的三元组,如x86_64-linux-gnu | +| name | description | +| ------- | ---------------------------------------------------------------------------------------------------- | +| PREFIX | 环境变量之一,可在variable、build字段下使用;提供构建时的安装路径,如/opt/apps/org.deepin.calculator | +| TRIPLET | 环境变量之一,可在variable、build字段下使用;提供包含架构信息的三元组,如x86_64-linux-gnu | ## 完整示例 -### 构建应用 - -```yaml -package: - id: org.deepin.calculator - name: deepin-calculator - version: 5.7.21 - kind: app - description: | - calculator for deepin os. - -runtime: - id: org.deepin.Runtime - version: 23.0.0 - -depends: - - id: dde-qt-dbus-factory - version: 5.5.12 - - id: googletest - version: 1.8.1 - - id: icu - version: 63.1.0 - type: runtime - - id: xcb-util - version: 0.3.8.1 - type: runtime - -source: - kind: git - url: https://github.com/linuxdeepin/deepin-calculator.git - version: master - commit: d7e207b4a71bbd97f7d818de5044228c1a6e2c92 - -variables: - extra_args: | - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_SAFETYTEST_ARG="CMAKE_SAFETYTEST_ARG_OFF" \ - -DAPP_VERSION=5.7.21 \ - -DVERSION=5.7.21 +### 构建根文件系统 -build: - kind: cmake +```bash +git clone git@github.com:linglongdev/org.deepin.foundation.git +cd org.deepin.foundation +bash build_base.sh beige amd64 ``` -### 构建依赖库 - -```yaml -package: - id: libopenjp2 - kind: lib - version: 2.4.0 +该项目用来构建玲珑使用的根文件系统。eagle 指发行版代号,amd64 指架构。 -base: - id: org.deepin.base - version: 23.0.0 - -source: - kind: git - url: https://github.com/uclouvain/openjpeg - version: 2.4.0 - commit: 37ac30ceff6640bbab502388c5e0fa0bff23f505 - -build: - kind: cmake -``` +| 发行版 | 架构 | +| ----------------- | ------------------------- | +| eagle (uos 20) | amd64、arm64、loongarch64 | +| beige (deepin 23) | amd64、arm64 | ### 构建运行时 ```yaml -package: - id: org.deepin.Runtime - kind: runtime - version: 23.0.0 - description: | - runtime of deepin - -base: - id: org.deepin.base/23.0.0 - -depends: - - id: qtbase/5.15.7 - - id: qttranslations/5.15.7 - - id: qt3d/5.15.7 - - id: qtcharts/5.15.7 - - id: qtconnectivity/5.15.7 - - id: qtgamepad/5.15.7 - - id: qtsensors/5.15.7 - - id: qtspeech/5.15.7 - - id: qtvirtualkeyboard/5.15.7 - - id: qtserialport/5.15.7 - - id: qtnetworkauth/5.15.7 - - id: qttools/5.15.7 - - id: qtx11extras/5.15.7 - - id: qtdeclarative/5.15.7 - - id: qtsvg/5.15.7 - - id: qtscript/5.15.7 - - id: qtgraphicaleffects/5.15.7 - - id: qtquickcontrols/5.15.7 - - id: qtquickcontrols2/5.15.7 - - id: qtxmlpatterns/5.15.7 - - id: qtwayland/5.15.7 - - id: qtmultimedia/5.15.7 - - id: qtwebchannel/5.15.7 - - id: qtwebsockets/5.15.7 - - id: qtimageformats/5.15.7 - - id: qtlocation/5.15.7 - - id: spdlog/1.10.0 - - id: fmtlib/10.1.2 - - id: dtkcommon/5.6.0.3 - - id: dtkcore/5.6.0.9 - - id: dtkgui/5.6.0.13 - - id: dtkwidget/5.6.0.6 - - id: dtkdeclarative/5.6.0.7 - - id: qt5integration/5.6.0.5 - - id: qt5platform-plugins/5.6.0.5 - - id: libqtxdg/3.6.0.1 - - id: double-conversion/3.1.0.3 - - id: deepin-shortcut-viewer/5.0.6.1 - - id: fcitx-qt5/1.2.6.6 - - id: gsettings-qt/0.3.1.1 - - id: linglong-config/0.0.1.2 - -build: - kind: manual - manual: - configure: | - echo skip configure -``` - -package 类型为runtime时,将提交所有依赖内容。 - -## 构建工具模板 - -### automake类型构建模板 - -`autotools.yaml` 提供了通用的 `automake` 类型构建模板, 模板文件如下: - -```yaml -variables: - build_dir: build_dir - conf_args: | - --prefix=${PREFIX} \ - --libdir=${PREFIX}/lib/${TRIPLET} - extra_args: | - dest_dir: | - jobs: -j${JOBS} - -build: - kind: autotools - manual: - configure: | - #autogon.sh, bootstrap.sh - autoreconf -ivf - ./configure ${conf_args} ${extra_args} - build: | - make ${jobs} - install: | - make ${jobs} DESTDIR=${dest_dir} install +git clone git@github.com:linglongdev/org.deepin.Runtime.git -b v23 +cd org.deepin.Runtime +./depend-deb-list.sh | ./tools/download_deb_depend.bash +ll-builder build --skip-fetch-source ``` -使用方法: +在根文件系统基础上添加 Qt 等基础环境。 -```yaml -build: - kind: autotools -``` - -### qmake构建模板 - -`qmake.yaml` 提供了通用的 `qmake` 构建模板, 模板文件如下: - -```yaml -variables: - build_dir: build_dir - conf_args: | - PREFIX=${PREFIX} \ - LIB_INSTALL_DIR=${PREFIX}/lib/${TRIPLET} - extra_args: | - dest_dir: | - jobs: -j${JOBS} - -build: - kind: qmake - manual : - configure: | - qmake -makefile ${conf_args} ${extra_args} - build: | - make ${jobs} - install: | - make ${jobs} DESTDIR=${dest_dir} install -``` - -使用方法: - -```yaml -build: - kind: qmake -``` - -### cmake构建模板 +### 构建应用 -`cmake.yaml` 提供了通用的 `cmake` 构建模板, 模板文件如下: +#### 计算器 ```yaml -variables: - build_dir: build_dir - conf_args: | - -DCMAKE_INSTALL_PREFIX=${PREFIX} \ - -DCMAKE_INSTALL_LIBDIR=${PREFIX}/lib/${TRIPLET} - extra_args: | - dest_dir: | - jobs: -j${JOBS} - -build: - kind: cmake - manual : - configure: | - cmake -B ${build_dir} ${conf_args} ${extra_args} - build: | - cmake --build ${build_dir} -- ${jobs} - install: | - env DESTDIR=${dest_dir} cmake --build ${build_dir} --target install -``` +version: "1" -使用方法: +package: + id: org.deepin.calculator + name: deepin-calculator + version: 5.7.21.0 + kind: app + description: | + calculator for deepin os. -```yaml -build: - kind: cmake +command: + - /opt/apps/org.deepin.demo/files/bin/deepin-calculator + +base: org.deepin.foundation/23.0.0 +runtime: org.deepin.Runtime/23.0.1 + +sources: + - kind: git + url: https://github.com/linuxdeepin/deepin-calculator.git + version: master + commit: d7e207b4a71bbd97f7d818de5044228c1a6e2c92 + + - kind: git + url: https://github.com/linuxdeepin/dde-qt-dbus-factory.git + version: master + +build: | + # build dde-qt-dbus-factory + cd /project/linglong/sources/dde-qt-dbus-factory.git + qmake -makefile \ + PREFIX=${PREFIX} \ + LIB_INSTALL_DIR=${PREFIX}/lib/${TRIPLET} \ + INSTALL_ROOT=${PREFIX} + + make + make install + + # build calculator + cd /project/linglong/sources/deepin-calculator.git + cmake -Bbuild \ + -DCMAKE_INSTALL_PREFIX=${PREFIX} \ + -DCMAKE_INSTALL_LIBDIR=${PREFIX}/lib/${TRIPLET} + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_SAFETYTEST_ARG="CMAKE_SAFETYTEST_ARG_OFF" \ + -DAPP_VERSION=5.7.21 \ + -DVERSION=5.7.21 + + cmake --build build + cmake --build build --target install ``` - -## runtime 23.0.0 包含依赖项 - -| id | version | -| ---------------------- | --------- | -| qtbase | 5.15.7 | -| qt3d | 5.15.7 | -| qtcharts | 5.15.7 | -| qtconnectivity | 5.15.7 | -| qtgamepad | 5.15.7 | -| qtsensors | 5.15.7 | -| qtspeech | 5.15.7 | -| qtvirtualkeyboard | 5.15.7 | -| qtserialport | 5.15.7 | -| qtnetworkauth | 5.15.7 | -| qttools | 5.15.7 | -| qtx11extras | 5.15.7 | -| qtdeclarative | 5.15.7 | -| qtsvg | 5.15.7 | -| qtscript | 5.15.7 | -| qtgraphicaleffects | 5.15.7 | -| qtquickcontrols | 5.15.7 | -| qtquickcontrols2 | 5.15.7 | -| qtxmlpatterns | 5.15.7 | -| qtwayland | 5.15.7 | -| qtmultimedia | 5.15.7 | -| qtwebchannel | 5.15.7 | -| qtwebsockets | 5.15.7 | -| qtimageformats | 5.15.7 | -| qtlocation | 5.15.7 | -| dtkcommon | 5.6.0.3 | -| dtkcore | 5.6.0.9 | -| dtkgui | 5.6.0.13 | -| dtkwidget | 5.6.0.6 | -| dtkdeclarative | 5.6.0.7 | -| libqtxdg | 3.6.0.3 | -| qt5integration | 5.6.0.5 | -| double-conversion | 3.1.0.2 | -| deepin-shortcut-viewer | 5.0.6.1 | -| fcitx-qt5 | 1.2.6.6 | -| gsettings-qt | 0.3.1.1 | -| qt5platform-plugins | 5.6.0.5 | -| spdlog | 1.10.0 | -| fmtlib | 10.1.2 | - -## 其他可用依赖 - -| id | version | -| -------------------- | ---------- | -| aria2 | 1.34.0 | -| bzip2 | 1.0.6 | -| cdparanoia | 3.10.2 | -| dde-control-center | 5.5.23 | -| dde-dock | 5.5.15 | -| disomaster | 5.0.7 | -| djvulibre | 3.5.27.1 | -| ffmpeg | 4.1.8 | -| ffmpegthumbnailer | 2.1.1 | -| freeimage | 3.18.0 | -| gio-qt | 0.0.11 | -| gst-plugins-good1.0 | 1.14.5 | -| gstreamer1.0 | 1.14.6 | -| ilmbase | 2.2.1 | -| image-editor | 1.0.9 | -| jxrlib | 1.1.1 | -| karchive | 5.54.0 | -| kcodecs | 5.54.0 | -| kconfig | 5.54.0 | -| kcoreaddons | 5.54.0 | -| kcrash | 5.54.0 | -| kdbusaddons | 5.54.0 | -| kglobalaccel | 5.54.0 | -| ki18n | 5.54.0 | -| kservice | 5.54.0 | -| ksyntax-highlighting | 5.54.0 | -| kwayland | 5.57.0 | -| kwindowsystem | 5.54.0 | -| leveldb | 1.20 | -| libarchive | 3.3.3 | -| libchardet | 1.0.4 | -| libdbusmenu-qt | 0.9.3 | -| libdmr | 5.9.13 | -| libdv | 1.0.0 | -| libepoxy | 1.5.3 | -| libevent | 2.1.8 | -| libraw | 0.19.2 | -| libvisual | 0.4.0 | -| libxrandr | 1.5.1 | -| libxtst | 5.5.15 | -| libzip | 1.5.1.8 | -| minizip | 1.1.1 | -| mpv | 0.29.1.37 | -| opencv | 3.2.0 | -| openexr | 2.2.1.4 | -| procps | 3.3.15 | -| qtdbusextended | 0.0.3 | -| qtmpris | 0.1.0.1 | -| sqlite3 | 3.27.2.3 | -| taglib | 1.11.1 | -| uchardet | 0.0.6 | -| udisks2-qt5 | 5.0.3 | -| vlc | 3.0.11 | -| xcb-util | 0.3.8.1 | -| icu | 63.1 | -| dde-qt-dbus-factory | 5.5.12 | -| gst-plugins-base1.0 | 1.14.4.2 | -| libdvdnav | 6.0.0 | -| libdvdread | 6.0.0 | -| libical3 | 3.0.4 | -| libva | 2.4.0 | -| libxcursor | 1.1.15 | -| orc | 0.4.28 | -| poppler | 0.71.0.2 | -| kmod | 26.1 | -| pciutils | 3.5.2.4 | -| xz-utils | 5.2.4.1 | -| libxslt | 1.1.32.3 | -| v4l-utils | 1.20.0 | -| portaudio19 | 19.6.0 | -| gst-plugins-bad1.0 | 1.14.4.2 | -| gst-plugins-ugly1.0 | 1.14.4.2 | -| nettle | 3.4.1.2 | -| aom | 1.0.0.1 | -| codec2 | 0.8.1 | -| libdc1394 | 2.2.5 | -| libmysofa | 0.6 | -| x264 | 0.155.2917 | -| x265 | 2.9 | -| xavs2 | 1.4.1 | -| cunit | 2.1 | -| lapack | 3.8.0.1 | -| openblas | 0.3.5 | -| crystalhd | 0.0.1 | -| davs2 | 1.7.1 | -| elfutils | 0.176.2 | diff --git a/guide/ll-cli/introduction.md b/guide/ll-cli/introduction.md index 94eb253..c7bfa58 100644 --- a/guide/ll-cli/introduction.md +++ b/guide/ll-cli/introduction.md @@ -8,7 +8,7 @@ SPDX-License-Identifier: LGPL-3.0-or-later `ll-cli`是一个包管理器前端,用于管理玲珑应用的安装、卸载、查看、启动、关闭、调试、更新等操作。 -查看`ll-cli`命令的帮助信息: +查看 `ll-cli`命令的帮助信息: ```bash ll-cli --help @@ -20,17 +20,30 @@ ll-cli --help Usage: ll-cli [options] subcommand [sub-option] Options: - -h, --help Displays help on commandline options. - --help-all Displays help including Qt specific options. - -Arguments: - subcommand run - ps - exec - kill - install - uninstall - update - query - list + -h --help Show this screen. + --version Show version. + --json Use json to output command result. + --no-dbus Use peer to peer DBus, this is used only in case that DBus daemon is not available. + --no-dbus-proxy Do not enable linglong-dbus-proxy. + --dbus-proxy-cfg=PATH Path of config of linglong-dbus-proxy. + --file=FILE you can refer to https://linglong.dev/guide/ll-cli/run.html to use this parameter. + --url=URL you can refer to https://linglong.dev/guide/ll-cli/run.html to use this parameter. + --working-directory=PATH Specify working directory. + --type=TYPE Filter result with tiers type. One of "lib", "app" or "dev". [default: app] + --state=STATE Filter result with the tiers install state. Should be "local" or "remote". [default: local] + --prune Remove application data if the tier is an application and all version of that application has been removed. + +Subcommands: + run Run an application. + ps List all pagodas. + exec Execute command in a pagoda. + enter Enter a pagoda. + kill Stop applications and remove the pagoda. + install Install tier(s). + uninstall Uninstall tier(s). + upgrade Upgrade tier(s). + search Search for tiers. + list List known tiers. + repo Display or modify information of the repository currently using. + info Display the information of layer ``` diff --git a/guide/ll-cli/query.md b/guide/ll-cli/query.md index a36ab3d..139f49f 100644 --- a/guide/ll-cli/query.md +++ b/guide/ll-cli/query.md @@ -6,47 +6,39 @@ SPDX-License-Identifier: LGPL-3.0-or-later # 从远程仓库查询应用 -`ll-cli query`命令可以查询玲珑远程仓库中的应用信息。 +`ll-cli search`命令可以查询玲珑远程仓库中的应用信息。 -查看`ll-cli query`命令的帮助信息: +查看 `ll-cli search`命令的帮助信息: ```bash -ll-cli query --help +ll-cli search --help ``` -`ll-cli query`命令的帮助信息如下: +`ll-cli search`命令的帮助信息如下: ```text -Usage: ll-cli [options] query com.deepin.demo +Usage: ll-cli [options] search com.deepin.demo Options: -h, --help Displays help on commandline options. --help-all Displays help including Qt specific options. --repo-point app repo type to use - --force query from server directly, not from - cache Arguments: - query query app info + search search app info appId application id ``` -通过`ll-cli query`命令可以从远程 repo 中查找应用程序信息: +通过 `ll-cli search`命令可以从远程 repo 中查找应用程序信息: ```bash -ll-cli query +ll-cli search calculator ``` -加上`--force`可以强制从远程 `repo` 中查询应用信息: +该命令将返回 `appid`(appid 是应用唯一标识) 中包含 calculator 关键词的所有应用程序信息,包含完整的 `appid`、应用程序名称、版本、平台及应用描述信息。 -```bash -ll-cli query --force -``` - -该命令将返回`appid`(appid 是应用唯一标识) 中包含 calculator 关键词的所有应用程序信息,包含完整的`appid`、应用程序名称、版本、平台及应用描述信息。 - -`ll-cli query calculator --force`输出如下: +`ll-cli search calculator`输出如下: ```text appId name version arch channel module description diff --git a/guide/ll-cli/run.md b/guide/ll-cli/run.md index b261c4a..14b3b75 100644 --- a/guide/ll-cli/run.md +++ b/guide/ll-cli/run.md @@ -40,31 +40,31 @@ Arguments: appId application id ``` -当应用被正常安装后,使用`ll-cli run`命令即可启动: +当应用被正常安装后,使用 `ll-cli run`命令即可启动: ```bash -ll-cli run +ll-cli run org.deepin.calculator ``` -默认情况下执行run命令会启动最高版本的应用,若需运行指定版本应用,需在`appid`后附加对应版本号: +默认情况下执行run命令会启动最高版本的应用,若需运行指定版本应用,需在 `appid`后附加对应版本号: ```bash -ll-cli run +ll-cli run org.deepin.calculator/5.7.21.4 ``` -默认情况下会使用`ll-dbus-proxy`拦截转发`dbus`消息,如果不想使用`ll-dbus-proxy`,可以使用`--no-proxy`参数: +默认情况下会使用 `ll-dbus-proxy`拦截转发 `dbus`消息,如果不想使用 `ll-dbus-proxy`,可以使用 `--no-dbus-proxy`参数: ```bash -ll-cli run --no-proxy +ll-cli run org.deepin.calculator --no-dbus-proxy ``` 使用 `ll-cli run`命令可以进入指定程序容器环境: ```bash -ll-cli run --exec /bin/bash +ll-cli run org.deepin.calculator --exec /bin/bash ``` -进入后可执行 `shell` 命令,如`gdb`、`strace`、`ls`、`find`等。 +进入后可执行 `shell` 命令,如 `gdb`、`strace`、`ls`、`find`等。 由于玲珑应用都是在容器内运行,无法通过常规的方式直接调试,需要在容器内运行调试工具,如 `gdb`: @@ -74,4 +74,4 @@ gdb /opt/apps/org.deepin.calculator/files/bin/deepin-calculator 该路径为容器内应用程序的绝对路径。 -玲珑应用`release`版本更多调试信息请参考:[常见运行问题](../debug/faq.md)。 +玲珑应用 `release`版本更多调试信息请参考:[常见运行问题](../debug/faq.md)。