fix: proper macOS dock icon via .icns bundle replacement

Replace the Swift squircle hack with the correct Apple approach:
generate a proper .icns using sips + iconutil, then replace
electron.icns in the Electron bundle before launch. macOS applies
its native squircle mask + shadow from the .icns automatically.
This commit is contained in:
Jannis Braun
2026-03-16 04:29:09 +01:00
parent c176ea801a
commit cd2f1e52ef
4 changed files with 23 additions and 32 deletions
-10
View File
@@ -513,16 +513,6 @@ if (!gotTheLock) {
// ─── App Lifecycle ──────────────────────────────────────────────────────────
app.whenReady().then(async () => {
// Set dock icon on macOS (overrides default Electron icon in dev mode)
if (process.platform === 'darwin' && app.dock) {
const dockIcon = path.join(__dirname, '..', 'build', 'icon-dock.png');
const fallbackIcon = path.join(__dirname, '..', 'build', 'icon.png');
const iconPath = fs.existsSync(dockIcon) ? dockIcon : fallbackIcon;
if (fs.existsSync(iconPath)) {
app.dock.setIcon(iconPath);
}
}
// macOS application menu with "Change Instance"
if (process.platform === 'darwin') {
const appMenu = Menu.buildFromTemplate([