mirror of
https://github.com/Llewellynvdm/nativefier.git
synced 2024-11-04 20:38:03 +00:00
Fix regression with the asar code
OSX has a special cased resources path. Fixes #81.
This commit is contained in:
parent
554f3b7354
commit
178b3d4cd3
@ -5,8 +5,8 @@ var rimraf = require('rimraf')
|
||||
|
||||
module.exports = {
|
||||
asarApp: function asarApp (finalDir, cb) {
|
||||
var src = path.join(finalDir, 'resources', 'app')
|
||||
var dest = path.join(finalDir, 'resources', 'app.asar')
|
||||
var src = path.join(finalDir, 'app')
|
||||
var dest = path.join(finalDir, 'app.asar')
|
||||
asar.createPackage(src, dest, function (err) {
|
||||
if (err) return cb(err)
|
||||
rimraf(src, function (err) {
|
||||
|
4
linux.js
4
linux.js
@ -34,9 +34,11 @@ module.exports = {
|
||||
|
||||
function renameElectronBinary () {
|
||||
fs.rename(originalBinary, finalBinary, function electronRenamed (err) {
|
||||
var asarDir
|
||||
if (err) return cb(err)
|
||||
if (opts.asar) {
|
||||
common.asarApp(finalDir, cb)
|
||||
asarDir = path.join(finalDir, 'resources')
|
||||
common.asarApp(asarDir, cb)
|
||||
} else {
|
||||
cb(null, finalBinary)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user