Skip to content

Commit aaeee76

Browse files
psxjpcDomenic Murtari
authored andcommitted
Rename Binary in OSX (CFBundleExecutable) #195
Tackles the issue #195 by renaming the binary to opts.name
1 parent 72f6e08 commit aaeee76

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

mac.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ module.exports = {
7777
appPlist.CFBundleName = opts.name
7878
helperPlist.CFBundleDisplayName = opts.name + ' Helper'
7979
helperPlist.CFBundleIdentifier = helperBundleIdentifier
80+
appPlist.CFBundleExecutable = opts.name
8081
helperPlist.CFBundleName = opts.name
8182
helperPlist.CFBundleExecutable = opts.name + ' Helper'
8283
helperEHPlist.CFBundleDisplayName = opts.name + ' Helper EH'
@@ -153,6 +154,12 @@ module.exports = {
153154
mv(path.dirname(contentsPath), finalAppPath, cb)
154155
})
155156

157+
if (appPlist.CFBundleExecutable !== 'Electron') {
158+
operations.push(function (cb) {
159+
mv(tempPath + '/' + opts.name + '.app/Contents/MacOS/Electron', tempPath + '/' + opts.name + '.app/Contents/MacOS/' + appPlist.CFBundleExecutable, cb)
160+
})
161+
}
162+
156163
if (opts.sign) {
157164
operations.push(function (cb) {
158165
sign({

0 commit comments

Comments
 (0)