mirror of
https://github.com/Llewellynvdm/nativefier.git
synced 2024-12-23 02:28:55 +00:00
By moving icon copy before packaging by `electron-packager` occurs.
This commit is contained in:
parent
f2c816795a
commit
3e0011a29c
@ -65,9 +65,8 @@ async function copyIconsIfNecessary(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// windows & linux: put the icon file into the app
|
// 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 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);
|
log.debug(`Copying icon ${options.packager.icon} to`, destIconPath);
|
||||||
await copyFileOrDir(options.packager.icon, destIconPath);
|
await copyFileOrDir(options.packager.icon, destIconPath);
|
||||||
@ -114,6 +113,7 @@ export async function buildNativefierApp(
|
|||||||
log.info('\nConverting icons...');
|
log.info('\nConverting icons...');
|
||||||
options.packager.dir = tmpPath; // const optionsWithTmpPath = { ...options, dir: tmpPath };
|
options.packager.dir = tmpPath; // const optionsWithTmpPath = { ...options, dir: tmpPath };
|
||||||
await convertIconIfNecessary(options);
|
await convertIconIfNecessary(options);
|
||||||
|
await copyIconsIfNecessary(options, tmpPath);
|
||||||
|
|
||||||
log.info(
|
log.info(
|
||||||
"\nPackaging... This will take a few seconds, maybe minutes if the requested Electron isn't cached yet...",
|
"\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...');
|
log.info('\nFinalizing build...');
|
||||||
const appPath = getAppPath(appPathArray);
|
const appPath = getAppPath(appPathArray);
|
||||||
await copyIconsIfNecessary(options, appPath);
|
|
||||||
|
|
||||||
if (appPath) {
|
if (appPath) {
|
||||||
let osRunHelp = '';
|
let osRunHelp = '';
|
||||||
|
Loading…
Reference in New Issue
Block a user