forked from super-productivity/super-productivity
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathelectron-builder.yaml
More file actions
215 lines (204 loc) · 7.48 KB
/
electron-builder.yaml
File metadata and controls
215 lines (204 loc) · 7.48 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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
appId: superProductivity
productName: Super Productivity
artifactName: ${name}-${arch}.${ext}
files:
- electron/**/*
- '!electron/**/*.ts'
- '!electron/**/*.js.map'
- .tmp/angular-dist/**/*
- 'embedded.provisionprofile'
# Exclude Nx binaries - they're build tools, not runtime dependencies
- '!**/@nx/nx-darwin-*/**'
- '!**/@nx/nx-linux-*/**'
- '!**/@nx/nx-win32-*/**'
# Capacitor (mobile shim) - never required from electron/ at runtime
- '!**/@capacitor/**'
- '!**/@capawesome/**'
- '!**/capacitor-plugin-safe-area/**'
# sharp + libvips native binaries - only used by tools/generate-*-icon.js
# during local dev; ~33 MB of unused weight in the asar otherwise
- '!**/sharp/**'
- '!**/@img/**'
# Nx LMDB cache and Rollup pulled in transitively by build tooling
- '!**/@lmdb/**'
- '!**/@rollup/**'
# Compiled into the Angular CSS bundle; the node_modules copy is unused
- '!**/@material-symbols/**'
# @noble/ciphers and hash-wasm are imported by the Angular bundle and
# inlined by the bundler (WASM is base64-embedded). The node_modules
# copies are dead weight at runtime.
- '!**/@noble/**'
- '!**/hash-wasm/**'
# uuidv7 is imported by src/ (Angular bundle inlines it); not used by electron/
- '!**/uuidv7/**'
#afterSign: ./tools/notarizeMacApp.js
directories:
output: './.tmp/app-builds'
# Post-pack hook that installs a shell wrapper for Linux builds to force
# --ozone-platform=x11 in Snap+Wayland sessions.
# See tools/afterPack.js + build/linux/snap-wrapper.sh and
# docs/research/snap-wayland-gpu-fix-research.md §18.
afterPack: ./tools/afterPack.js
win:
target:
- target: nsis
arch:
- arm64
- x64
- target: portable
arch:
- arm64
- x64
publish:
- github
nsis:
# Hardcoded to avoid spaces (SignPath converts spaces to dots). Also referenced in build.yml.
artifactName: Super-Productivity-Setup-${arch}.${ext}
# allow to install to custom location
oneClick: false
allowToChangeInstallationDirectory: true
portable:
artifactName: ${name}-${arch}.${ext}
appx:
applicationId: SuperProductivity
displayName: Super Productivity
publisherDisplayName: johannesjo
publisher: CN=___-___
identityName: ___johannesjo.SuperProductivity
linux:
# Fix for issue #5259: Set executable name without spaces for snap compatibility
executableName: superproductivity
category: Office;ProjectManagement
mimeTypes:
- x-scheme-handler/superproductivity
desktop:
entry:
StartupWMClass: superproductivity
target:
- AppImage
- deb
- snap
- rpm
publish:
- github
rpm:
# Fix for issue #5368: Prevent /usr/lib/.build-id/ collisions with other Electron apps
fpm: ['--rpm-rpmbuild-define=_build_id_links none']
# leads to Error: Please specify executable name as linux.executableName instead of linux.desktop.Exec
# desktop:
# Name: Super Productivity
# Comment: A todo list and time tracking app
# Exec: superProductivity
# Terminal: false
# Type: Application
# Icon: build/icon.png
# GenericName: ToDo List and Time Tracker
snap:
# We upload the .snap to the Snap Store ourselves via Canonical's snapcraft
# container in CI (build.yml). electron-builder's snap target has a
# hard-coded fallback to `snapStore` in `findSnapPublishConfig` (snap.js):
# if `snap.publish` is unset, it falls through `linux.publish`/`config.publish`
# to `{ provider: "snapStore" }`, then invokes `snapcraft` on the runner
# during upload — and we no longer install snapcraft there (it was an
# unreliable `sudo snap install`). Setting `snap.publish: github` overrides
# that fallback. The .snap also lands on the GitHub release as a side effect,
# which is harmless (and a useful manual-download fallback).
publish: github
grade: stable
allowNativeWayland: true
autoStart: true
base: core22
confinement: strict
environment:
# Fix for issue #4920: Isolate fontconfig cache to prevent GTK dialog rendering issues
# https://github.com/super-productivity/super-productivity/issues/4920
FC_CACHEDIR: $SNAP_USER_DATA/.cache/fontconfig
# Fix for issue #7298: tray icon renders as three dots on Ubuntu 24.04+ snap.
# Chromium's StatusIconLinuxDbus writes the tray PNG to TMPDIR and sends
# its path to gnome-shell via the SNI IconThemePath property. The default
# /tmp inside a strict snap is bind-mounted to
# /tmp/snap-private-tmp/snap.<name>/tmp with mode 0700 on the parent, so
# gnome-shell (outside the mount namespace) cannot stat the file and
# falls back to 'image-loading-symbolic' (three dots). $XDG_RUNTIME_DIR
# (= /run/user/$UID) is visible to both sides, so redirecting Chromium's
# temp writes there restores icon rendering. Matches Signal Desktop's
# snap and the official Electron snapcraft guide. electron-builder's
# SnapOptions docstring claims this as a default but snap.js no longer
# injects it (see node_modules/app-builder-lib/out/targets/snap.js).
TMPDIR: $XDG_RUNTIME_DIR
plugs:
- default # Includes: home, desktop, desktop-legacy, x11, wayland, etc.
- password-manager-service
- system-observe
- login-session-observe
# Fix for issue #6031: Add filesystem access for local file sync
# https://github.com/super-productivity/super-productivity/issues/6031
- removable-media # Allows sync to external drives/USB storage
# Override electron-builder's hardcoded gnome-3-28-1804 content snap (core20 era)
# with gnome-42-2204 (core22 era) for up-to-date Mesa drivers and GSettings schemas.
# The plug name must match the template key to replace it rather than duplicate it.
# The explicit `content` attribute tells snapd to match the gnome-42-2204 slot.
# Pattern from Tidal HiFi: https://github.com/Mastermindzh/tidal-hifi
# gnome-42-2204 has global auto-connect (granted June 2022).
# Ref: electron-builder#9452, electron-builder#8548 (closed, not planned)
- gnome-3-28-1804:
interface: content
content: gnome-42-2204
target: $SNAP/gnome-platform
default-provider: gnome-42-2204
flatpak:
runtimeVersion: '25.08'
finishArgs:
- --share=network
- --share=ipc
- --socket=x11
- --socket=wayland
- --socket=fallback-x11
- --socket=pulseaudio
- --device=dri
- --filesystem=home
- --talk-name=org.freedesktop.Notifications
- --talk-name=org.kde.StatusNotifierWatcher
- --talk-name=org.gnome.Mutter.IdleMonitor
- --talk-name=org.freedesktop.secrets
- --system-talk-name=org.freedesktop.login1
- --env=XCURSOR_PATH=/run/host/user-share/icons:/run/host/share/icons
- --env=ELECTRON_TRASH=gio
mac:
appId: com.super-productivity.app
type: distribution
category: public.app-category.productivity
entitlements: build/entitlements.mac.plist
entitlementsInherit: build/entitlements.mac.plist
hardenedRuntime: true
gatekeeperAssess: false
provisioningProfile: embedded.provisionprofile
darkModeSupport: true
notarize: true
extendInfo:
ITSAppUsesNonExemptEncryption: false
publish:
- github
target:
# - zip
- target: dmg
arch:
- arm64
- x64
- universal
dmg:
sign: true
publish:
- github
pkg:
publish: never
# HERE: electron-builder.mas.yaml
#mas:
# type: distribution
# category: public.app-category.productivity
# entitlements: build/entitlements.mas.plist
# entitlementsInherit: build/entitlements.mas.inherit.plist
# provisioningProfile: prod.provisionprofile
# icon: build/icon.icns
# hardenedRuntime: true
# publish: never