conda-forge / vc-feedstock

A conda-smithy repository for vc.
BSD 3-Clause "New" or "Revised" License
4 stars 22 forks source link

Switch to `vswhere.exe`? #52

Closed wolfv closed 1 year ago

wolfv commented 1 year ago

Comment:

The configuration is currently hardcoding a bunch of Visual Studio version numbers and I think sometimes they might not even match up (anymore) with the CI.

I wonder if fully relying on vswhere would be better? We have a build of it in conda-forge, and it can produce easy to consume output. For example to ask for MSVC 2019 one could use (version syntax is [lower,upper] to find any version of the 16->17 range):

C:\Users\robostack>"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -version [16,17]
Visual Studio Locator version 3.0.3+45247720e1 [query version 3.4.1128.26111]
Copyright (C) Microsoft Corporation. All rights reserved.

instanceId: a240d692
installDate: 10/10/2020 5:08:27 PM
installationName: VisualStudio/16.11.22+33130.400
installationPath: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
installationVersion: 16.11.33130.400
productId: Microsoft.VisualStudio.Product.Community
productPath: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\devenv.exe
state: 4294967295
isComplete: 1
isLaunchable: 1
isPrerelease: 0
isRebootRequired: 0
displayName: Visual Studio Community 2019
description: Powerful IDE, free for students, open-source contributors, and individuals
channelId: VisualStudio.16.Release
channelUri: https://aka.ms/vs/16/release/channel
enginePath: C:\Program Files (x86)\Microsoft Visual Studio\Installer\resources\app\ServiceHub\Services\Microsoft.VisualStudio.Setup.Service
releaseNotes: https://docs.microsoft.com/en-us/visualstudio/releases/2019/release-notes-v16.11#16.11.22
thirdPartyNotices: https://go.microsoft.com/fwlink/?LinkId=660909
updateDate: 2023-01-02T15:46:47.5070005Z
catalog_buildBranch: d16.11
catalog_buildVersion: 16.11.33130.400
catalog_id: VisualStudio/16.11.22+33130.400
catalog_localBuild: build-lab
catalog_manifestName: VisualStudio
catalog_manifestType: installer
catalog_productDisplayVersion: 16.11.22
catalog_productLine: Dev16
catalog_productLineVersion: 2019
catalog_productMilestone: RTW
catalog_productMilestoneIsPreRelease: False
catalog_productName: Visual Studio
catalog_productPatchVersion: 22
catalog_productPreReleaseMilestoneSuffix: 1.0
catalog_productSemanticVersion: 16.11.22+33130.400
catalog_requiredEngineVersion: 2.11.69.53063
properties_campaignId: 98621768.1602356809
properties_channelManifestId: VisualStudio.16.Release/16.11.22+33130.400
properties_nickname:
properties_setupEngineFilePath: C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installershell.exe
isuruf commented 1 year ago

No. See my comment at https://github.com/conda-forge/vc-feedstock/issues/36#issuecomment-860931411

wolfv commented 1 year ago

Thanks for the speedy reply.

If you have a chance to review #51 that'd be awesome :)