electron-osx-sign
Advanced tools
Comparing version 0.1.4 to 0.1.5
12
index.js
@@ -62,2 +62,3 @@ var fs = require('fs') | ||
childPaths = [ | ||
path.join(appFrameworksPath, 'Electron Framework.framework', 'Libraries', 'libnode.dylib'), | ||
path.join(appFrameworksPath, 'Electron Framework.framework', 'Versions', 'A', 'Electron Framework'), | ||
@@ -68,2 +69,3 @@ path.join(appFrameworksPath, 'Electron Framework.framework') | ||
childPaths = [ | ||
path.join(appFrameworksPath, 'Electron Framework.framework', 'Libraries', 'libnode.dylib'), | ||
path.join(appFrameworksPath, 'Electron Framework.framework', 'Versions', 'A', 'Electron Framework'), | ||
@@ -162,13 +164,11 @@ path.join(appFrameworksPath, 'Electron Framework.framework'), | ||
module.exports = function sign (opts, cb) { | ||
if (!cb) cb = function () {} | ||
if (!opts.app) return cb(new Error('Path to aplication must be specified.')) | ||
if (!fs.existsSync(opts.app)) return cb(new Error('Application not found.')) | ||
if (!cb) cb = function () {} | ||
// Match platform if none is provided | ||
if (!opts.platform) { | ||
var appFrameworksPath = generateAppFrameworksPath(opts) | ||
if (!fs.existsSync(path.join(appFrameworksPath, 'Mantle.framework')) | ||
&& !fs.existsSync(path.join(appFrameworksPath, 'ReactiveCocoa.framework')) | ||
&& !fs.existsSync(path.join(appFrameworksPath, 'Squirrel.framework'))) { | ||
// These frameworks do not exist in an Mac App Store version | ||
if (!fs.existsSync(path.join(appFrameworksPath, 'Squirrel.framework'))) { | ||
// The presence of Squirrel.framework identifies a Mac App Store build as | ||
// used in https://github.com/atom/electron/blob/master/docs/tutorial/mac-app-store-submission-guide.md | ||
opts.platform = 'mas' | ||
@@ -175,0 +175,0 @@ } else { |
{ | ||
"name": "electron-osx-sign", | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
"description": "Codesign for Electron-packed apps", | ||
@@ -38,5 +38,5 @@ "main": "index.js", | ||
"ignore": [ | ||
"test/work" | ||
] | ||
} | ||
} |
@@ -115,2 +115,8 @@ # electron-osx-sign [![npm][npm_img]][npm_url] | ||
## Electron | ||
Note: The Mac App Store builds of Electron started from v0.34.0. | ||
Note: From v0.36.0 there was a bug preventing GPU process to start after the app being sandboxed, so it is recommended to use v0.35.x before this bug gets fixed. You can find more about this in issue [atom/electron#3871](https://github.com/atom/electron/issues/3871), referred here at https://github.com/atom/electron/blob/master/docs/tutorial/mac-app-store-submission-guide.md. | ||
## Test | ||
@@ -133,3 +139,3 @@ | ||
> electron-sign@0.1.4 test electron-osx-sign | ||
> electron-sign@0.1.5 test electron-osx-sign | ||
> standard && tape test | ||
@@ -182,2 +188,6 @@ | ||
## Collaborators | ||
Thanks to [seanchas116](https://github.com/seanchas116) for improving the usability of this project implementation. | ||
## Related | ||
@@ -184,0 +194,0 @@ |
@@ -12,8 +12,9 @@ var sign = require('..') | ||
var app = util.generateAppPath(release) | ||
var opts = null // test with no options | ||
var opts = { | ||
app: util.generateAppPath(release) | ||
} // test with no options | ||
waterfall([ | ||
function (cb) { | ||
sign(app, opts, cb) | ||
sign(opts, cb) | ||
}, function (cb) { | ||
@@ -20,0 +21,0 @@ t.pass('app signed') |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
22064
363
196