Skip to content

Commit

Permalink
Convert to WIX 5
Browse files Browse the repository at this point in the history
WE2-881

Signed-off-by: Raul Metsma <[email protected]>
  • Loading branch information
metsma committed Apr 24, 2024
1 parent c0e11e1 commit 61e56eb
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 71 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/cmake-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ jobs:

- name: Install WiX
run: |
dotnet tool install --global wix --version 4.0.5
wix extension -g add WixToolset.UI.wixext/4.0.5
wix extension -g add WixToolset.Util.wixext/4.0.5
wix extension -g add WixToolset.Bal.wixext/4.0.5
dotnet tool install --global wix --version 5.0.0
wix extension -g add WixToolset.UI.wixext/5.0.0
wix extension -g add WixToolset.Util.wixext/5.0.0
wix extension -g add WixToolset.Bal.wixext/5.0.0
- name: Configure
run: |
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -269,10 +269,10 @@ https://github.com/mrts/docker-qt-cmake-gtest-valgrind-ubuntu/blob/master/Docker
- Download Visual Studio 2019 community installer from https://visualstudio.microsoft.com/ and install _Desktop C++ Development_
- Install WIX toolset

dotnet tool install --global wix --version 4.0.5
wix extension -g add WixToolset.UI.wixext/4.0.5
wix extension -g add WixToolset.Util.wixext/4.0.5
wix extension -g add WixToolset.Bal.wixext/4.0.5
dotnet tool install --global wix --version 5.0.0
wix extension -g add WixToolset.UI.wixext/5.0.0
wix extension -g add WixToolset.Util.wixext/5.0.0
wix extension -g add WixToolset.Bal.wixext/5.0.0

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

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

### macOS

Expand Down
2 changes: 1 addition & 1 deletion install/WixUI_Minimal.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Patch dialog sequence:
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg" Order="2" Condition="Installed AND PATCH" />

<InstallUISequence>
<Show Dialog="WelcomeDlg" Before="WelcomeDlg2" Condition="Installed AND PATCH" />
<Show Dialog="override WelcomeDlg" Before="WelcomeDlg2" Condition="Installed AND PATCH" />
</InstallUISequence>

<Property Id="ARPNOMODIFY" Value="1" />
Expand Down
2 changes: 1 addition & 1 deletion install/plugins.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<Chain>
<MsiPackage Id="WebEID" InstallCondition="VersionNT64" ForcePerMachine="yes"
SourceFile="$(var.webeid).qt.msi" Compressed="yes">
<MsiProperty Name="APPLICATIONFOLDER" Value="[ProgramFiles64Folder]Web eID" />
<MsiProperty Name="INSTALLFOLDER" Value="[ProgramFiles64Folder]Web eID" />
<MsiProperty Name="CHROMEINSTALL" Value="[ChromeSupport]" />
<MsiProperty Name="CHROMEPOLICY" Value="[ForceChromeExtensionActivation]" />
<MsiProperty Name="EDGEINSTALL" Value="[EdgeSupport]" />
Expand Down
89 changes: 30 additions & 59 deletions install/web-eid.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
<MediaTemplate EmbedCab="yes" CompressionLevel="high" />
<Icon Id="web_eid.exe" SourceFile="$(var.app_path)" />
<Property Id="ARPPRODUCTICON" Value="web_eid.exe" />
<Property Id="APPLICATIONNAME" Value="web-eid" />
<Property Id="CHROMEINSTALL" Value="1" />
<Property Id="CHROMEPOLICY" Value="0" />
<Property Id="EDGEINSTALL" Value="1" />
Expand Down Expand Up @@ -70,29 +69,39 @@
</InstallExecuteSequence>

