deepin下flatpak 操作

我使用的是deepin15.10.1版本,刚开始装的flatpak一直是0.8.9版本,使用官方的命令一直无法调通,需要添加stretch-backports源,可以更新到1.2.4版。

  1. Install a runtime and the matching SDK
    sudo apt install flatpak flatpak-builder deepin-fprt-com.deepin.platform-15.5 deepin-fprt-com.deepin.sdk-15.5

2.Create the app新建helloworld.sh

#!/bin/sh
echo "Hello world"

3.Add a manifest新建com.flatpak.helloworld.json

{
    "app-id":"com.flatpak.Helloworld",
    "runtime":"com.deepin.Platform",
    "runtime-version":"15.5.2",
    "sdk":"com.deepin.Sdk",
    "command":"hello.sh",
    "modules":[
        {
            "name":"hello",
            "buildsystem":"simple",
            "build-commands":[
                "install -D hello.sh /app/bin/hello.sh"
            ],
            "sources":[
                {
                    "type":"file",
                    "path":"hello.sh"
                }
            ]
        }
    ]
}

4.Build the application

flatpak-builder build-dir com.flatpak.helloworld.json

在这里插入图片描述
5.Test the build

flatpak-builder --run build-dir com.flatpak.helloworld.json helloworld.sh

在这里插入图片描述
6. Put the app in a repository

flatpak-builder --repo=repo --force-clean build-dir com.flatpak.helloworld.json

在这里插入图片描述
7. Install the app

flatpak --user remote-add --no-gpg-verify tutorial-repo repo
flatpak --user install tutorial-repo com.flatpak.helloworld

在这里插入图片描述
8. Run the app

flatpak run org.flatpak.Hello

在这里插入图片描述

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值