Search for Visual Studio Express when activating VS env

Visual Studio Express does not come with the
'Microsoft.VisualStudio.Component.VC.Tools.x86.x64' workload.
This adds a check for the 'Microsoft.VisualStudio.Workload.WDExpress'
workload. Non-express versions take precedence over express versions
when activating.
pull/10112/head
DFOVIT 3 years ago committed by Nirbheek Chauhan
parent 7b31505304
commit 3506248450
  1. 4
      mesonbuild/mesonlib/vsenv.py

@ -56,6 +56,7 @@ def _setup_vsenv(force: bool) -> bool:
'-prerelease',
'-requiresAny',
'-requires', 'Microsoft.VisualStudio.Component.VC.Tools.x86.x64',
'-requires', 'Microsoft.VisualStudio.Workload.WDExpress',
'-products', '*',
'-utf8',
'-format',
@ -71,6 +72,9 @@ def _setup_vsenv(force: bool) -> bool:
bat_path = bat_root / 'VC/Auxiliary/Build/vcvarsx86_arm64.bat'
else:
bat_path = bat_root / 'VC/Auxiliary/Build/vcvars64.bat'
# if VS is not found try VS Express
if not bat_path.exists():
bat_path = bat_root / 'VC/Auxiliary/Build/vcvarsx86_amd64.bat'
if not bat_path.exists():
raise MesonException(f'Could not find {bat_path}')

Loading…
Cancel
Save