diff options
author | isaacs <i@izs.me> | 2013-10-29 00:48:20 +0400 |
---|---|---|
committer | isaacs <i@izs.me> | 2013-10-29 00:48:20 +0400 |
commit | ee53f9cc7013fa01ad606b3b83c854be9d82a373 (patch) | |
tree | 6f81ecf73a9e83109fb33532f759939c282bfb6d /node_modules/node-gyp | |
parent | 729e1d75e0edd479a3eaf1f19671e87a36bc2fa3 (diff) |
node-gyp@0.11.0
Diffstat (limited to 'node_modules/node-gyp')
-rw-r--r-- | node_modules/node-gyp/lib/build.js | 2 | ||||
-rw-r--r-- | node_modules/node-gyp/lib/configure.js | 49 | ||||
-rw-r--r-- | node_modules/node-gyp/lib/install.js | 10 | ||||
-rw-r--r-- | node_modules/node-gyp/lib/node-gyp.js | 1 | ||||
-rw-r--r-- | node_modules/node-gyp/package.json | 13 |
5 files changed, 66 insertions, 9 deletions
diff --git a/node_modules/node-gyp/lib/build.js b/node_modules/node-gyp/lib/build.js index e1e8c36f5..f3605902e 100644 --- a/node_modules/node-gyp/lib/build.js +++ b/node_modules/node-gyp/lib/build.js @@ -20,7 +20,7 @@ exports.usage = 'Invokes `' + (win ? 'msbuild' : 'make') + '` and builds the mod function build (gyp, argv, callback) { var makeCommand = gyp.opts.make || process.env.MAKE - || (process.platform.indexOf('bsd') != -1 ? 'gmake' : 'make') + || (process.platform.indexOf('bsd') != -1 && process.platform.indexOf('kfreebsd') == -1 ? 'gmake' : 'make') , command = win ? 'msbuild' : makeCommand , buildDir = path.resolve('build') , configPath = path.resolve(buildDir, 'config.gypi') diff --git a/node_modules/node-gyp/lib/configure.js b/node_modules/node-gyp/lib/configure.js index 357f27d7f..0dcd2852d 100644 --- a/node_modules/node-gyp/lib/configure.js +++ b/node_modules/node-gyp/lib/configure.js @@ -37,7 +37,9 @@ function configure (gyp, argv, callback) { checkVCExpress(function () { if (hasVCExpress || hasVC2012Express) { checkWinSDK(function () { - checkPython() + checkVSPrompt(function() { + checkPython() + }) }) } else { checkPython() @@ -125,6 +127,22 @@ function configure (gyp, argv, callback) { 'You can pass the --python switch to point to Python >= v2.5.0 & < 3.0.0.')) } + function checkVSPrompt(cb) { + // in the event that they have both installed, see if they are using a particular command prompt + if (hasVCExpress && hasVC2012Express) { + if (process.env["VisualStudioVersion"] === "11.0") { + // they are using the VS 2012 command prompt, unset the VS 2010 variables + hasVCExpress = false + hasWin71SDK = false + } else { + // otherwise, unset the VS 2012 variables + hasVC2012Express = false + hasWin8SDK = false + } + } + cb() + } + function checkWinSDK(cb) { checkWin71SDK(function() { checkWin8SDK(cb) @@ -146,12 +164,36 @@ function configure (gyp, argv, callback) { cb() }) } + + function checkVC201264(cb) { + var cp = spawn('reg', ['query', 'HKLM\\SOFTWARE\\Wow6432Node\\Microsoft\\VisualStudio\\11.0\\Setup\\VC', '/v', 'ProductDir']) + cp.on('exit', function (code) { + hasVC2012Express = (code === 0) + cb() + }) + } + + function checkVC2012(cb) { + var cp = spawn('reg', ['query', 'HKLM\\SOFTWARE\\Microsoft\\VisualStudio\\11.0\\Setup\\VC', '/v', 'ProductDir']) + cp.on('exit', function (code) { + hasVC2012Express = (code === 0) + if (code !== 0) { + checkVC201264(cb) + } else { + cb() + } + }) + } function checkVC2012Express64(cb) { var cp = spawn('reg', ['query', 'HKLM\\SOFTWARE\\Wow6432Node\\Microsoft\\VCExpress\\11.0\\Setup\\VC', '/v', 'ProductDir']) cp.on('exit', function (code) { - hasVC2012Express = (code === 0) - cb() + hasVC2012Express = (code === 0) + if (code !== 0) { + checkVC2012(cb) + } else { + cb() + } }) } @@ -178,6 +220,7 @@ function configure (gyp, argv, callback) { function checkVCExpress(cb) { spawn('reg', ['query', 'HKLM\\Software\\Microsoft\\VCExpress\\10.0\\Setup\\VC', '/v', 'ProductDir']) .on('exit', function (code) { + hasVCExpress = (code === 0) if (code !== 0) { checkVCExpress64(cb) } else { diff --git a/node_modules/node-gyp/lib/install.js b/node_modules/node-gyp/lib/install.js index 9f5b80b91..60dc3cd63 100644 --- a/node_modules/node-gyp/lib/install.js +++ b/node_modules/node-gyp/lib/install.js @@ -171,7 +171,8 @@ function install (gyp, argv, callback) { } // now download the node tarball - var tarballUrl = distUrl + '/v' + version + '/node-v' + version + '.tar.gz' + var tarPath = gyp.opts['tarball']; + var tarballUrl = tarPath ? tarPath : distUrl + '/v' + version + '/node-v' + version + '.tar.gz' , badDownload = false , extractCount = 0 , gunzip = zlib.createGunzip() @@ -201,6 +202,13 @@ function install (gyp, argv, callback) { extracter.on('end', afterTarball) // download the tarball, gunzip and extract! + + if (tarPath) { + var input = fs.createReadStream(tarballUrl) + input.pipe(gunzip).pipe(extracter) + return + } + var req = download(tarballUrl) if (!req) return diff --git a/node_modules/node-gyp/lib/node-gyp.js b/node_modules/node-gyp/lib/node-gyp.js index 590263248..2ae08904b 100644 --- a/node_modules/node-gyp/lib/node-gyp.js +++ b/node_modules/node-gyp/lib/node-gyp.js @@ -95,6 +95,7 @@ proto.configDefs = { , loglevel: String // everywhere , python: String // 'configure' , 'dist-url': String // 'install' + , 'tarball': String // 'install' , jobs: String // 'build' , thin: String // 'configure' } diff --git a/node_modules/node-gyp/package.json b/node_modules/node-gyp/package.json index 4d0bc21de..ebad76dbb 100644 --- a/node_modules/node-gyp/package.json +++ b/node_modules/node-gyp/package.json @@ -10,7 +10,7 @@ "bindings", "gyp" ], - "version": "0.10.10", + "version": "0.11.0", "installVersion": 9, "author": { "name": "Nathan Rajlich", @@ -37,7 +37,7 @@ "osenv": "0", "request": "2", "rimraf": "2", - "semver": "~2.1", + "semver": "~2.2.1", "tar": "0", "which": "1" }, @@ -49,6 +49,11 @@ "bugs": { "url": "https://github.com/TooTallNate/node-gyp/issues" }, - "_id": "node-gyp@0.10.10", - "_from": "node-gyp@0.10.10" + "homepage": "https://github.com/TooTallNate/node-gyp", + "_id": "node-gyp@0.11.0", + "dist": { + "shasum": "e6745c3c68c40883c9ad42a5582295405cd3d81d" + }, + "_from": "node-gyp@latest", + "_resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-0.11.0.tgz" } |