@@ -66,25 +66,27 @@ export async function createApp(packager: PlatformPackager<any>, appOutDir: stri
66
66
const icon = await packager . getIconPath ( )
67
67
const oldIcon = appPlist . CFBundleIconFile
68
68
if ( icon != null ) {
69
- appPlist . CFBundleIconFile = `${ appInfo . productFilename } .icns`
69
+ appPlist . CFBundleIconFile = `${ appFilename } .icns`
70
70
}
71
71
72
72
appPlist . CFBundleDisplayName = appInfo . productName
73
73
appPlist . CFBundleIdentifier = appBundleIdentifier
74
74
appPlist . CFBundleName = appInfo . productName
75
- helperPlist . CFBundleDisplayName = ` ${ appInfo . productName } Helper`
76
- helperPlist . CFBundleIdentifier = helperBundleIdentifier
77
- appPlist . CFBundleExecutable = appFilename
78
- helperPlist . CFBundleName = appInfo . productName
75
+
76
+ // https://github.com/electron-userland/electron-builder/issues/1278
77
+ appPlist . CFBundleExecutable = ! appFilename . endsWith ( " Helper" ) ? appFilename : appFilename . substring ( 0 , appFilename . length - " Helper" . length )
78
+
79
79
helperPlist . CFBundleExecutable = `${ appFilename } Helper`
80
- helperEHPlist . CFBundleDisplayName = `${ appFilename } Helper EH`
81
- helperEHPlist . CFBundleIdentifier = `${ helperBundleIdentifier } .EH`
82
- helperEHPlist . CFBundleName = `${ appInfo . productName } Helper EH`
83
80
helperEHPlist . CFBundleExecutable = `${ appFilename } Helper EH`
81
+ helperNPPlist . CFBundleExecutable = `${ appFilename } Helper NP`
82
+
83
+ helperPlist . CFBundleDisplayName = `${ appInfo . productName } Helper`
84
+ helperEHPlist . CFBundleDisplayName = `${ appInfo . productName } Helper EH`
84
85
helperNPPlist . CFBundleDisplayName = `${ appInfo . productName } Helper NP`
86
+
87
+ helperPlist . CFBundleIdentifier = helperBundleIdentifier
88
+ helperEHPlist . CFBundleIdentifier = `${ helperBundleIdentifier } .EH`
85
89
helperNPPlist . CFBundleIdentifier = `${ helperBundleIdentifier } .NP`
86
- helperNPPlist . CFBundleName = `${ appInfo . productName } Helper NP`
87
- helperNPPlist . CFBundleExecutable = `${ appFilename } Helper NP`
88
90
89
91
appPlist . CFBundleShortVersionString = appInfo . version
90
92
appPlist . CFBundleVersion = appInfo . buildVersion
0 commit comments