Fix Linux Electron icon

I can't build this locally over some strange permissions issue. I'm pushing to try if it works on CI.

I've tried many suggestions mentioned in the following PRs, but nothing worked. This one seems to at least try to do something about the icns file, though it's failing locally, like I said:

- https://github.com/electron-userland/electron-builder/issues/748
- https://github.com/electron-userland/electron-builder/issues/2269
- https://github.com/electron-userland/electron-builder/issues/4617
- https://github.com/electron-userland/electron-builder/pull/5385
- https://github.com/electron-userland/electron-builder/issues/2577#issuecomment-659879082

Related to #123
This commit is contained in:
Bruno Bernardino 2022-02-24 16:14:05 +00:00
parent 4a1ecd5b47
commit 9880e4c2c9
No known key found for this signature in database
GPG Key ID: D1B0A69ADD114ECE
4 changed files with 11483 additions and 11171 deletions

2
package-lock.json generated
View File

@ -15464,7 +15464,7 @@
"maildev": {
"version": "git+ssh://git@github.com/padloc/maildev.git#a3ac6bf682dfb7cbb08b8b86e7b8afc9e5e41c66",
"dev": true,
"from": "maildev@git+ssh://git@github.com:padloc/maildev.git",
"from": "maildev@github:padloc/maildev",
"requires": {
"async": "^3.2.3",
"commander": "^9.0.0",

File diff suppressed because it is too large Load Diff

View File

@ -28,7 +28,7 @@
"clean-webpack-plugin": "3.0.0",
"css-loader": "5.2.6",
"electron": "14.1.1",
"electron-builder": "22.13.1",
"electron-builder": "22.14.13",
"electron-notarize": "1.1.1",
"file-loader": "6.2.0",
"html-webpack-plugin": "5.3.2",

View File

@ -27,6 +27,8 @@ async function main() {
.png()
.toFile(join(buildDir, "icon.png"));
fs.copyFileSync(join(assetsDir, "app-icon.icns"), join(buildDir, "icon.icns"));
fs.copyFileSync(resolve(__dirname, "entitlements.plist"), join(buildDir, "entitlements.plist"));
const buildConfig = {
@ -42,11 +44,16 @@ async function main() {
gatekeeperAssess: false,
entitlements: "entitlements.plist",
entitlementsInherit: "entitlements.plist",
category: "Utility",
},
protocols: {
name,
schemes: [scheme],
},
linux: {
icon: "./icon.icns",
category: "Utility",
},
afterSign: "scripts/notarize.js",
};