Skip to content

Commit

Permalink
Merge pull request #36 from Mithgol/node-webkit-binary-name
Browse files Browse the repository at this point in the history
platform-dependent name of the node-webkit's executable
  • Loading branch information
Dane Springmeyer committed Feb 13, 2014
2 parents 3d4632a + e9b4dcb commit 0152085
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -55,7 +55,7 @@ And example from `node-sqlite3` looks like:
"binary": {
"module_name": "node_sqlite3",
"module_path": "./lib/binding/",
"remote_uri": "http://node-sqlite3.s3.amazonaws.com",
"remote_uri": "https://node-sqlite3.s3.amazonaws.com",
"template": "{configuration}/{module_name}-v{version}-{node_abi}-{platform}-{arch}.tar.gz"
}
```
Expand Down
10 changes: 8 additions & 2 deletions lib/util/test_binary.js
Expand Up @@ -22,8 +22,14 @@ module.exports.validate = function(opts,callback) {
}
var nw = (opts.runtime && opts.runtime === 'node-webkit');
if (nw) {
shell_cmd = 'node-webkit';
options.timeout = 5000;
if (process.platform === 'darwin') {
shell_cmd = 'node-webkit';
} else if (process.platform === 'win32') {
shell_cmd = 'nw.exe';
} else {
shell_cmd = 'nw';
}
} else if (process.platform === 'darwin' && arch_names[opts.target_arch]) {
shell_cmd = 'arch';
args.push(arch_names[opts.target_arch]);
Expand All @@ -35,7 +41,7 @@ module.exports.validate = function(opts,callback) {
return callback();
}
args.push(opts.module_main);
log.info("validate","Running test command: '" + shell_cmd + ' ' + args.join(' '));
log.info("validate","Running test command: '" + shell_cmd + ' ' + args.join(' ') + "'");
cp.execFile(shell_cmd, args, options, function(err, stdout, stderr) {
// check for normal timeout for node-webkit
if (err && nw && err.killed == true && err.signal.indexOf('SIG') > -1) {
Expand Down

0 comments on commit 0152085

Please sign in to comment.