[如意玲珑生态指南] 应用构建教程(3) openEuler 24.03 LTS + Appimage

在完成前面的运行演示之后,我们现在来看看在openEuler 24.03 LTS上构建玲珑应用的效果。
对于本次课程规划来说,咱们接下来主要是演示应用appimage以及java应用的玲珑化转制

Appimage应用玲珑化转制

ll-builder是为应用开发者提供的一款构建玲珑应用工具,用于提供容器化的应用构建环境,方便开发者在不同的环境上构建出一致性的应用。目前ll-builder支持将可以在当前系统成功运行的Appimage应用转换为玲珑应用格式。
Appimage应用玲珑化转制主要通过”ll-builder convert”模块来实现,可以通过”ll-builder convert –help”来获取详细帮助手册

[ziggy@localhost /]$ ll-builder convert --help
Usage: ll-builder [options] convert

Options:
  -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.
  -f, --file <*.deb,*.AppImage(*.appimage)>  app package file, it not required
                                             option, you can ignorethis option
                                             when you set --url option and
                                             --hash option
  -u, --url <pkg url>                        pkg url, it not required option,
                                             you can ignorethis 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)
  -l, --layer                                export layer file
  --icon <path>                              uab icon (optional)

Arguments:
  convert                                    convert app with
                                             (deb,AppImage(appimage)) format to
                                             linglong format, you can generate
                                             convert config file by use -o
                                             option

在总结以上参数后,我们一般常用到的转换公式可以参考:

[ziggy@localhost /]$ ll-builder convert -f $appimage_file --name "$app_name" --id "$app_id" --version "$app_version" --description "$app_description" --layer -v

Appimage应用玲珑化转制

参数说明:

参数解释
$appimage_fileAppimage应用文件的完整路径
$app_name应用名称
$app_idAppimage转为玲珑应用之后的应用id
$app_versionAppimage转为玲珑应用之后的应用版本
$app_description应用描述
–layer玲珑应用构建完成后导出为layer文件
-v构建时显示详细过程

具体示例:

ll-builder convert -f /home/ziggy/linglong-build/appimage/LM_Studio-0.2.31.AppImage --name "LM-Studio" --id "ai.lmstudio" --version "0.2.31" --description "Discover, download, and run local LLMs." --layer -v

在转换完成后,可以参照上文《”.layer”独立在线安装文件》安装方法来测试本次构建是否成功


评论

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注