@@ -21,14 +21,24 @@ function moveHelpers(helperSuffixes: Array<string>, frameworksPath: string, appN
21
21
} )
22
22
}
23
23
24
- function getAvailableHelperSuffixes ( helperEHPlist : string | null , helperNPPlist : string | null ) {
24
+ function getAvailableHelperSuffixes ( helperEHPlist : string | null , helperNPPlist : string | null , helperRendererPlist : string | null , helperPluginPlist : string | null , helperGPUPlist : string | null ) {
25
+
25
26
const result = [ " Helper" ]
26
27
if ( helperEHPlist != null ) {
27
28
result . push ( " Helper EH" )
28
29
}
29
30
if ( helperNPPlist != null ) {
30
31
result . push ( " Helper NP" )
31
32
}
33
+ if ( helperRendererPlist != null ) {
34
+ result . push ( " Helper (Renderer)" )
35
+ }
36
+ if ( helperPluginPlist != null ) {
37
+ result . push ( " Helper (Plugin)" )
38
+ }
39
+ if ( helperGPUPlist != null ) {
40
+ result . push ( " Helper (GPU)" )
41
+ }
32
42
return result
33
43
}
34
44
@@ -45,9 +55,12 @@ export async function createMacApp(packager: MacPackager, appOutDir: string, asa
45
55
const helperPlistFilename = path . join ( frameworksPath , "Electron Helper.app" , "Contents" , "Info.plist" )
46
56
const helperEHPlistFilename = path . join ( frameworksPath , "Electron Helper EH.app" , "Contents" , "Info.plist" )
47
57
const helperNPPlistFilename = path . join ( frameworksPath , "Electron Helper NP.app" , "Contents" , "Info.plist" )
58
+ const helperRendererPlistFilename = path . join ( frameworksPath , "Electron Helper (Renderer).app" , "Contents" , "Info.plist" )
59
+ const helperPluginPlistFilename = path . join ( frameworksPath , "Electron Helper (Plugin).app" , "Contents" , "Info.plist" )
60
+ const helperGPUPlistFilename = path . join ( frameworksPath , "Electron Helper (GPU).app" , "Contents" , "Info.plist" )
48
61
const helperLoginPlistFilename = path . join ( loginItemPath , "Electron Login Helper.app" , "Contents" , "Info.plist" )
49
62
50
- const plistContent : Array < any > = await executeAppBuilderAsJson ( [ "decode-plist" , "-f" , appPlistFilename , "-f" , helperPlistFilename , "-f" , helperEHPlistFilename , "-f" , helperNPPlistFilename , "-f" , helperLoginPlistFilename ] )
63
+ const plistContent : Array < any > = await executeAppBuilderAsJson ( [ "decode-plist" , "-f" , appPlistFilename , "-f" , helperPlistFilename , "-f" , helperEHPlistFilename , "-f" , helperNPPlistFilename , "-f" , helperRendererPlistFilename , "-f" , helperPluginPlistFilename , "-f" , helperGPUPlistFilename , "-f" , helperLoginPlistFilename ] )
51
64
52
65
if ( plistContent [ 0 ] == null ) {
53
66
throw new Error ( "corrupted Electron dist" )
@@ -57,11 +70,14 @@ export async function createMacApp(packager: MacPackager, appOutDir: string, asa
57
70
const helperPlist = plistContent [ 1 ] ! !
58
71
const helperEHPlist = plistContent [ 2 ]
59
72
const helperNPPlist = plistContent [ 3 ]
60
- const helperLoginPlist = plistContent [ 4 ]
73
+ const helperRendererPlist = plistContent [ 4 ]
74
+ const helperPluginPlist = plistContent [ 5 ]
75
+ const helperGPUPlist = plistContent [ 6 ]
76
+ const helperLoginPlist = plistContent [ 7 ]
61
77
62
78
// if an extend-info file was supplied, copy its contents in first
63
- if ( plistContent [ 5 ] != null ) {
64
- Object . assign ( appPlist , plistContent [ 5 ] )
79
+ if ( plistContent [ 8 ] != null ) {
80
+ Object . assign ( appPlist , plistContent [ 8 ] )
65
81
}
66
82
67
83
const buildMetadata = packager . config ! !
@@ -90,6 +106,15 @@ export async function createMacApp(packager: MacPackager, appOutDir: string, asa
90
106
helper . CFBundleVersion = appPlist . CFBundleVersion
91
107
}
92
108
109
+ if ( helperRendererPlist != null ) {
110
+ configureHelper ( helperRendererPlist , "(Renderer)" )
111
+ }
112
+ if ( helperPluginPlist != null ) {
113
+ configureHelper ( helperPluginPlist , "(Plugin)" )
114
+ }
115
+ if ( helperGPUPlist != null ) {
116
+ configureHelper ( helperGPUPlist , "(GPU)" )
117
+ }
93
118
if ( helperEHPlist != null ) {
94
119
configureHelper ( helperEHPlist , "EH" )
95
120
}
@@ -158,6 +183,15 @@ export async function createMacApp(packager: MacPackager, appOutDir: string, asa
158
183
if ( helperNPPlist != null ) {
159
184
plistDataToWrite [ helperNPPlistFilename ] = helperNPPlist
160
185
}
186
+ if ( helperRendererPlist != null ) {
187
+ plistDataToWrite [ helperRendererPlistFilename ] = helperRendererPlist
188
+ }
189
+ if ( helperPluginPlist != null ) {
190
+ plistDataToWrite [ helperPluginPlistFilename ] = helperPluginPlist
191
+ }
192
+ if ( helperGPUPlist != null ) {
193
+ plistDataToWrite [ helperGPUPlistFilename ] = helperGPUPlist
194
+ }
161
195
if ( helperLoginPlist != null ) {
162
196
plistDataToWrite [ helperLoginPlistFilename ] = helperLoginPlist
163
197
}
@@ -169,7 +203,7 @@ export async function createMacApp(packager: MacPackager, appOutDir: string, asa
169
203
unlinkIfExists ( path . join ( appOutDir , "LICENSES.chromium.html" ) ) ,
170
204
] )
171
205
172
- await moveHelpers ( getAvailableHelperSuffixes ( helperEHPlist , helperNPPlist ) , frameworksPath , appFilename , "Electron" )
206
+ await moveHelpers ( getAvailableHelperSuffixes ( helperEHPlist , helperNPPlist , helperRendererPlist , helperPluginPlist , helperGPUPlist ) , frameworksPath , appFilename , "Electron" )
173
207
174
208
if ( helperLoginPlist != null ) {
175
209
const prefix = "Electron"
0 commit comments