return (x.version < y.version ? -1 : 1)
})
;(function verifyMsbuild () {
- if (!msbuilds.length) return callback(notfoundErr);
+ if (!msbuilds.length) return callback(notfoundErr)
msbuildPath = path.resolve(msbuilds.pop().path, 'msbuild.exe')
fs.stat(msbuildPath, function (err, stat) {
if (err) {
}
/**
- * Copies the node.lib file for the current target architecture into the
+ * Copies the iojs.lib file for the current target architecture into the
* current proper dev dir location.
*/
if (!win || !copyDevLib) return doBuild()
var buildDir = path.resolve(nodeDir, buildType)
- , archNodeLibPath = path.resolve(nodeDir, arch, 'node.lib')
- , buildNodeLibPath = path.resolve(buildDir, 'node.lib')
+ , archNodeLibPath = path.resolve(nodeDir, arch, 'iojs.lib')
+ , buildNodeLibPath = path.resolve(buildDir, 'iojs.lib')
mkdirp(buildDir, function (err, isNew) {
if (err) return callback(err)
log.verbose('"' + buildType + '" dir needed to be created?', isNew)
var rs = fs.createReadStream(archNodeLibPath)
, ws = fs.createWriteStream(buildNodeLibPath)
- log.verbose('copying "node.lib" for ' + arch, buildNodeLibPath)
+ log.verbose('copying "iojs.lib" for ' + arch, buildNodeLibPath)
rs.pipe(ws)
rs.on('error', callback)
ws.on('error', callback)
var p = arch === 'x64' ? 'x64' : 'Win32'
argv.push('/p:Configuration=' + buildType + ';Platform=' + p)
if (jobs) {
- if (!isNaN(parseInt(jobs, 10))) {
- argv.push('/m:' + parseInt(jobs, 10))
+ var j = parseInt(jobs, 10)
+ if (!isNaN(j) && j > 0) {
+ argv.push('/m:' + j)
} else if (jobs.toUpperCase() === 'MAX') {
argv.push('/m:' + require('os').cpus().length)
}
argv.push('-C')
argv.push('build')
if (jobs) {
- if (!isNaN(parseInt(jobs, 10))) {
+ var j = parseInt(jobs, 10)
+ if (!isNaN(j) && j > 0) {
argv.push('--jobs')
- argv.push(parseInt(jobs, 10))
+ argv.push(j)
} else if (jobs.toUpperCase() === 'MAX') {
argv.push('--jobs')
argv.push(require('os').cpus().length)