diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index a36e28f1..d42f1fc0 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -161,3 +161,10 @@ jobs: with: name: SPlayer-Next-Linux-tar-${{ matrix.arch }} path: dist/*.tar.gz + + - name: Upload Linux Pacman + if: runner.os == 'Linux' + uses: actions/upload-artifact@v7 + with: + name: SPlayer-Next-Linux-pacman-${{ matrix.arch }} + path: dist/*.pacman diff --git a/README.md b/README.md index ba2d6afd..83f1fbc1 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,10 @@ pnpm build # Full build: clean → native → typecheck → electron-vit pnpm build:win # Package for Windows pnpm build:mac # Package for macOS -pnpm build:linux # Package for Linux +pnpm build:linux # Package for Linux (AppImage / deb / rpm / tar.gz / pacman) + +# Install on Arch / Manjaro / EndeavourOS +sudo pacman -U dist/splayer-next-*-x64.pacman ``` > By default a build targets the current architecture only. To target specific @@ -85,6 +88,18 @@ pnpm format # Prettier pnpm build:native # Build the Rust native modules only (add `--dev` for debug) ``` +## Install + +### Arch Linux / Manjaro / EndeavourOS + +Download the `.pacman` package from the release page and install it with `pacman`: + +```bash +sudo pacman -U splayer-next-*-x64.pacman +``` + +> The pacman target is currently considered beta in electron-builder. + ## Acknowledgements Special thanks to the open-source projects that make SPlayer-Next possible: diff --git a/README.zh-CN.md b/README.zh-CN.md index c51dde39..e4c4f27d 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -70,7 +70,10 @@ pnpm build # 完整构建:清理 → 原生模块 → 类型检查 → pnpm build:win # 打包 Windows pnpm build:mac # 打包 macOS -pnpm build:linux # 打包 Linux +pnpm build:linux # 打包 Linux(AppImage / deb / rpm / tar.gz / pacman) + +# 在 Arch / Manjaro / EndeavourOS 上安装 +sudo pacman -U dist/splayer-next-*-x64.pacman ``` > 默认仅构建当前架构。如需指定架构,可追加参数,例如 `pnpm build:win --x64 --arm64`。 @@ -84,6 +87,18 @@ pnpm format # Prettier pnpm build:native # 仅构建 Rust 原生模块(加 `--dev` 为 debug 构建) ``` +## 安装 + +### Arch Linux / Manjaro / EndeavourOS + +从 Release 页面下载 `.pacman` 包,使用 `pacman` 安装: + +```bash +sudo pacman -U splayer-next-*-x64.pacman +``` + +> pacman 目标目前在 electron-builder 中标记为 beta。 + ## 致谢 特别感谢以下让 SPlayer-Next 成为可能的开源项目: diff --git a/electron-builder.config.ts b/electron-builder.config.ts index af39ae78..ff95089b 100644 --- a/electron-builder.config.ts +++ b/electron-builder.config.ts @@ -105,13 +105,26 @@ const config: Configuration = { artifactName: "${name}-${version}-${arch}.${ext}", maintainer: "imsyy.top", category: "Audio;Music;AudioVideo;", - target: ["AppImage", "deb", "rpm", "tar.gz"], + target: ["AppImage", "deb", "rpm", "tar.gz", "pacman"], syncDesktopName: true, desktop: { entry: { MimeType: "x-scheme-handler/orpheus;" } }, }, appImage: { artifactName: "${name}-${version}-${arch}.${ext}", }, + pacman: { + artifactName: "${name}-${version}-${arch}.${ext}", + depends: [ + "gtk3", + "libnotify", + "nss", + "libxss", + "libxtst", + "xdg-utils", + "at-spi2-core", + "libsecret", + ], + }, npmRebuild: false, electronDownload: { mirror: "https://npmmirror.com/mirrors/electron/",