From 3c4dafe25fd28dd2407fca4a94f65877847e8ca9 Mon Sep 17 00:00:00 2001 From: Brendan Dailey Date: Thu, 11 Jul 2024 11:55:18 -0400 Subject: [PATCH] use user-specified setupIcon as app icon when applicable, else fall back to electron icon --- src/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 17c4180..ffac965 100644 --- a/src/index.ts +++ b/src/index.ts @@ -77,6 +77,7 @@ export async function createWindowsInstaller(options: SquirrelWindowsOptions): P const vendorPath = path.join(__dirname, '..', 'vendor'); const vendorUpdate = path.join(vendorPath, 'Squirrel.exe'); const appUpdate = path.join(appDirectory, 'Squirrel.exe'); + const electronIconUrl = 'https://raw.githubusercontent.com/electron/electron/main/shell/browser/resources/win/electron.ico'; await fs.copy(vendorUpdate, appUpdate); if (options.setupIcon && (options.skipUpdateIcon !== true)) { @@ -101,7 +102,7 @@ export async function createWindowsInstaller(options: SquirrelWindowsOptions): P const metadata: Metadata = { description: '', - iconUrl: 'https://raw.githubusercontent.com/electron/electron/main/shell/browser/resources/win/electron.ico' + iconUrl: options.setupIcon ? options.setupIcon : electronIconUrl }; if (options.usePackageJson !== false) {