feat(desktop): logo de fenêtre, homepage vitrine, licence MIT ; attache release idempotente
Some checks failed
Desktop Release / Build Linux (AppImage + deb) (push) Successful in 13m34s
CI / Build & test (Node 22) (push) Has been cancelled
CI / Build & test (Node 24) (push) Has been cancelled
CI / Pack & boot smoke (Node 22) (push) Has been cancelled
CI / No em/en dashes (push) Has been cancelled
Some checks failed
Desktop Release / Build Linux (AppImage + deb) (push) Successful in 13m34s
CI / Build & test (Node 22) (push) Has been cancelled
CI / Build & test (Node 24) (push) Has been cancelled
CI / Pack & boot smoke (Node 22) (push) Has been cancelled
CI / No em/en dashes (push) Has been cancelled
- Fenêtre principale : icône explicite (resolveIconPath partagé dans paths.ts, réutilisé par le tray) pour afficher le logo Arboretum en fenêtre/barre des tâches au lieu de l'icône Electron générique. - package.json desktop : homepage -> https://git-arboretum.com (la vitrine, plus le dépôt Gitea) et champ license: MIT. Copyright daté avec le nom dans electron-builder.yml. Licence MIT + author aussi au package.json racine. - desktop-release.yml : attache des assets idempotente (supprime l'asset de même nom avant ré-upload) pour que le dernier build gagne sur un re-run.
This commit is contained in:
@@ -74,6 +74,13 @@ jobs:
|
||||
for f in packages/desktop/release/*.AppImage packages/desktop/release/*.deb packages/desktop/release/latest-linux.yml; do
|
||||
[ -f "$f" ] || continue
|
||||
name=$(basename "$f")
|
||||
# Re-run idempotent : supprimer un asset existant du même nom avant de ré-uploader, pour
|
||||
# que le dernier build gagne (l'API Gitea refuse sinon un asset déjà présent).
|
||||
existing=$(curl -fsSL -H "$auth" "${api}/releases/${rid}/assets" | node -e "const a=JSON.parse(require('fs').readFileSync(0,'utf8'));const m=Array.isArray(a)?a.find(x=>x.name===process.argv[1]):null;process.stdout.write(m?String(m.id):'')" "$name" || true)
|
||||
if [ -n "$existing" ]; then
|
||||
echo "replacing existing $name (asset $existing)"
|
||||
curl -fsSL -X DELETE -H "$auth" "${api}/releases/${rid}/assets/${existing}" || true
|
||||
fi
|
||||
echo "attaching $name"
|
||||
curl -fsSL -X POST -H "$auth" -F "attachment=@${f}" "${api}/releases/${rid}/assets?name=${name}"
|
||||
done
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
"name": "arboretum-monorepo",
|
||||
"private": true,
|
||||
"version": "0.0.0",
|
||||
"license": "MIT",
|
||||
"author": "Johan LEROY <contact@johanleroy.fr>",
|
||||
"type": "module",
|
||||
"workspaces": [
|
||||
"packages/shared",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
appId: fr.lidge.arboretum
|
||||
productName: Arboretum
|
||||
copyright: Copyright Johan Leroy
|
||||
copyright: Copyright © 2026 Johan Leroy
|
||||
|
||||
directories:
|
||||
output: release
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
"private": true,
|
||||
"version": "0.1.0",
|
||||
"description": "Arboretum desktop app: Electron shell that runs the daemon and shows its web UI",
|
||||
"homepage": "https://git.lidge.fr/johanleroy/arboretum",
|
||||
"homepage": "https://git-arboretum.com",
|
||||
"license": "MIT",
|
||||
"author": {
|
||||
"name": "Johan LEROY",
|
||||
"email": "contact@johanleroy.fr"
|
||||
|
||||
@@ -5,6 +5,7 @@ import { seedSessionCookie } from './auth';
|
||||
import { loadWindowState, saveWindowState } from './window-state';
|
||||
import { createTray } from './tray';
|
||||
import { initUpdater } from './updater';
|
||||
import { resolveIconPath } from './paths';
|
||||
|
||||
const PARTITION = 'persist:arboretum';
|
||||
const PORT = 7317;
|
||||
@@ -53,6 +54,8 @@ function createWindow(url: string): void {
|
||||
width: state.width,
|
||||
height: state.height,
|
||||
backgroundColor: '#09090b',
|
||||
// Logo de la fenêtre / barre des tâches (sinon icône Electron générique sous Linux/Windows).
|
||||
icon: resolveIconPath(),
|
||||
webPreferences: {
|
||||
partition: PARTITION,
|
||||
contextIsolation: true,
|
||||
|
||||
@@ -14,6 +14,15 @@ export function resolveServerEntry(): string {
|
||||
return join(__dirname, '..', '..', 'server', 'dist', 'index.js');
|
||||
}
|
||||
|
||||
/** Logo de l'app (fenêtre, tray, barre des tâches) : le mark Arboretum embarqué. */
|
||||
export function resolveIconPath(): string {
|
||||
// packagé : extraResources copie resources/icon.png à la racine de resources/.
|
||||
// dev : depuis dist/main.js -> ../resources/icon.png.
|
||||
return app.isPackaged
|
||||
? join(process.resourcesPath, 'icon.png')
|
||||
: join(__dirname, '..', 'resources', 'icon.png');
|
||||
}
|
||||
|
||||
/** Binaire Node qui exécute le daemon (>= 22.16 : node:sqlite + ABI node-pty maîtrisé). */
|
||||
export function resolveNodeBin(): string {
|
||||
if (app.isPackaged) {
|
||||
|
||||
@@ -1,16 +1,10 @@
|
||||
import { app, Menu, Tray, nativeImage } from 'electron';
|
||||
import { join } from 'node:path';
|
||||
import { Menu, Tray, nativeImage } from 'electron';
|
||||
import { isAutoStartEnabled, setAutoStart } from './autostart';
|
||||
|
||||
function iconPath(): string {
|
||||
return app.isPackaged
|
||||
? join(process.resourcesPath, 'icon.png')
|
||||
: join(__dirname, '..', 'resources', 'icon.png');
|
||||
}
|
||||
import { resolveIconPath } from './paths';
|
||||
|
||||
/** Icône de barre système : ouvrir la fenêtre, basculer le lancement au login, quitter. */
|
||||
export function createTray(opts: { show: () => void; quit: () => void }): Tray {
|
||||
const image = nativeImage.createFromPath(iconPath());
|
||||
const image = nativeImage.createFromPath(resolveIconPath());
|
||||
const tray = new Tray(image.isEmpty() ? nativeImage.createEmpty() : image.resize({ width: 18, height: 18 }));
|
||||
tray.setToolTip('Arboretum');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user