Skip to content

Commit 00d42de

Browse files
fix: Try alternative windows build method
1 parent 327fded commit 00d42de

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

Makefile

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,12 @@ define macos_build
4949
endef
5050

5151
define windows_build
52-
VSWHERE := $(shell where vswhere.exe)
53-
MSBUILD := $(shell \
54-
$(VSWHERE) -latest -requires Microsoft.Component.MSBuild -find MSBuild\**\Bin\MSBuild.exe | sort -r | head -n 1 \
55-
)
56-
ifeq ($(MSBUILD),)
57-
$(error MSBuild not found. Please ensure Visual Studio or Build Tools are installed.)
52+
VSWHERE := "C:\ProgramData\Chocolatey\bin\vswhere.exe"
53+
VS_PATH := $(shell $(VSWHERE) -products * -requires Microsoft.Component.MSBuild -property installationPath -latest)
54+
ifeq ($(VS_PATH),)
55+
$(error Could not find Visual Studio installation)
5856
endif
57+
MSBUILD := "$(VS_PATH)\MSBuild\Current\Bin\MSBuild.exe"
5958
$(eval ARCH := $(1))
6059
$(eval BUILD_PATH := $(BUILD_DIR)/windows-$(ARCH)$(2))
6160
$(eval EXTRA_FLAGS := $(3))

0 commit comments

Comments
 (0)