From e2a6c7b99081a2c7fc50b9c2bf1432628df3b8f1 Mon Sep 17 00:00:00 2001 From: Raul Metsma Date: Tue, 3 Dec 2024 23:48:45 +0200 Subject: [PATCH] Build Wix 5 CustomAction Signed-off-by: Raul Metsma --- .appveyor.yml | 2 ++ .github/workflows/windows.yml | 3 +++ win32/Make.rules.mak | 16 +++++++++++++--- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index f9efae8ca3..89af874d46 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -65,6 +65,8 @@ install: - dotnet tool install -g --version 5.0.2 wix - wix extension add -g WixToolset.UI.wixext/5.0.2 - wix extension add -g WixToolset.Util.wixext/5.0.2 + - cd win32 && dotnet new console --force --name CustomAction + - cd win32 && dotnet add CustomAction package WixToolset.WcaUtil --version 5.0.2 --package-directory packages build_script: - ps: >- diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 67d29e909b..4260331f45 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -73,6 +73,9 @@ jobs: dotnet tool install -g --version 5.0.2 wix wix extension add -g WixToolset.UI.wixext/5.0.2 wix extension add -g WixToolset.Util.wixext/5.0.2 + cd win32 + dotnet new console --force --name CustomAction + dotnet add CustomAction package WixToolset.WcaUtil --version 5.0.2 --package-directory packages - name: Restore Cache if: matrix.configuration == 'Release' uses: actions/cache@v4 diff --git a/win32/Make.rules.mak b/win32/Make.rules.mak index 5dae7c4add..50cd446935 100644 --- a/win32/Make.rules.mak +++ b/win32/Make.rules.mak @@ -3,9 +3,19 @@ OPENSC_FEATURES = pcsc #Include support for minidriver MINIDRIVER_DEF = /DENABLE_MINIDRIVER -#Build MSI with the Windows Installer XML (WIX) toolkit, requires WIX >= 3.14 -WIX_INCL_DIR = "/I$(WIX)\SDK\VS2017\inc" -WIX_LIBS = "$(WIX)\SDK\VS2017\lib\$(PLATFORM)\dutil.lib" "$(WIX)\SDK\VS2017\lib\$(PLATFORM)\wcautil.lib" +#Build MSI with the Windows Installer XML (WIX) toolkit +#dotnet tool install -g --version 5.0.2 wix +#wix extension add -g WixToolset.UI.wixext/5.0.2 +#wix extension add -g WixToolset.Util.wixext/5.0.2 +#dotnet new console --force --name CustomAction +#dotnet add CustomAction package WixToolset.WcaUtil --version 5.0.2 --package-directory packages +!IF "$(WIX_PACKAGES)" == "" +WIX_PACKAGES = $(TOPDIR)\win32\packages +!ENDIF +WIX_INCL_DIR = "/I$(WIX_PACKAGES)/wixtoolset.dutil/5.0.2/build/native/include" \ + "/I$(WIX_PACKAGES)/wixtoolset.wcautil/5.0.2/build/native/include" +WIX_LIBS = "$(WIX_PACKAGES)/wixtoolset.dutil/5.0.2/build/native/v14/$(PLATFORM)/dutil.lib" \ + "$(WIX_PACKAGES)/wixtoolset.wcautil/5.0.2/build/native/v14/$(PLATFORM)/wcautil.lib" # We do not build tests on windows #TESTS_DEF = /DENABLE_TESTS