Fallback to VC registry detection
This commit is contained in:
@@ -596,23 +596,24 @@ module.exports.getMissingDependencies = dependencies => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const Registry = require('winreg');
|
const Registry = require('winreg');
|
||||||
const checkRegistry = (dep, index, legacyRuntimeDetection) => {
|
const checkRegistry = (dep, index) => {
|
||||||
if (index >= dep.registry.length) {
|
if (index >= dep.registry.length) {
|
||||||
missing.push(dep);
|
if (dep.display === 'VC Runtime 2015-2019') {
|
||||||
resolveIfComplete();
|
|
||||||
} else {
|
|
||||||
if (!legacyRuntimeDetection && (dep.display === 'VC Runtime 2015-2019')) {
|
|
||||||
_vcRuntimeExists()
|
_vcRuntimeExists()
|
||||||
.then(exists => {
|
.then(exists => {
|
||||||
if (exists) {
|
if (!exists) {
|
||||||
resolveIfComplete();
|
missing.push(dep);
|
||||||
} else {
|
|
||||||
checkRegistry(dep, 0, true);
|
|
||||||
}
|
}
|
||||||
|
resolveIfComplete();
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
checkRegistry(dep, 0, true);
|
missing.push(dep);
|
||||||
|
resolveIfComplete();
|
||||||
})
|
})
|
||||||
|
} else {
|
||||||
|
missing.push(dep);
|
||||||
|
resolveIfComplete();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
let hive = null;
|
let hive = null;
|
||||||
const hiveName = dep.registry[index].split('\\')[0];
|
const hiveName = dep.registry[index].split('\\')[0];
|
||||||
@@ -655,7 +656,6 @@ module.exports.getMissingDependencies = dependencies => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
for (const dependency of dependencies) {
|
for (const dependency of dependencies) {
|
||||||
|
|||||||
Reference in New Issue
Block a user