From 387167b07ca58900127f41ccbfb71e934c34d834 Mon Sep 17 00:00:00 2001 From: Carl Perry Date: Sat, 11 Jun 2022 02:42:24 +0000 Subject: [PATCH 1/2] Add ARM64 support for finding the VC Compiler Tools --- lib/find-visualstudio.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/find-visualstudio.js b/lib/find-visualstudio.js index 64af7be346..e1c97c3d5f 100644 --- a/lib/find-visualstudio.js +++ b/lib/find-visualstudio.js @@ -288,11 +288,15 @@ VisualStudioFinder.prototype = { // Helper - process toolset information getToolset: function getToolset (info, versionYear) { - const pkg = 'Microsoft.VisualStudio.Component.VC.Tools.x86.x64' + if (process.arch === 'amd64') { + const pkg = 'Microsoft.VisualStudio.Component.VC.Tools.ARM64' + } else { + const pkg = 'Microsoft.VisualStudio.Component.VC.Tools.x86.x64' + } const express = 'Microsoft.VisualStudio.WDExpress' if (info.packages.indexOf(pkg) !== -1) { - this.log.silly('- found VC.Tools.x86.x64') + this.log.silly('- found VC.Tools') } else if (info.packages.indexOf(express) !== -1) { this.log.silly('- found Visual Studio Express (looking for toolset)') } else { From f4ee5f892db997701cdd06eded5db8d584c45257 Mon Sep 17 00:00:00 2001 From: Carl Perry Date: Sat, 11 Jun 2022 02:42:24 +0000 Subject: [PATCH 2/2] Add ARM64 support for finding the VC Compiler Tools --- lib/find-visualstudio.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/find-visualstudio.js b/lib/find-visualstudio.js index 64af7be346..6dbc4cc684 100644 --- a/lib/find-visualstudio.js +++ b/lib/find-visualstudio.js @@ -288,11 +288,18 @@ VisualStudioFinder.prototype = { // Helper - process toolset information getToolset: function getToolset (info, versionYear) { - const pkg = 'Microsoft.VisualStudio.Component.VC.Tools.x86.x64' + var pkg + if (process.arch === 'arm64') { + this.addLog('- Looking for ARM64 Tools') + pkg = 'Microsoft.VisualStudio.Component.VC.Tools.ARM64' + } else { + this.addLog('- Looking for x86.x64 Tools') + pkg = 'Microsoft.VisualStudio.Component.VC.Tools.x86.x64' + } const express = 'Microsoft.VisualStudio.WDExpress' if (info.packages.indexOf(pkg) !== -1) { - this.log.silly('- found VC.Tools.x86.x64') + this.log.silly('- found VC.Tools') } else if (info.packages.indexOf(express) !== -1) { this.log.silly('- found Visual Studio Express (looking for toolset)') } else {