From bd0ef96f50660be90398e1075434ef003112bbc5 Mon Sep 17 00:00:00 2001 From: Ayushman Chhabra <14110965+ayushmanchhabra@users.noreply.github.com> Date: Mon, 25 Nov 2024 20:07:22 +0530 Subject: [PATCH] fix(bld): parse options.app.icon correctly during build mode --- src/bld.js | 2 +- src/util.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bld.js b/src/bld.js index b7215523..a752befc 100644 --- a/src/bld.js +++ b/src/bld.js @@ -256,7 +256,7 @@ const setLinuxConfig = async ({ app, outDir }) => { GenericName: app.genericName, NoDisplay: app.noDisplay, Comment: app.comment, - Icon: path.resolve(outDir, 'package.nw', path.basename(app.icon)), + Icon: app.icon ? path.resolve(outDir, 'package.nw', app.icon) : '', Hidden: app.hidden, OnlyShowIn: app.onlyShowIn, NotShowIn: app.notShowIn, diff --git a/src/util.js b/src/util.js index 808d8ff7..9046275f 100644 --- a/src/util.js +++ b/src/util.js @@ -239,7 +239,7 @@ export const parse = async (options, pkg) => { options.app.name = options.app.name.replace(/[<>:"/\\|?*\u0000-\u001F]/g, ''); } /* Path to where the icon currently is in the filesystem */ - options.app.icon = options.app.icon ?? undefined; + options.app.icon = options.app.icon ?? pkg.window?.icon ?? undefined; if (options.app.icon) { options.app.icon = path.resolve(options.app.icon); }