WIX_LZX_VERSION=35
WIX_LZX_FULL_VERSION=3.5.2519.0
# 26b1d2a5b582fcaa31ffaaf289711854897f91e8e5002bd8ddee2e69c95a60f53c6e3375d38fba4519ddd4a68bcf402c36eaef5a8faa6f3a4b8b2bc011e8f05a  wix3.5.2519.0.zip
# WIX_LZX_VERSION=36
# WIX_LZX_FULL_VERSION=3.6.3303.1
# WIX_LZX_FULL_VERSION=3.6.2221.0
# 0d5e44061d7d8f92dabf806893736f2c9a68db13e5b6540914f0f0a5299ae5a85abbd721d808c04052e27e82a126773b5bfcb6b929183180968a84985516ff98  wix3.6.3303.1.zip
# WIX_LZX_VERSION=37
# WIX_LZX_FULL_VERSION=3.7.1224.0
# d93a01321e04e923994c57576bfb8d7fb65e3024c03a2b1062a4a03fda7a4ce9ec7baab95f802a49e934672726f6b836f6cf8ea31077178319f5e147bbd59db1  wix3.7.1224.0.zip
# WIX_LZX_VERSION=38
# WIX_LZX_FULL_VERSION=3.8.1128.0
# b4170451b94fcc10486a8140d460092fddaab9b315043759b980e1ca67a84559ecb92706a552c05ee8de90711f5513926f393220a94155a70221547d72d9b72a  wix3.8.1128.0.zip
# WIX_LZX_VERSION=39
# WIX_LZX_FULL_VERSION=3.9.1208.0
# 057ebcf2d9310584b075951f224ca55aae9e83714f59f1aeb9abb78ac5c5db8e230d0d57e9c7170e942e3317c0bfdf5a57b0fc3d0cdde3a85fab3648f4a688d3  wix3.9.1208.0.zip
# WIX_LZX_VERSION=310
# WIX_LZX_FULL_VERSION=3.10.4.4718
# fab360f98fe1a1d1a25433e90b7fa11478835ef41356647cbd6b9ef9fc1bfc3d7323b40784b9d07fa5d18566462a399753ab0939353a58fa06b6f80788413007  wix3.10.4.4718.zip
# WIX_LZX_VERSION=311
# WIX_LZX_FULL_VERSION=3.11.2.4516
# 6fd961c85e1e6adafb99ef50c9659e3eb83c84ecaf49f523e556788845b206e1857aba2c39409405d4cda1df9b30a552ce5aab808be5f8368a37a447d78d1a05  wix3.11.2.4516.zip
# WIX_LZX_VERSION=314
# WIX_LZX_FULL_VERSION=3.14.0.6526
# 9ff09b4e6c612ca742c763740fb89d99211bf1d0eace84e3693cb503deb6a85bd28c3754c34772a3220bb0c1e92a3013e7d99bcf106ff1b835c0fdc6aba8bbc6  wix3.14.0.6526.zip
WIX_LZX_URL := https://wixtoolset.org/downloads/v$(WIX_LZX_FULL_VERSION)/wix$(WIX_LZX_VERSION)-binaries.zip

ifdef HAVE_WIN32
# this requires dotnet 4.0 to be installed when running wix
PKGS += wixlzx
endif

DEPS_wixlzx := wix $(DEPS_wix)

.sum-wixlzx: wix$(WIX_LZX_FULL_VERSION).zip

$(TARBALLS)/wix$(WIX_LZX_FULL_VERSION).zip:
	$(call download_pkg,$(WIX_LZX_URL),wixlzx)

wixlzx: UNZIP_PARAMS=-d wix$(WIX_LZX_FULL_VERSION)
wixlzx: wix$(WIX_LZX_FULL_VERSION).zip .sum-wixlzx
	$(UNPACK)
	$(MOVE)

.wixlzx: wixlzx
	install -d "$(PREFIX)/bin"
	# Overwrite newer DLLs with the ones that supports LZX compression in Wine
	install $</winterop.dll "$(PREFIX)/bin"
	touch $@
