Instead of hardcoding a specific VS install, try sequentially:
- %VSINSTALLDIR% (already set from a vs prompt)
- 2019/Enterprise
- 2019/Professional
- 2019/Community
- 2019/BuildTools
It stops when one is found and set vsdevcmd env var.
Differential D135173
Detect Visual Studio in Windows packaging script pbo-linaro on Oct 4 2022, 9:07 AM. Authored by
Details
Instead of hardcoding a specific VS install, try sequentially:
It stops when one is found and set vsdevcmd env var.
Diff Detail
Event TimelineComment Actions @hans Would that be possible for you to merge it again please? If that's annoying for you, I can request commit access (have at least 2 more patches coming for this script). Comment Actions Phabricator supports stacks. Up right you will find Edit Related Revisions... You could upload your whole list of patches,
Comment Actions Vswhere has a million options so I bet we can get it to find whatever we want. What I like about that approach is that it is not relying on hardcoded paths and it will work on any setup. I think if possible we should do this:
Comment Actions Sounds good. Could we drop the idea for --vs2022 option? |
I wonder if we should allow 2022 here as well. At least with a switch or something. LLVM should work with it and I don't see any reason for users to install 2019 just for this?