diff --git a/src/build/buildNativefierApp.ts b/src/build/buildNativefierApp.ts index c864e79..85a5928 100644 --- a/src/build/buildNativefierApp.ts +++ b/src/build/buildNativefierApp.ts @@ -65,9 +65,8 @@ async function copyIconsIfNecessary( } // windows & linux: put the icon file into the app - const destAppPath = path.join(appPath, 'resources/app'); const destFileName = `icon${path.extname(options.packager.icon)}`; - const destIconPath = path.join(destAppPath, destFileName); + const destIconPath = path.join(appPath, destFileName); log.debug(`Copying icon ${options.packager.icon} to`, destIconPath); await copyFileOrDir(options.packager.icon, destIconPath); @@ -114,6 +113,7 @@ export async function buildNativefierApp( log.info('\nConverting icons...'); options.packager.dir = tmpPath; // const optionsWithTmpPath = { ...options, dir: tmpPath }; await convertIconIfNecessary(options); + await copyIconsIfNecessary(options, tmpPath); log.info( "\nPackaging... This will take a few seconds, maybe minutes if the requested Electron isn't cached yet...", @@ -124,7 +124,6 @@ export async function buildNativefierApp( log.info('\nFinalizing build...'); const appPath = getAppPath(appPathArray); - await copyIconsIfNecessary(options, appPath); if (appPath) { let osRunHelp = '';