2
2
mirror of https://github.com/Llewellynvdm/nativefier.git synced 2024-12-22 18:18:55 +00:00

Fix icon path error when passing asar (--conceal) flag (fix #975) (PR #1074)

By moving icon copy before packaging by `electron-packager` occurs.
This commit is contained in:
erythros 2020-11-30 14:51:19 -05:00 committed by GitHub
parent f2c816795a
commit 3e0011a29c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 = '';