mirror of https://github.com/jiahaog/Nativefier
On successful build, better explain how to run the app and what to do with it (fix #1029)
This commit is contained in:
parent
cb4ab05e7b
commit
7f3ebb1a69
|
@ -126,5 +126,18 @@ export async function buildNativefierApp(
|
|||
const appPath = getAppPath(appPathArray);
|
||||
await copyIconsIfNecessary(options, appPath);
|
||||
|
||||
if (appPath) {
|
||||
let osRunHelp = '';
|
||||
if (options.packager.platform === 'win32') {
|
||||
osRunHelp = `the contained .exe file.`;
|
||||
} else if (options.packager.platform === 'linux') {
|
||||
osRunHelp = `the contained executable file (prefixing with ./ if necessary)\nMenu/desktop shortcuts are up to you, because Nativefier cannot know where you're going to move the app. Search for "linux .desktop file" for help, or see https://wiki.archlinux.org/index.php/Desktop_entries`;
|
||||
} else if (options.packager.platform === 'darwin') {
|
||||
osRunHelp = `the app bundle.`;
|
||||
}
|
||||
log.info(
|
||||
`App built to ${appPath} , move it wherever it makes sense for you and run ${osRunHelp}`,
|
||||
);
|
||||
}
|
||||
return appPath;
|
||||
}
|
||||
|
|
14
src/cli.ts
14
src/cli.ts
|
@ -296,15 +296,7 @@ if (require.main === module) {
|
|||
}
|
||||
checkInternet();
|
||||
const options = { ...positionalOptions, ...commander.opts() };
|
||||
buildNativefierApp(options)
|
||||
.then((appPath) => {
|
||||
if (!appPath) {
|
||||
log.info(`App *not* built to ${appPath}`);
|
||||
return;
|
||||
}
|
||||
log.info(`App built to ${appPath}`);
|
||||
})
|
||||
.catch((error) => {
|
||||
log.error('Error during build. Run with --verbose for details.', error);
|
||||
});
|
||||
buildNativefierApp(options).catch((error) => {
|
||||
log.error('Error during build. Run with --verbose for details.', error);
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue