summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/node-gyp/lib
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/node-gyp/lib')
-rw-r--r--deps/npm/node_modules/node-gyp/lib/Find-VS2017.cs9
-rw-r--r--deps/npm/node_modules/node-gyp/lib/build.js33
-rw-r--r--deps/npm/node_modules/node-gyp/lib/configure.js8
-rw-r--r--deps/npm/node_modules/node-gyp/lib/process-release.js2
4 files changed, 15 insertions, 37 deletions
diff --git a/deps/npm/node_modules/node-gyp/lib/Find-VS2017.cs b/deps/npm/node_modules/node-gyp/lib/Find-VS2017.cs
index a41a354f61..87e0a9c9bb 100644
--- a/deps/npm/node_modules/node-gyp/lib/Find-VS2017.cs
+++ b/deps/npm/node_modules/node-gyp/lib/Find-VS2017.cs
@@ -228,9 +228,12 @@ namespace VisualStudioConfiguration
hasMSBuild = true;
else if (id == "Microsoft.VisualStudio.Component.VC.Tools.x86.x64")
hasVCTools = true;
- else if (id.StartsWith(Win10SDKPrefix))
- Win10SDKVer = Math.Max(Win10SDKVer, UInt32.Parse(id.Substring(Win10SDKPrefix.Length)));
- else if (id == "Microsoft.VisualStudio.Component.Windows81SDK")
+ else if (id.StartsWith(Win10SDKPrefix)) {
+ string[] parts = id.Substring(Win10SDKPrefix.Length).Split('.');
+ if (parts.Length > 1 && parts[1] != "Desktop")
+ continue;
+ Win10SDKVer = Math.Max(Win10SDKVer, UInt32.Parse(parts[0]));
+ } else if (id == "Microsoft.VisualStudio.Component.Windows81SDK")
hasWin8SDK = true;
else
continue;
diff --git a/deps/npm/node_modules/node-gyp/lib/build.js b/deps/npm/node_modules/node-gyp/lib/build.js
index 5253109857..0445fb6452 100644
--- a/deps/npm/node_modules/node-gyp/lib/build.js
+++ b/deps/npm/node_modules/node-gyp/lib/build.js
@@ -11,7 +11,6 @@ var fs = require('graceful-fs')
, glob = require('glob')
, log = require('npmlog')
, which = require('which')
- , mkdirp = require('mkdirp')
, exec = require('child_process').exec
, processRelease = require('./process-release')
, win = process.platform === 'win32'
@@ -36,7 +35,6 @@ function build (gyp, argv, callback) {
, config
, arch
, nodeDir
- , copyDevLib
loadConfigGypi()
@@ -60,7 +58,6 @@ function build (gyp, argv, callback) {
buildType = config.target_defaults.default_configuration
arch = config.variables.target_arch
nodeDir = config.variables.nodedir
- copyDevLib = config.variables.copy_dev_lib == 'true'
if ('debug' in gyp.opts) {
buildType = gyp.opts.debug ? 'Debug' : 'Release'
@@ -115,7 +112,7 @@ function build (gyp, argv, callback) {
return
}
log.verbose('`which` succeeded for `' + command + '`', execPath)
- copyNodeLib()
+ doBuild()
})
}
@@ -127,7 +124,7 @@ function build (gyp, argv, callback) {
if (config.variables.msbuild_path) {
command = config.variables.msbuild_path
log.verbose('using MSBuild:', command)
- copyNodeLib()
+ doBuild()
return
}
@@ -180,36 +177,12 @@ function build (gyp, argv, callback) {
return
}
command = msbuildPath
- copyNodeLib()
+ doBuild()
})
})()
})
}
- /**
- * Copies the node.lib file for the current target architecture into the
- * current proper dev dir location.
- */
-
- function copyNodeLib () {
- if (!win || !copyDevLib) return doBuild()
-
- var buildDir = path.resolve(nodeDir, buildType)
- , archNodeLibPath = path.resolve(nodeDir, arch, release.name + '.lib')
- , buildNodeLibPath = path.resolve(buildDir, release.name + '.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 "' + release.name + '.lib" for ' + arch, buildNodeLibPath)
- rs.pipe(ws)
- rs.on('error', callback)
- ws.on('error', callback)
- rs.on('end', doBuild)
- })
- }
/**
* Actually spawn the process and compile the module.
diff --git a/deps/npm/node_modules/node-gyp/lib/configure.js b/deps/npm/node_modules/node-gyp/lib/configure.js
index 4bad1bffd1..1351576d12 100644
--- a/deps/npm/node_modules/node-gyp/lib/configure.js
+++ b/deps/npm/node_modules/node-gyp/lib/configure.js
@@ -144,9 +144,6 @@ function configure (gyp, argv, callback) {
// set the node development directory
variables.nodedir = nodeDir
- // don't copy dev libraries with nodedir option
- variables.copy_dev_lib = !gyp.opts.nodedir
-
// disable -T "thin" static archives by default
variables.standalone_static_library = gyp.opts.thin ? 0 : 1
@@ -286,6 +283,9 @@ function configure (gyp, argv, callback) {
output_dir = buildDir
}
var nodeGypDir = path.resolve(__dirname, '..')
+ var nodeLibFile = path.join(nodeDir,
+ !gyp.opts.nodedir ? '<(target_arch)' : '$(Configuration)',
+ release.name + '.lib')
argv.push('-I', addon_gypi)
argv.push('-I', common_gypi)
@@ -296,7 +296,7 @@ function configure (gyp, argv, callback) {
argv.push('-Dnode_exp_file=' + node_exp_file)
}
argv.push('-Dnode_gyp_dir=' + nodeGypDir)
- argv.push('-Dnode_lib_file=' + release.name + '.lib')
+ argv.push('-Dnode_lib_file=' + nodeLibFile)
argv.push('-Dmodule_root_dir=' + process.cwd())
argv.push('-Dnode_engine=' +
(gyp.opts.node_engine || process.jsEngine || 'v8'))
diff --git a/deps/npm/node_modules/node-gyp/lib/process-release.js b/deps/npm/node_modules/node-gyp/lib/process-release.js
index 89eaf9be36..0d177f1c93 100644
--- a/deps/npm/node_modules/node-gyp/lib/process-release.js
+++ b/deps/npm/node_modules/node-gyp/lib/process-release.js
@@ -74,6 +74,8 @@ function processRelease (argv, gyp, defaultVersion, defaultRelease) {
}
}
+ if (overrideDistUrl)
+ log.verbose('download', 'using dist-url', overrideDistUrl)
if (overrideDistUrl)
distBaseUrl = overrideDistUrl.replace(/\/+$/, '')