mirror of
https://github.com/R0m1k3/EveFlow.git
synced 2026-10-11 17:29:03 +02:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
af1e3d8aae | ||
|
|
2471add00b | ||
|
|
35437e2d51 | ||
|
|
e2c67a5770 |
No files matched your search
@@ -43,8 +43,10 @@ jobs:
|
||||
id: ver
|
||||
shell: bash
|
||||
run: |
|
||||
version=$(node -p "require('./package.json').version")
|
||||
version=$(node -p "const p=require('./package.json'); p.releaseVersion || p.version")
|
||||
echo "version=$version" >> "$GITHUB_OUTPUT"
|
||||
# Fourth component (hotfix number, e.g. 2.0.0.1) becomes the Windows file build number.
|
||||
echo "build=$(echo "$version" | cut -d. -f4)" >> "$GITHUB_OUTPUT"
|
||||
if git ls-remote --exit-code --tags origin "refs/tags/v$version" >/dev/null 2>&1; then
|
||||
echo "released=true" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
@@ -52,9 +54,10 @@ jobs:
|
||||
fi
|
||||
- run: npm run build
|
||||
- name: Package Windows EXE
|
||||
run: npx electron-builder --win --publish never
|
||||
run: npm run dist -- --win --publish never
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
BUILD_NUMBER: ${{ steps.ver.outputs.build }}
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: EveFlow-Windows-v${{ steps.ver.outputs.version }}
|
||||
|
||||
@@ -96,13 +96,13 @@ npm run typecheck # renderer + main process
|
||||
|
||||
Sans Electron, `npm run dev` puis `http://127.0.0.1:5173/` (ou `?mode=compact`) permet de travailler l'interface dans un navigateur ; les appels réseau passent alors directement par `fetch` (CORS requis côté serveur).
|
||||
|
||||
## Packaging Windows
|
||||
## Packaging Windows et versions
|
||||
|
||||
```bash
|
||||
npm run dist
|
||||
```
|
||||
|
||||
L'installateur NSIS est produit dans `out/`. Le workflow GitHub Actions construit l'exécutable sur chaque tag `v*`.
|
||||
L'installateur NSIS est produit dans `out/`. Le numéro de version publié est `releaseVersion` dans `package.json` (quatre chiffres, ex. `2.0.0.1` : le quatrième chiffre sert aux petits correctifs). `version` reste la base à trois chiffres exigée par electron-builder. À chaque fusion sur master, le workflow GitHub Actions crée le tag et la release Windows si ce numéro n'a pas encore été publié.
|
||||
|
||||
---
|
||||
|
||||
|
||||
+3
-2
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"name": "eveflow",
|
||||
"version": "2.0.2",
|
||||
"version": "2.0.0",
|
||||
"releaseVersion": "2.0.0.1",
|
||||
"description": "JARVIS-style desktop HUD for Hermes Agent: voice, streaming runs, scheduled jobs, skills and telemetry",
|
||||
"main": "dist-electron/main.js",
|
||||
"private": true,
|
||||
@@ -16,7 +17,7 @@
|
||||
"electron": "electron .",
|
||||
"start": "npm run build:electron && concurrently -k -s first \"npm run dev\" \"wait-on http://127.0.0.1:5173 && cross-env NODE_ENV=development VITE_DEV_SERVER_URL=http://127.0.0.1:5173 electron .\"",
|
||||
"preview": "vite preview",
|
||||
"dist": "npm run build && electron-builder --win --publish never",
|
||||
"dist": "node scripts/dist.mjs",
|
||||
"typecheck:electron": "tsc -p tsconfig.electron.json --noEmit"
|
||||
},
|
||||
"build": {
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
// Packages the app with electron-builder using the four-part release version
|
||||
// (package.json "releaseVersion", e.g. 2.0.0.1). package.json "version" must stay semver.
|
||||
import { spawnSync } from 'node:child_process';
|
||||
import { readFileSync } from 'node:fs';
|
||||
|
||||
const pkg = JSON.parse(readFileSync('package.json', 'utf8'));
|
||||
const release = pkg.releaseVersion || pkg.version;
|
||||
const build = release.split('.')[3] ?? '0';
|
||||
const args = process.argv.slice(2);
|
||||
if (!args.some((a) => a.startsWith('--win') || a.startsWith('--linux') || a.startsWith('--mac'))) args.unshift('--win');
|
||||
const result = spawnSync('npx', ['electron-builder', ...args, `--config.extraMetadata.version=${release}`], {
|
||||
stdio: 'inherit',
|
||||
shell: process.platform === 'win32',
|
||||
env: { ...process.env, BUILD_NUMBER: process.env.BUILD_NUMBER ?? build }
|
||||
});
|
||||
process.exit(result.status ?? 1);
|
||||
@@ -28,11 +28,11 @@ export function Telemetry() {
|
||||
<Activity size={14} />
|
||||
<span>Système</span>
|
||||
<span className="spacer" />
|
||||
<span className="chip">{m.hostname}</span>
|
||||
<span className="chip">{m.live ? m.hostname : 'HORS PONT'}</span>
|
||||
</header>
|
||||
<div className="telemetry">
|
||||
<Gauge value={m.cpuLoad} max={100} label="CPU" display={`${Math.round(m.cpuLoad)}%`} warn={90} />
|
||||
<Gauge value={m.memUsedPct} max={100} label="RAM" display={`${Math.round(m.memUsedPct)}%`} warn={92} />
|
||||
<Gauge value={m.cpuLoad} max={100} label="CPU" display={m.live ? `${Math.round(m.cpuLoad)}%` : '—'} warn={90} />
|
||||
<Gauge value={m.memUsedPct} max={100} label="RAM" display={m.live ? `${Math.round(m.memUsedPct)}%` : '—'} warn={92} />
|
||||
<Gauge value={m.fps} max={60} label="FPS" display={`${m.fps}`} />
|
||||
<Gauge value={m.cpuFreqMhz} max={5500} label="GHz" display={m.cpuFreqMhz ? (m.cpuFreqMhz / 1000).toFixed(1) : '—'} />
|
||||
</div>
|
||||
|
||||
@@ -4,6 +4,8 @@ import { bridge } from '../lib/bridge';
|
||||
|
||||
export interface LiveMetrics extends SystemMetrics {
|
||||
fps: number;
|
||||
/** false until the main process delivered real measurements */
|
||||
live: boolean;
|
||||
}
|
||||
|
||||
const EMPTY: LiveMetrics = {
|
||||
@@ -16,7 +18,8 @@ const EMPTY: LiveMetrics = {
|
||||
memUsedPct: 0,
|
||||
memTotalGb: 0,
|
||||
uptimeSec: 0,
|
||||
fps: 60
|
||||
fps: 60,
|
||||
live: false
|
||||
};
|
||||
|
||||
export function useMetrics(enabled = true, intervalMs = 2000): LiveMetrics {
|
||||
@@ -43,7 +46,7 @@ export function useMetrics(enabled = true, intervalMs = 2000): LiveMetrics {
|
||||
const api = bridge();
|
||||
const poll = () => {
|
||||
if (!api) return;
|
||||
api.system.metrics().then((m) => setMetrics((prev) => ({ ...prev, ...m }))).catch(() => undefined);
|
||||
api.system.metrics().then((m) => setMetrics((prev) => ({ ...prev, ...m, live: true }))).catch(() => undefined);
|
||||
};
|
||||
poll();
|
||||
const timer = setInterval(poll, intervalMs);
|
||||
|
||||
Reference in new issue
Block a user