<StandardDirectory Id="ProgramFiles6432Folder">
<Directory Id="APPLICATIONFOLDER" Name="Web eID">
<Component Id="Application" Guid="9b61583c-308f-435d-b221-c2f250271c7c">
<File Source="$(var.app_path)" KeyPath="yes" />
<Directory Id="INSTALLFOLDER" Name="Web eID">
<File Source="$(var.app_path)" />
<?ifdef var.qt_path ?>
<File Source="$(var.VCPATH)\msvcp140$(var.qt_suffix).dll" />
<File Source="$(var.VCPATH)\vcruntime140$(var.qt_suffix).dll" />
<?if $(sys.BUILDARCH) = x64 ?>
<File Source="$(var.VCPATH)\vcruntime140_1$(var.qt_suffix).dll" />
<File Source="$(var.VCPATH)\msvcp140_1$(var.qt_suffix).dll" />
<File Source="$(var.VCPATH)\msvcp140_2$(var.qt_suffix).dll" />
<File Source="$(var.VCPATH)\msvcp140$(var.qt_suffix).dll" />
<File Source="$(var.VCPATH)\msvcp140_1$(var.qt_suffix).dll" />
<File Source="$(var.VCPATH)\msvcp140_2$(var.qt_suffix).dll" />
<File Source="$(var.VCPATH)\vcruntime140$(var.qt_suffix).dll" />
<?if $(sys.BUILDARCH) != x86 ?>
<File Source="$(var.VCPATH)\vcruntime140_1$(var.qt_suffix).dll" />
<?endif?>
<File Source="$(var.ssl_path)\libcrypto-3$(var.ssl_suffix).dll" />
<File Source="$(var.ssl_path)\libssl-3$(var.ssl_suffix).dll" />
<File Source="$(var.qt_path)\Qt6Core$(var.qt_suffix).dll" />
<File Source="$(var.qt_path)\Qt6Gui$(var.qt_suffix).dll" />
<File Source="$(var.qt_path)\Qt6Network$(var.qt_suffix).dll" />
<File Source="$(var.qt_path)\Qt6Svg$(var.qt_suffix).dll" />
<File Source="$(var.qt_path)\Qt6Widgets$(var.qt_suffix).dll" />
<File Source="$(var.qt_path)\D3DCompiler_47.dll" />
<File Source="$(var.qt_path)\opengl32sw.dll" />
<File Source="$(var.qt_path)\Qt6SvgWidgets$(var.qt_suffix).dll" />
<File Source="$(var.ssl_path)\libcrypto-3$(var.ssl_suffix).dll" />
<File Source="$(var.ssl_path)\libssl-3$(var.ssl_suffix).dll" />
<File Source="$(var.qt_path)\Qt6Core$(var.qt_suffix).dll" />
<File Source="$(var.qt_path)\Qt6Gui$(var.qt_suffix).dll" />
<File Source="$(var.qt_path)\Qt6Network$(var.qt_suffix).dll" />
<File Source="$(var.qt_path)\Qt6Svg$(var.qt_suffix).dll" />
<File Source="$(var.qt_path)\Qt6Widgets$(var.qt_suffix).dll" />
<File Source="$(var.qt_path)\D3DCompiler_47.dll" />
<File Source="$(var.qt_path)\opengl32sw.dll" />
<File Source="$(var.qt_path)\Qt6SvgWidgets$(var.qt_suffix).dll" />
<Directory Id="platforms" Name="platforms">
<File Source="$(var.qt_path)\..\plugins\platforms\qwindows$(var.qt_suffix).dll" />
</Directory>
<Directory Id="styles" Name="styles">
<File Source="$(var.qt_path)\..\plugins\styles\qwindowsvistastyle$(var.qt_suffix).dll" />
</Directory>
<Directory Id="imageformats" Name="imageformats">
<File Source="$(var.qt_path)\..\plugins\imageformats\qsvg$(var.qt_suffix).dll" />
</Directory>
<Directory Id="tls" Name="tls">
<File Source="$(var.qt_path)\..\plugins\tls\qopensslbackend$(var.qt_suffix).dll" />
</Directory>
<?endif?>
</Component>
<Component Id="ChromeEdge" Transitive="yes" Condition="(CHROMEINSTALL = 1 OR EDGEINSTALL = 1)">
<File Source="$(var.json)" />
<RegistryValue Root="HKLM" Type="string" Value="[APPLICATIONFOLDER]eu.webeid.json"
Expand All @@ -103,28 +112,6 @@
<RegistryValue Root="HKLM" Type="string" Value="[APPLICATIONFOLDER]eu.webeid.firefox.json"
Key="SOFTWARE\Mozilla\NativeMessagingHosts\eu.webeid" />
</Component>
<?ifdef var.qt_path ?>
<Directory Id="platforms" Name="platforms">
<Component Id="qwindows.dll">
<File Source="$(var.qt_path)\..\plugins\platforms\qwindows$(var.qt_suffix).dll" />
</Component>
</Directory>
<Directory Id="styles" Name="styles">
<Component Id="qwindowsvistastyle.dll">
<File Source="$(var.qt_path)\..\plugins\styles\qwindowsvistastyle$(var.qt_suffix).dll" />
</Component>
</Directory>
<Directory Id="imageformats" Name="imageformats">
<Component Id="imageformats.dll">
<File Source="$(var.qt_path)\..\plugins\imageformats\qsvg$(var.qt_suffix).dll" />
</Component>
</Directory>
<Directory Id="tls" Name="tls">
<Component Id="qopensslbackend.dll">
<File Source="$(var.qt_path)\..\plugins\tls\qopensslbackend$(var.qt_suffix).dll" />
</Component>
</Directory>
<?endif?>
</Directory>
<Component Id="Chrome" Transitive="yes" Condition="(CHROMEINSTALL = 1)" Bitness="always32">
<RegistryValue Root="HKLM" Type="string" Name="update_url"
Expand Down Expand Up @@ -155,21 +142,5 @@
Value="gnmckgbandlkacikdndelhfghdejfido" />
</Component>
</StandardDirectory>

<Feature Id="Install" Level="1" Title="Web eID" Display="expand" ConfigurableDirectory="APPLICATIONFOLDER">
<ComponentRef Id="Application" />
<ComponentRef Id="ChromeEdge" />
<ComponentRef Id="Chrome" />
<ComponentRef Id="ChromePolicy" />
<ComponentRef Id="Edge" />
<ComponentRef Id="EdgePolicy" />
<ComponentRef Id="Firefox" />
<?ifdef var.qt_path ?>
<ComponentRef Id="qwindows.dll" />
<ComponentRef Id="qwindowsvistastyle.dll" />
<ComponentRef Id="imageformats.dll" />
<ComponentRef Id="qopensslbackend.dll" />
<?endif?>
</Feature>
</Package>
</Wix>
6 changes: 5 additions & 1 deletion src/app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ if(WIN32)
WORKING_DIRECTORY $<TARGET_FILE_DIR:web-eid>
)
add_custom_target(bundle DEPENDS installer
COMMAND wix.exe build -nologo
COMMAND dotnet new tool-manifest --force
COMMAND dotnet tool install wix --version 4.0.5
COMMAND wix extension add WixToolset.Util.wixext/4.0.5
COMMAND wix extension add WixToolset.Bal.wixext/4.0.5
COMMAND dotnet wix build -nologo
-ext WixToolset.Bal.wixext
-ext WixToolset.Util.wixext
-d webeid="${BASE_FILE}"
Expand Down

0 comments on commit 61e56eb

Please sign in to comment.