mirror of
https://github.com/Llewellynvdm/nativefier.git
synced 2024-11-04 20:38:03 +00:00
* Make macos bundle identifier mention nativefier * Fix @types/debug here too Co-authored-by: Ronan Jouchet <ronan@jouchet.fr>
This commit is contained in:
parent
0d78978d9e
commit
46424f9795
@ -158,7 +158,7 @@ function changeAppPackageJsonName(
|
||||
appPath: string,
|
||||
name: string,
|
||||
url: string,
|
||||
): void {
|
||||
): string {
|
||||
const packageJsonPath = path.join(appPath, '/package.json');
|
||||
const packageJson = parseJson<PackageJSON>(
|
||||
fs.readFileSync(packageJsonPath).toString(),
|
||||
@ -171,6 +171,8 @@ function changeAppPackageJsonName(
|
||||
log.debug(`Updating ${packageJsonPath} 'name' field to ${normalizedAppName}`);
|
||||
|
||||
fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2));
|
||||
|
||||
return normalizedAppName;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -212,9 +214,10 @@ export async function prepareElectronApp(
|
||||
} catch (err: unknown) {
|
||||
log.error('Error copying injection files.', err);
|
||||
}
|
||||
changeAppPackageJsonName(
|
||||
const normalizedAppName = changeAppPackageJsonName(
|
||||
dest,
|
||||
options.packager.name as string,
|
||||
options.packager.targetUrl,
|
||||
);
|
||||
options.packager.appBundleId = `com.electron.nativefier.${normalizedAppName}`;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user