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.
22 lines
736 B
JSON
22 lines
736 B
JSON
{
|
|
"name": "@backspace/desktop",
|
|
"version": "1.0.0",
|
|
"private": true,
|
|
"main": "dist/main.js",
|
|
"scripts": {
|
|
"build:ts": "tsc",
|
|
"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"
|
|
},
|
|
"dependencies": {
|
|
"electron-updater": "^6.3.0"
|
|
},
|
|
"devDependencies": {
|
|
"electron": "^33.2.0",
|
|
"electron-builder": "^25.1.8",
|
|
"typescript": "^5.7.2"
|
|
}
|
|
}
|