Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

platform-dependent name of the node-webkit's executable #36

Merged
merged 3 commits into from Feb 13, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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