-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathelectron-builder.yml
More file actions
131 lines (115 loc) · 4.91 KB
/
electron-builder.yml
File metadata and controls
131 lines (115 loc) · 4.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
# ByteBox - electron-builder configuration
# Made with ❤️ by Pink Pixel
#
# Build targets:
# Linux → AppImage (universal) + .deb + .rpm + .pacman
# .snap is built only in CI (requires snapcraft)
# Windows → NSIS installer (.exe)
# macOS → .dmg (requires a macOS build host)
#
# Run:
# npm run electron:build:linux (from Linux — AppImage, .deb, .rpm, .pacman)
# npm run electron:build:win (cross-compile from Linux, needs Wine)
# npm run electron:build (current platform)
appId: dev.pinkpixel.bytebox
productName: ByteBox
copyright: "Copyright © 2025 Pink Pixel"
# ── Packaging ─────────────────────────────────────────────────────────────────
# Disable asar so the Next.js server can read its own files from disk.
# Asar patching is unreliable with some Next.js internals.
asar: false
directories:
output: release
buildResources: electron/assets
# Files to include in the packaged app.
# electron-builder starts from the project root.
files:
- dist-electron/** # compiled main + preload
- .next/** # built Next.js output
- public/** # static assets
- package.json
- next.config.mjs
- prisma.config.ts
- tsconfig.json
- prisma/schema.prisma
- prisma/migrations/**
- scripts/**
- node_modules/**
# .prisma/client is copied by the afterPack hook (electron-builder skips dot-dirs)
# Exclude noise from node_modules to reduce bundle size
- "!node_modules/**/{README,readme,Readme,CHANGELOG,changelog}.md"
- "!node_modules/**/{CONTRIBUTING,contributing,AUTHORS,AUTHOR}.md"
- "!node_modules/**/{test,tests,__tests__,spec,specs}/**"
- "!node_modules/**/*.{ts,tsx,map,d.ts}"
- "!node_modules/**/{.github,.vscode,docs,doc,example,examples}/**"
- "!node_modules/.cache/**"
# Turbopack creates alias packages in .next/node_modules/ for mangled module IDs
# (e.g. "better-sqlite3-<hash>"). electron-builder's !**/node_modules/** default
# exclusion removes them, so we explicitly re-include this directory.
# The afterPack hook then patches the better-sqlite3 binary for Electron's ABI.
- ".next/node_modules/**"
# Native modules (better-sqlite3) must be compiled against the Electron ABI.
# electron-builder's npmRebuild is unreliable, so we disable it and use a
# custom afterPack hook that runs node-gyp directly.
npmRebuild: false
afterPack: ./scripts/electron-rebuild-native.cjs
# ── Linux ─────────────────────────────────────────────────────────────────────
linux:
target:
- AppImage # universal — works on any distro
- deb # Debian / Ubuntu / Mint
# snap is excluded from local builds — requires snapcraft to be installed.
# It is built automatically in the GitHub Actions release workflow.
category: Development
icon: public/icon.png # 256×256+ PNG
synopsis: Developer reference cards & bookmarks dashboard
description: >
ByteBox is a local-first dashboard for developers. Store bookmarks,
code snippets, shell commands, notes, and images — all in one place,
fully offline.
desktop:
entry:
Name: ByteBox
Comment: Developer reference cards and bookmarks dashboard
Categories: Development;Utility;
deb:
depends:
- libgtk-3-0
- libnotify4
- libnss3
- libxss1
- libxtst6
- xdg-utils
- libatspi2.0-0
- libsecret-1-0
# snap config — used only in CI (GitHub Actions installs snapcraft).
# productName "ByteBox" is used as the snap name automatically.
snap:
summary: Developer reference cards & bookmarks dashboard
grade: stable
confinement: classic # classic needed — app reads/writes arbitrary files (SQLite)
# ── Windows ───────────────────────────────────────────────────────────────────
win:
target:
- target: nsis
arch:
- x64
# electron-builder can convert a PNG to .ico if @electron/windows-sign
# or nsis-resources are available; otherwise supply a real .ico here.
icon: public/icon.png
nsis:
oneClick: false
allowToChangeInstallationDirectory: true
createDesktopShortcut: true
createStartMenuShortcut: true
shortcutName: ByteBox
installerIcon: public/icon.png
uninstallerIcon: public/icon.png
# ── macOS (cross-compile not supported — must build on macOS) ─────────────────
mac:
target:
- dmg
category: public.app-category.developer-tools
icon: public/icon.png # ideally a 1024×1024 PNG or .icns
# ── Do not publish automatically ──────────────────────────────────────────────
publish: null