mirror of
https://github.com/Llewellynvdm/nativefier.git
synced 2025-02-03 04:08:24 +00:00
Merge pull request #24 from malept/ensure-outdir-exists
Ensure the out dir specified exists when building OSX app
This commit is contained in:
commit
be46561151
22
mac.js
22
mac.js
@ -98,18 +98,22 @@ function buildMacApp (opts, cb, newApp) {
|
|||||||
|
|
||||||
function moveApp () {
|
function moveApp () {
|
||||||
// finally, move app into cwd
|
// finally, move app into cwd
|
||||||
var finalPath = path.join(opts.out || process.cwd(), opts.name + '.app')
|
var outdir = opts.out || process.cwd()
|
||||||
|
var finalPath = path.join(outdir, opts.name + '.app')
|
||||||
|
|
||||||
fs.rename(newApp, finalPath, function moved (err) {
|
mkdirp(outdir, function mkoutdirp () {
|
||||||
if (err) return cb(err)
|
if (err) return cb(err)
|
||||||
if (opts.asar) {
|
fs.rename(newApp, finalPath, function moved (err) {
|
||||||
asarApp(function (err) {
|
if (err) return cb(err)
|
||||||
if (err) return cb(err)
|
if (opts.asar) {
|
||||||
|
asarApp(function (err) {
|
||||||
|
if (err) return cb(err)
|
||||||
|
updateMacIcon()
|
||||||
|
})
|
||||||
|
} else {
|
||||||
updateMacIcon()
|
updateMacIcon()
|
||||||
})
|
}
|
||||||
} else {
|
})
|
||||||
updateMacIcon()
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user