Skip to content

Commit 26dd1e1

Browse files
committed
Convert to WIX 5
WE2-881 Signed-off-by: Raul Metsma <raul@metsma.ee>
1 parent c0e11e1 commit 26dd1e1

File tree

6 files changed

+45
-71
lines changed

6 files changed

+45
-71
lines changed

.github/workflows/cmake-windows.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ jobs:
3737

3838
- name: Install WiX
3939
run: |
40-
dotnet tool install --global wix --version 4.0.5
41-
wix extension -g add WixToolset.UI.wixext/4.0.5
42-
wix extension -g add WixToolset.Util.wixext/4.0.5
43-
wix extension -g add WixToolset.Bal.wixext/4.0.5
40+
dotnet tool install --global wix --version 5.0.0
41+
wix extension -g add WixToolset.UI.wixext/5.0.0
42+
wix extension -g add WixToolset.Util.wixext/5.0.0
43+
wix extension -g add WixToolset.Bal.wixext/5.0.0
4444
4545
- name: Configure
4646
run: |

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -269,10 +269,10 @@ https://github.com/mrts/docker-qt-cmake-gtest-valgrind-ubuntu/blob/master/Docker
269269
- Download Visual Studio 2019 community installer from https://visualstudio.microsoft.com/ and install _Desktop C++ Development_
270270
- Install WIX toolset
271271

272-
dotnet tool install --global wix --version 4.0.5
273-
wix extension -g add WixToolset.UI.wixext/4.0.5
274-
wix extension -g add WixToolset.Util.wixext/4.0.5
275-
wix extension -g add WixToolset.Bal.wixext/4.0.5
272+
dotnet tool install --global wix --version 5.0.0
273+
wix extension -g add WixToolset.UI.wixext/5.0.0
274+
wix extension -g add WixToolset.Util.wixext/5.0.0
275+
wix extension -g add WixToolset.Bal.wixext/5.0.0
276276

277277
- Download and install Git for Windows from https://git-scm.com/download/win
278278
- Download and install CMake from https://cmake.org/download/
@@ -288,7 +288,7 @@ https://github.com/mrts/docker-qt-cmake-gtest-valgrind-ubuntu/blob/master/Docker
288288
.\vcpkg install --recurse --triplet x64-windows --clean-after-build gtest openssl
289289

