Package the desktop app for Arch, Debian and Windows
electron-builder produces j621-desktop_*_amd64.deb, j621-desktop-*.pkg.tar.zst (zstd, lean Arch dependencies instead of the Electron 2 era default set) and a per-user NSIS installer cross-built with wine. The launcher entry and Electron's desktopName now agree on io.j621.desktop so window association works, and package metadata points at the repository homepage and the non-commercial licence.
This commit is contained in:
+13
-3
@@ -9,6 +9,9 @@ SPA keeps its normal first-run flow: on launch it asks where the backend is
|
||||
The renderer code is not forked: the shell loads `frontend/dist` as built by
|
||||
`npm run build` in `frontend/`.
|
||||
|
||||
Licensed under the Jake Labs Non-Commercial Software Licence — see
|
||||
`../LICENSE`.
|
||||
|
||||
## Layout
|
||||
|
||||
```
|
||||
@@ -34,17 +37,24 @@ cd desktop && npm run dev
|
||||
## Builds
|
||||
|
||||
```bash
|
||||
npm run dist:linux # release/*.deb + release/*.pkg.tar.zst
|
||||
npm run dist:win # release/J621-Setup-*.exe (cross-built with wine; untested)
|
||||
npm run dist:linux # release/j621-desktop_0.1.0_amd64.deb + j621-desktop-0.1.0.pkg.tar.zst
|
||||
npm run dist:win # release/J621 Setup 0.1.0.exe (cross-built with wine; untested)
|
||||
npm run dist:all
|
||||
```
|
||||
|
||||
The Arch package can be installed and removed with pacman:
|
||||
|
||||
```bash
|
||||
sudo pacman -U release/j621-*.pkg.tar.zst
|
||||
sudo pacman -U release/j621-desktop-*.pkg.tar.zst
|
||||
sudo pacman -R j621-desktop
|
||||
```
|
||||
|
||||
It installs to `/opt/J621` with a `/usr/bin/j621-desktop` symlink and a
|
||||
`io.j621.desktop` launcher entry (`StartupWMClass` matches the shell's
|
||||
`desktopName`). The Windows installer is a per-user NSIS build, so no admin
|
||||
rights are needed to install or update it — but it is unsigned, so SmartScreen
|
||||
will warn, and it has not been smoke-tested on real Windows.
|
||||
|
||||
## Smoke test
|
||||
|
||||
`npm run smoke` builds everything, runs Electron headless through `xvfb-run`
|
||||
|
||||
@@ -29,6 +29,27 @@ linux:
|
||||
desktop build talks to a J621 backend over the network, the same way the
|
||||
web app does.
|
||||
icon: build/icon.png
|
||||
syncDesktopName: true
|
||||
|
||||
pacman:
|
||||
compression: zstd
|
||||
artifactName: ${name}-${version}.pkg.tar.zst
|
||||
# Electron's shared-library requirements on Arch (the electron-builder
|
||||
# defaults still list an ancient Electron 2 dependency set).
|
||||
depends:
|
||||
- gtk3
|
||||
- nss
|
||||
- libxss
|
||||
- libxtst
|
||||
- xdg-utils
|
||||
- at-spi2-core
|
||||
- libsecret
|
||||
- libnotify
|
||||
- alsa-lib
|
||||
- libcups
|
||||
- libdrm
|
||||
- mesa
|
||||
- libxkbcommon
|
||||
|
||||
win:
|
||||
target:
|
||||
|
||||
@@ -4,8 +4,13 @@
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"description": "Desktop shell for the J621 self-hosted media archive",
|
||||
"author": "JakeBreath",
|
||||
"license": "SEE LICENSE IN ../LICENSE",
|
||||
"author": {
|
||||
"name": "JakeBreath",
|
||||
"email": "tolozacdcmo@gmail.com"
|
||||
},
|
||||
"homepage": "https://gitea.rainbow-herring.ts.net/JakeBreath/J621",
|
||||
"license": "LicenseRef-Jake-Labs-Non-Commercial",
|
||||
"desktopName": "io.j621.desktop",
|
||||
"main": "dist/main.js",
|
||||
"scripts": {
|
||||
"build:main": "tsc -p tsconfig.json",
|
||||
|
||||
Reference in New Issue
Block a user