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
+1 -1
View File
@@ -5,7 +5,7 @@
"main": "dist/main.js",
"scripts": {
"build:ts": "tsc",
"dev": "mkdir -p build && cp ../../icon.png build/icon.png && node -e \"try{require('child_process').execSync('swift scripts/gen-dock-icon.swift',{stdio:'inherit'})}catch(e){}\" && tsc && electron .",
"dev": "mkdir -p build && cp ../../icon.png build/icon.png && bash scripts/gen-icns.sh && cp build/icon.icns $(find ../../node_modules -path '*/electron/dist/Electron.app/Contents/Resources/electron.icns' 2>/dev/null | head -1) 2>/dev/null; tsc && electron .",
"prebuild": "mkdir -p build && cp ../../icon.png build/icon.png",
"build": "tsc && electron-builder",
"clean": "rm -rf dist dist-electron"