290290
- Install _Qt_ with the official [_Qt Online Installer_](https://www.qt.io/download-qt-installer),
291-
choose _Custom installation > Qt 6.2.4 > MSVC 2019 64-bit_.
291+
choose _Custom installation > Qt 6.6.3 > MSVC 2019 64-bit_.
292292

293293
### macOS
294294

install/WixUI_Minimal.wxs

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Patch dialog sequence:
5656
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg" Order="2" Condition="Installed AND PATCH" />
5757

5858
<InstallUISequence>
59-
<Show Dialog="WelcomeDlg" Before="WelcomeDlg2" Condition="Installed AND PATCH" />
59+
<Show Dialog="override WelcomeDlg" Before="WelcomeDlg2" Condition="Installed AND PATCH" />
6060
</InstallUISequence>
6161

6262
<Property Id="ARPNOMODIFY" Value="1" />

install/plugins.wxs

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
<Chain>
3737
<MsiPackage Id="WebEID" InstallCondition="VersionNT64" ForcePerMachine="yes"
3838
SourceFile="$(var.webeid).qt.msi" Compressed="yes">
39-
<MsiProperty Name="APPLICATIONFOLDER" Value="[ProgramFiles64Folder]Web eID" />
39+
<MsiProperty Name="INSTALLFOLDER" Value="[ProgramFiles64Folder]Web eID" />
4040
<MsiProperty Name="CHROMEINSTALL" Value="[ChromeSupport]" />
4141
<MsiProperty Name="CHROMEPOLICY" Value="[ForceChromeExtensionActivation]" />
4242
<MsiProperty Name="EDGEINSTALL" Value="[EdgeSupport]" />

install/web-eid.wxs

+30-59
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
<MediaTemplate EmbedCab="yes" CompressionLevel="high" />
2929
<Icon Id="web_eid.exe" SourceFile="$(var.app_path)" />
3030
<Property Id="ARPPRODUCTICON" Value="web_eid.exe" />
31-
<Property Id="APPLICATIONNAME" Value="web-eid" />
3231
<Property Id="CHROMEINSTALL" Value="1" />
3332
<Property Id="CHROMEPOLICY" Value="0" />
3433
<Property Id="EDGEINSTALL" Value="1" />
@@ -70,29 +69,39 @@
7069
</InstallExecuteSequence>
7170

7271
<StandardDirectory Id="ProgramFiles6432Folder">
73-
<Directory Id="APPLICATIONFOLDER" Name="Web eID">
74-
<Component Id="Application" Guid="9b61583c-308f-435d-b221-c2f250271c7c">
75-
<File Source="$(var.app_path)" KeyPath="yes" />
72+
<Directory Id="INSTALLFOLDER" Name="Web eID">
73+
<File Source="$(var.app_path)" />
7674
<?ifdef var.qt_path ?>
77-
<File Source="$(var.VCPATH)\msvcp140$(var.qt_suffix).dll" />
78-
<File Source="$(var.VCPATH)\vcruntime140$(var.qt_suffix).dll" />
79-
<?if $(sys.BUILDARCH) = x64 ?>
80-
<File Source="$(var.VCPATH)\vcruntime140_1$(var.qt_suffix).dll" />
81-
<File Source="$(var.VCPATH)\msvcp140_1$(var.qt_suffix).dll" />
82-
<File Source="$(var.VCPATH)\msvcp140_2$(var.qt_suffix).dll" />
75+
<File Source="$(var.VCPATH)\msvcp140$(var.qt_suffix).dll" />
76+
<File Source="$(var.VCPATH)\msvcp140_1$(var.qt_suffix).dll" />
77+
<File Source="$(var.VCPATH)\msvcp140_2$(var.qt_suffix).dll" />
78+
<File Source="$(var.VCPATH)\vcruntime140$(var.qt_suffix).dll" />
79+
<?if $(sys.BUILDARCH) != x86 ?>
80+
<File Source="$(var.VCPATH)\vcruntime140_1$(var.qt_suffix).dll" />
8381
<?endif?>
84-
<File Source="$(var.ssl_path)\libcrypto-3$(var.ssl_suffix).dll" />
85-
<File Source="$(var.ssl_path)\libssl-3$(var.ssl_suffix).dll" />
86-
<File Source="$(var.qt_path)\Qt6Core$(var.qt_suffix).dll" />
87-
<File Source="$(var.qt_path)\Qt6Gui$(var.qt_suffix).dll" />
88-
<File Source="$(var.qt_path)\Qt6Network$(var.qt_suffix).dll" />
89-
<File Source="$(var.qt_path)\Qt6Svg$(var.qt_suffix).dll" />
90-
<File Source="$(var.qt_path)\Qt6Widgets$(var.qt_suffix).dll" />
91-
<File Source="$(var.qt_path)\D3DCompiler_47.dll" />
92-
<File Source="$(var.qt_path)\opengl32sw.dll" />
93-
<File Source="$(var.qt_path)\Qt6SvgWidgets$(var.qt_suffix).dll" />
82+
<File Source="$(var.ssl_path)\libcrypto-3$(var.ssl_suffix).dll" />
83+
<File Source="$(var.ssl_path)\libssl-3$(var.ssl_suffix).dll" />
84+
<File Source="$(var.qt_path)\Qt6Core$(var.qt_suffix).dll" />
85+
<File Source="$(var.qt_path)\Qt6Gui$(var.qt_suffix).dll" />
86+
<File Source="$(var.qt_path)\Qt6Network$(var.qt_suffix).dll" />
87+
<File Source="$(var.qt_path)\Qt6Svg$(var.qt_suffix).dll" />
88+
<File Source="$(var.qt_path)\Qt6Widgets$(var.qt_suffix).dll" />
89+
<File Source="$(var.qt_path)\D3DCompiler_47.dll" />
90+
<File Source="$(var.qt_path)\opengl32sw.dll" />
91+
<File Source="$(var.qt_path)\Qt6SvgWidgets$(var.qt_suffix).dll" />
92+
<Directory Id="platforms" Name="platforms">
93+
<File Source="$(var.qt_path)\..\plugins\platforms\qwindows$(var.qt_suffix).dll" />
94+
</Directory>
95+
<Directory Id="styles" Name="styles">
96+
<File Source="$(var.qt_path)\..\plugins\styles\qwindowsvistastyle$(var.qt_suffix).dll" />
97+
</Directory>
98+
<Directory Id="imageformats" Name="imageformats">
99+
<File Source="$(var.qt_path)\..\plugins\imageformats\qsvg$(var.qt_suffix).dll" />
100+
</Directory>
101+
<Directory Id="tls" Name="tls">
102+
<File Source="$(var.qt_path)\..\plugins\tls\qopensslbackend$(var.qt_suffix).dll" />
103+
</Directory>
94104
<?endif?>
95-
</Component>
96105
<Component Id="ChromeEdge" Transitive="yes" Condition="(CHROMEINSTALL = 1 OR EDGEINSTALL = 1)">
97106
<File Source="$(var.json)" />
98107
<RegistryValue Root="HKLM" Type="string" Value="[APPLICATIONFOLDER]eu.webeid.json"
@@ -103,28 +112,6 @@
103112
<RegistryValue Root="HKLM" Type="string" Value="[APPLICATIONFOLDER]eu.webeid.firefox.json"
104113
Key="SOFTWARE\Mozilla\NativeMessagingHosts\eu.webeid" />
105114
</Component>
106-
<?ifdef var.qt_path ?>
107-
<Directory Id="platforms" Name="platforms">
108-
<Component Id="qwindows.dll">
109-
<File Source="$(var.qt_path)\..\plugins\platforms\qwindows$(var.qt_suffix).dll" />
110-
</Component>
111-
</Directory>
112-
<Directory Id="styles" Name="styles">
113-
<Component Id="qwindowsvistastyle.dll">
114-
<File Source="$(var.qt_path)\..\plugins\styles\qwindowsvistastyle$(var.qt_suffix).dll" />
115-
</Component>
116-
</Directory>
117-
<Directory Id="imageformats" Name="imageformats">
118-
<Component Id="imageformats.dll">
119-
<File Source="$(var.qt_path)\..\plugins\imageformats\qsvg$(var.qt_suffix).dll" />
120-
</Component>
121-
</Directory>
122-
<Directory Id="tls" Name="tls">
123-
<Component Id="qopensslbackend.dll">
124-
<File Source="$(var.qt_path)\..\plugins\tls\qopensslbackend$(var.qt_suffix).dll" />
125-
</Component>
126-
</Directory>
127-
<?endif?>
128115
</Directory>
129116
<Component Id="Chrome" Transitive="yes" Condition="(CHROMEINSTALL = 1)" Bitness="always32">
130117
<RegistryValue Root="HKLM" Type="string" Name="update_url"
@@ -155,21 +142,5 @@
155142
Value="gnmckgbandlkacikdndelhfghdejfido" />
156143
</Component>
157144
</StandardDirectory>
158-
159-
<Feature Id="Install" Level="1" Title="Web eID" Display="expand" ConfigurableDirectory="APPLICATIONFOLDER">
160-
<ComponentRef Id="Application" />
161-
<ComponentRef Id="ChromeEdge" />
162-
<ComponentRef Id="Chrome" />
163-
<ComponentRef Id="ChromePolicy" />
164-
<ComponentRef Id="Edge" />
165-
<ComponentRef Id="EdgePolicy" />
166-
<ComponentRef Id="Firefox" />
167-
<?ifdef var.qt_path ?>
168-
<ComponentRef Id="qwindows.dll" />
169-
<ComponentRef Id="qwindowsvistastyle.dll" />
170-
<ComponentRef Id="imageformats.dll" />
171-
<ComponentRef Id="qopensslbackend.dll" />
172-
<?endif?>
173-
</Feature>
174145
</Package>
175146
</Wix>

src/app/CMakeLists.txt

+4-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,10 @@ if(WIN32)
5050
WORKING_DIRECTORY $<TARGET_FILE_DIR:web-eid>
5151
)
5252
add_custom_target(bundle DEPENDS installer
53-
COMMAND wix.exe build -nologo
53+
COMMAND dotnet tool install wix --version 4.0.5 --create-manifest-if-needed
54+
COMMAND wix extension add WixToolset.Util.wixext/4.0.5
55+
COMMAND wix extension add WixToolset.Bal.wixext/4.0.5
56+
COMMAND dotnet wix build -nologo
5457
-ext WixToolset.Bal.wixext
5558
-ext WixToolset.Util.wixext
5659
-d webeid="${BASE_FILE}"

0 commit comments

Comments
 (0)