From 5b92e315fe134233fb1736e49bc45a2f1fcf151d Mon Sep 17 00:00:00 2001 From: okamitimo233 <1984037902@qq.com> Date: Mon, 29 Jun 2026 17:47:56 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feat(build):=20=E4=B8=BA=20Linux=20?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20pacman=20=E5=88=86=E5=8F=91=E7=9B=AE?= =?UTF-8?q?=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/dev.yml | 7 +++++++ README.md | 17 ++++++++++++++++- README.zh-CN.md | 17 ++++++++++++++++- electron-builder.config.ts | 15 ++++++++++++++- package.json | 1 + 5 files changed, 54 insertions(+), 3 deletions(-) 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/", diff --git a/package.json b/package.json index c66b80ca..a481b8d4 100644 --- a/package.json +++ b/package.json @@ -43,6 +43,7 @@ "build:win": "pnpm build && tsx scripts/gen-license.ts && electron-builder --config electron-builder.config.ts --win", "build:mac": "pnpm build && electron-builder --config electron-builder.config.ts --mac", "build:linux": "pnpm build && electron-builder --config electron-builder.config.ts --linux", + "build:pacman": "pnpm build && electron-builder --config electron-builder.config.ts --linux pacman", "docs:dev": "vitepress dev docs", "docs:build": "vitepress build docs", "docs:preview": "vitepress preview docs" From 62d9848dc2cf0fbbac11c59080068204ad6282db Mon Sep 17 00:00:00 2001 From: okamitimo233 <1984037902@qq.com> Date: Mon, 29 Jun 2026 17:48:06 +0800 Subject: [PATCH 2/2] =?UTF-8?q?refactor(build):=20=E7=A7=BB=E9=99=A4=20bui?= =?UTF-8?q?ld:pacman=20=E8=84=9A=E6=9C=AC=EF=BC=8C=E7=BB=9F=E4=B8=80?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=20build:linux?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/package.json b/package.json index a481b8d4..c66b80ca 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,6 @@ "build:win": "pnpm build && tsx scripts/gen-license.ts && electron-builder --config electron-builder.config.ts --win", "build:mac": "pnpm build && electron-builder --config electron-builder.config.ts --mac", "build:linux": "pnpm build && electron-builder --config electron-builder.config.ts --linux", - "build:pacman": "pnpm build && electron-builder --config electron-builder.config.ts --linux pacman", "docs:dev": "vitepress dev docs", "docs:build": "vitepress build docs", "docs:preview": "vitepress preview docs"