ARTICLE DETAIL

资讯详情

深耕网站视觉设计与运营推广的一线实战洞察。

如何用 appimage-builder 把 AppFlowy 打包为 AppImage 发布包

如何用 appimage-builder 把 AppFlowy 打包为 AppImage 发布包 如何用 appimage-builder 把 AppFlowy 打包为 AppImage 发布包【免费下载链接】AppFlowyBring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.项目地址: https://gitcode.com/GitHub_Trending/ap/AppFlowyAppFlowy 仓库在frontend/scripts/linux_distribution/appimage/下提供了一对现成的 AppImage 构建入口打包脚本 build_appimage.sh 和 appimage-builder 配方文件 AppImageBuilder.yml。如果你的目标是产出一个可直接分发的 AppFlowy Linux AppImagex86_64整个过程分三步装好 Linux 开发环境构建出 Flutter release 产物再运行打包脚本。本文按这条路径说明每一步的执行方式和判断依据。准备条件打包脚本不会编译 AppFlowy 本身它只消费已有的 Flutter Linux release 产物。因此前置条件是能够按仓库的构建流程编译出 release 包。开发环境可以借助仓库自带的安装脚本 install_linux.sh 准备它会依次完成sh install.sh # 或按脚本内容分步执行 sh frontend/scripts/install_dev_env/install_linux.sh该脚本是交互式的会询问是否安装 Rust并且会安装系统包、修改本机环境执行前请确认你在 Linux 上并有 sudo 权限。它完成的关键动作可选地通过 rustup 安装 Rust提示Do you want to install Rust? [y/N]将 Flutter 切换到 3.27.4并执行flutter config --enable-linux-desktop启用 Linux 桌面支持通过 apt/dnf 安装编译依赖keybinder-3.0-dev或keybinder3-devel、libnotify-dev、libmpv-dev和mpvVideo Block 支持配置 git hooks 并安装 go-gitlint在frontend/下安装cargo-make和duckscript最后执行cargo make appflowy-flutter-deps-tools检查前置条件。构建 Flutter Linux release 产物在仓库根目录执行cd frontend cargo make appflowyLinux 平台下该任务映射到appflowy-linux见 flutter.toml依次执行code_generation、set-app-version、flutter-buildflutter build linux --release --verbose、copy-to-product和create-release-archive。构建完成后release 产物位于appflowy_flutter/product/$VERSION/linux/Release/——deb 构建说明 对 Linux release 包位置也给出了同样的描述。这一步的完成标志是 release 构建成功并且appflowy_flutter/build/linux/x64/release/bundle/目录存在这是 AppImage 配方实际拷贝的目录。用 appimage-builder 执行打包打包入口是frontend/scripts/linux_distribution/appimage/build_appimage.sh它接收一个版本参数cd frontend sh scripts/linux_distribution/appimage/build_appimage.sh VERSION # 例如 sh scripts/linux_distribution/appimage/build_appimage.sh 0.7.0脚本内部做了三件事确保 appimage-builder 可用若/usr/local/bin/appimage-builder不存在从 appimage-builder v1.1.0 发布地址用wget下载appimage-builder-1.1.0-x86_64.AppImagechmod x后用sudo mv安装到/usr/local/bin。这一步涉及网络下载和系统级安装需要 sudo 权限已经装好 appimage-builder 的系统会直接跳过。写入版本号grep定位AppImageBuilder.yml中的[CHANGE_THIS]占位符用sed -i替换为传入的VERSION。这会在本地修改配方文件属于打包流程的一部分。执行打包appimage-builder --recipe scripts/linux_distribution/appimage/AppImageBuilder.yml --skip-tests注意脚本中的相对路径scripts/...、appflowy_flutter/build/...都以frontend/目录为基准所以务必在frontend/目录下运行。配方文件说明了什么AppImageBuilder.yml 的要点script段先rm -rf AppDir配方自带的清理步骤再cp -r appflowy_flutter/build/linux/x64/release/bundle AppDir并把 appflowy.svg 图标复制到AppDir/usr/share/icons/hicolor/scalable/apps/。这也解释了为什么必须先完成 release 构建。AppDir段应用信息为id: io.appflowy.AppFlowy、name: AppFlowy、exec: AppFlowyapt段以 Ubuntu 22.04jammyamd64源为基准收集运行时依赖包括libc6、libnotify4、libkeybinder-3.0-0、libwayland-cursor0、libwayland-client0、libwayland-egl1。目标系统缺少这些库时 AppImage 无法运行这是该配方给出的依赖边界。AppImage段arch: x86_64update-information: guess。结果验证与限制打包成功后appimage-builder 会基于配方中的name与version在frontend/目录下生成AppFlowy_版本号.AppImagex86_64 架构。配方中虽然定义了test段appimagecrafters/tests-env的 fedora-30、debian-stable、archlinux-latest、centos-7、ubuntu-xenial 五个镜像命令均为./AppRun但打包脚本固定带--skip-tests运行因此这些容器测试不会被执行本文档范围不额外提供验证步骤产物存在且可在桌面环境执行./AppFlowy_x.y.z.AppImage是仓库脚本实际覆盖的验收程度。两个常见的状态问题其一[CHANGE_THIS]占位符在第一次打包后就被 sed 替换掉再次打包前如果版本号没写进配方检查AppImageBuilder.yml的version字段是否还是占位符其二若appflowy_flutter/build/linux/x64/release/bundle不存在说明 Flutter release 构建尚未完成或失败了需要先回到上一节。【免费下载链接】AppFlowyBring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.项目地址: https://gitcode.com/GitHub_Trending/ap/AppFlowy创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考
返回列表