2
2
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:
Mark Lee 2015-06-22 07:52:44 -07:00
parent 554f3b7354
commit 178b3d4cd3
2 changed files with 5 additions and 3 deletions

View File

@ -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) {

View File

@ -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)
}