From 467ed0efc0d2a7e09f3007811f65af9c50b86f5a Mon Sep 17 00:00:00 2001 From: Michael Quevillon Date: Wed, 28 Jul 2021 14:18:57 -0400 Subject: [PATCH 1/4] Upgrade electron-util to 0.17.0 --- package-lock.json | 17 ++++++++++------- package.json | 2 +- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index be6954a02..06315097d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,7 @@ "electron-localshortcut": "^3.2.1", "electron-store": "^6.0.1", "electron-updater": "^4.3.5", - "electron-util": "^0.14.2", + "electron-util": "^0.17.0", "element-ready": "^4.1.1", "facebook-locales": "^1.0.916", "is-online": "^8.5.1", @@ -3068,12 +3068,15 @@ } }, "node_modules/electron-util": { - "version": "0.14.2", - "resolved": "https://registry.npmjs.org/electron-util/-/electron-util-0.14.2.tgz", - "integrity": "sha512-pnnRJiWajDcTtEAS33RgP3XVO+9cJjOlBA0BKk6cABjcPxihgCwiGWplCOHc0lH43f68ZJZweiunwomJC+TWng==", + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/electron-util/-/electron-util-0.17.0.tgz", + "integrity": "sha512-61+NEPdIN68EBC9XDPNAKs14HlPdc7HsL6lfQ+QTiya+3BMzayBqUsvN1LrT7IoGpPuuZns+iaCKf1N78dEF+w==", "dependencies": { "electron-is-dev": "^1.1.0", "new-github-issue-url": "^0.2.1" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/elegant-spinner": { @@ -14968,9 +14971,9 @@ } }, "electron-util": { - "version": "0.14.2", - "resolved": "https://registry.npmjs.org/electron-util/-/electron-util-0.14.2.tgz", - "integrity": "sha512-pnnRJiWajDcTtEAS33RgP3XVO+9cJjOlBA0BKk6cABjcPxihgCwiGWplCOHc0lH43f68ZJZweiunwomJC+TWng==", + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/electron-util/-/electron-util-0.17.0.tgz", + "integrity": "sha512-61+NEPdIN68EBC9XDPNAKs14HlPdc7HsL6lfQ+QTiya+3BMzayBqUsvN1LrT7IoGpPuuZns+iaCKf1N78dEF+w==", "requires": { "electron-is-dev": "^1.1.0", "new-github-issue-url": "^0.2.1" diff --git a/package.json b/package.json index a52c99538..6d719acbb 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "electron-localshortcut": "^3.2.1", "electron-store": "^6.0.1", "electron-updater": "^4.3.5", - "electron-util": "^0.14.2", + "electron-util": "^0.17.0", "element-ready": "^4.1.1", "facebook-locales": "^1.0.916", "is-online": "^8.5.1", From 4272827a8fb6866c53a56ec7bfed32e8f30eb939 Mon Sep 17 00:00:00 2001 From: Michael Quevillon Date: Wed, 28 Jul 2021 14:21:15 -0400 Subject: [PATCH 2/4] Improve AboutWindow information --- source/menu.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/menu.ts b/source/menu.ts index a80291b17..8164e7eb4 100644 --- a/source/menu.ts +++ b/source/menu.ts @@ -675,7 +675,8 @@ ${debugInfo()}`; }, aboutMenuItem({ icon: caprineIconPath, - text: 'Created by Sindre Sorhus' + copyright: 'Created by Sindre Sorhus', + website: 'https://sindresorhus.com/caprine/' }) ); } From 7863c1659d9daf519797f978823a42c42e12e390 Mon Sep 17 00:00:00 2001 From: Michael Quevillon Date: Wed, 28 Jul 2021 14:54:22 -0400 Subject: [PATCH 3/4] Unpack icon for the about window --- package.json | 3 +++ source/constants.ts | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 6d719acbb..0ad235223 100644 --- a/package.json +++ b/package.json @@ -86,6 +86,9 @@ "**/*", "!media${/*}" ], + "asarUnpack": [ + "static/Icon.png" + ], "appId": "com.sindresorhus.caprine", "mac": { "category": "public.app-category.social-networking", diff --git a/source/constants.ts b/source/constants.ts index 173252610..2c24fdf1e 100644 --- a/source/constants.ts +++ b/source/constants.ts @@ -1,3 +1,4 @@ import * as path from 'path'; +import {fixPathForAsarUnpack} from 'electron-util'; -export const caprineIconPath = path.join(__dirname, '..', 'static', 'Icon.png'); +export const caprineIconPath = fixPathForAsarUnpack(path.join(__dirname, '..', 'static', 'Icon.png')); From fb0650a9950aeb3701c274be44199a4aab7bf01e Mon Sep 17 00:00:00 2001 From: Sindre Sorhus Date: Thu, 29 Jul 2021 11:48:08 +0200 Subject: [PATCH 4/4] Update menu.ts --- source/menu.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/menu.ts b/source/menu.ts index 8164e7eb4..52373221d 100644 --- a/source/menu.ts +++ b/source/menu.ts @@ -676,7 +676,7 @@ ${debugInfo()}`; aboutMenuItem({ icon: caprineIconPath, copyright: 'Created by Sindre Sorhus', - website: 'https://sindresorhus.com/caprine/' + website: 'https://sindresorhus.com/caprine' }) ); }