modif comtabilite

This commit is contained in:
2019-01-16 16:23:31 +01:00
parent 6b741a9666
commit 9312edc3ae
1844 changed files with 158848 additions and 55874 deletions
+3 -1
View File
@@ -232,7 +232,9 @@ namespace VisualStudioConfiguration
string[] parts = id.Substring(Win10SDKPrefix.Length).Split('.');
if (parts.Length > 1 && parts[1] != "Desktop")
continue;
Win10SDKVer = Math.Max(Win10SDKVer, UInt32.Parse(parts[0]));
uint foundSdkVer;
if (UInt32.TryParse(parts[0], out foundSdkVer))
Win10SDKVer = Math.Max(Win10SDKVer, foundSdkVer);
} else if (id == "Microsoft.VisualStudio.Component.Windows81SDK")
hasWin8SDK = true;
else
+4
View File
@@ -23,6 +23,10 @@ function build (gyp, argv, callback) {
platformMake = 'gmake'
} else if (process.platform.indexOf('bsd') !== -1) {
platformMake = 'gmake'
} else if (win && argv.length > 0) {
argv = argv.map(function(target) {
return '/t:' + target
})
}
var release = processRelease(argv, gyp, process.version, process.release)
+28 -27
View File
@@ -72,8 +72,10 @@ function configure (gyp, argv, callback) {
return callback(new Error('Invalid version number: ' + release.version))
}
// ensure that the target node version's dev files are installed
gyp.opts.ensure = true
// If the tarball option is set, always remove and reinstall the headers
// into devdir. Otherwise only install if they're not already there.
gyp.opts.ensure = gyp.opts.tarball ? false : true
gyp.commands.install([ release.version ], function (err, version) {
if (err) return callback(err)
log.verbose('get node dir', 'target node version installed:', release.versionDir)
@@ -242,28 +244,35 @@ function configure (gyp, argv, callback) {
argv.push('-I', config)
})
// for AIX we need to set up the path to the exp file
// which contains the symbols needed for linking.
// The file will either be in one of the following
// depending on whether it is an installed or
// development environment:
// - the include/node directory
// - the out/Release directory
// - the out/Debug directory
// - the root directory
// For AIX and z/OS we need to set up the path to the exports file
// which contains the symbols needed for linking.
var node_exp_file = undefined
if (process.platform === 'aix') {
if (process.platform === 'aix' || process.platform === 'os390') {
var ext = process.platform === 'aix' ? 'exp' : 'x'
var node_root_dir = findNodeDirectory()
var candidates = ['include/node/node.exp',
'out/Release/node.exp',
'out/Debug/node.exp',
'node.exp']
var candidates = undefined
if (process.platform === 'aix') {
candidates = ['include/node/node',
'out/Release/node',
'out/Debug/node',
'node'
].map(function(file) {
return file + '.' + ext
})
} else {
candidates = ['out/Release/obj.target/libnode',
'out/Debug/obj.target/libnode',
'lib/libnode'
].map(function(file) {
return file + '.' + ext
})
}
var logprefix = 'find exports file'
node_exp_file = findAccessibleSync(logprefix, node_root_dir, candidates)
if (node_exp_file !== undefined) {
log.verbose(logprefix, 'Found exports file: %s', node_exp_file)
} else {
var msg = msgFormat('Could not find node.exp file in %s', node_root_dir)
var msg = msgFormat('Could not find node.%s file in %s', ext, node_root_dir)
log.error(logprefix, 'Could not find exports file')
return callback(new Error(msg))
}
@@ -292,7 +301,7 @@ function configure (gyp, argv, callback) {
argv.push('-Dlibrary=shared_library')
argv.push('-Dvisibility=default')
argv.push('-Dnode_root_dir=' + nodeDir)
if (process.platform === 'aix') {
if (process.platform === 'aix' || process.platform === 'os390') {
argv.push('-Dnode_exp_file=' + node_exp_file)
}
argv.push('-Dnode_gyp_dir=' + nodeGypDir)
@@ -439,7 +448,7 @@ PythonFinder.prototype = {
},
checkPythonVersion: function checkPythonVersion () {
var args = ['-c', 'import platform; print(platform.python_version());']
var args = ['-c', 'import sys; print "%s.%s.%s" % sys.version_info[:3];']
var env = extend({}, this.env)
env.TERM = 'dumb'
@@ -451,14 +460,6 @@ PythonFinder.prototype = {
'`%s -c "' + args[1] + '"` returned: %j',
this.python, stdout)
var version = stdout.trim()
if (~version.indexOf('+')) {
this.log.silly('stripping "+" sign(s) from version')
version = version.replace(/\+/g, '')
}
if (~version.indexOf('rc')) {
this.log.silly('stripping "rc" identifier from version')
version = version.replace(/rc(.*)$/ig, '')
}
var range = semver.Range('>=2.5.0 <3.0.0')
var valid = false
try {
+3 -3
View File
@@ -6,9 +6,9 @@ function findVS2017(callback) {
var ps = path.join(process.env.SystemRoot, 'System32', 'WindowsPowerShell',
'v1.0', 'powershell.exe')
var csFile = path.join(__dirname, 'Find-VS2017.cs')
var psArgs = ['-ExecutionPolicy', 'Unrestricted', '-Command',
'&{Add-Type -Path \'' + csFile +
'\'; [VisualStudioConfiguration.Main]::Query()}']
var psArgs = ['-ExecutionPolicy', 'Unrestricted', '-NoProfile',
'-Command', '&{Add-Type -Path \'' + csFile + '\';' +
'[VisualStudioConfiguration.Main]::Query()}']
log.silly('find vs2017', 'Running', ps, psArgs)
var child = execFile(ps, psArgs, { encoding: 'utf8' },
+17 -11
View File
@@ -1,7 +1,12 @@
module.exports = exports = function (gyp, argv, callback) {
return install(fs, gyp, argv, callback)
}
module.exports = exports = install
module.exports.test = { download: download, readCAFile: readCAFile }
module.exports.test = {
download: download,
install: install,
readCAFile: readCAFile,
}
exports.usage = 'Install node development files for the specified node version.'
@@ -20,12 +25,11 @@ var fs = require('graceful-fs')
, semver = require('semver')
, fstream = require('fstream')
, request = require('request')
, minimatch = require('minimatch')
, mkdir = require('mkdirp')
, processRelease = require('./process-release')
, win = process.platform == 'win32'
function install (gyp, argv, callback) {
function install (fs, gyp, argv, callback) {
var release = processRelease(argv, gyp, process.version, process.release)
@@ -84,7 +88,7 @@ function install (gyp, argv, callback) {
log.verbose('install', 'version not already installed, continuing with install', release.version)
go()
} else if (err.code == 'EACCES') {
eaccesFallback()
eaccesFallback(err)
} else {
cb(err)
}
@@ -129,7 +133,7 @@ function install (gyp, argv, callback) {
mkdir(devDir, function (err, created) {
if (err) {
if (err.code == 'EACCES') {
eaccesFallback()
eaccesFallback(err)
} else {
cb(err)
}
@@ -396,8 +400,8 @@ function install (gyp, argv, callback) {
function valid (file) {
// header files
return minimatch(file, '*.h', { matchBase: true }) ||
minimatch(file, '*.gypi', { matchBase: true })
var extname = path.extname(file);
return extname === '.h' || extname === '.gypi';
}
/**
@@ -409,7 +413,9 @@ function install (gyp, argv, callback) {
* the compilation will succeed...
*/
function eaccesFallback () {
function eaccesFallback (err) {
var noretry = '--node_gyp_internal_noretry'
if (-1 !== argv.indexOf(noretry)) return cb(err)
var tmpdir = osenv.tmpdir()
gyp.devDir = path.resolve(tmpdir, '.node-gyp')
log.warn('EACCES', 'user "%s" does not have permission to access the dev dir "%s"', osenv.user(), devDir)
@@ -418,7 +424,7 @@ function install (gyp, argv, callback) {
log.verbose('tmpdir == cwd', 'automatically will remove dev files after to save disk space')
gyp.todo.push({ name: 'remove', args: argv })
}
gyp.commands.install(argv, cb)
gyp.commands.install([noretry].concat(argv), cb)
}
}