Skip to content

Commit d4eae3a

Browse files
committed
Migrate to latest WiX version
1 parent 225d70f commit d4eae3a

File tree

4 files changed

+41
-37
lines changed

4 files changed

+41
-37
lines changed

.github/workflows/build-windows-msvc.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,17 @@ jobs:
3737
with:
3838
submodules: 'recursive'
3939

40-
- name: Set up MSVC environment
41-
uses: equeim/action-setup-msvc-environment@v1
42-
with:
43-
arch: ${{ matrix.arch.msvc-arch }}
44-
4540
- name: Upgrade LLVM
4641
if: inputs.toolchain == 'msvc-clang'
4742
run: |
4843
choco upgrade llvm
4944
45+
- name: Install WiX
46+
if: inputs.toolchain == 'msvc-clang'
47+
run: |
48+
dotnet tool install --global wix
49+
wix extension add --global WixToolset.UI.wixext
50+
5051
- name: Set up vcpkg
5152
uses: equeim/action-setup-vcpkg@v6
5253
with:
@@ -55,6 +56,11 @@ jobs:
5556
save-cache: ${{ github.event_name != 'pull_request' && inputs.toolchain == 'msvc' }}
5657
cache-key-tag: ${{ matrix.arch.cmake-preset-arch }}
5758

59+
- name: Set up MSVC environment
60+
uses: equeim/action-setup-msvc-environment@v1
61+
with:
62+
arch: ${{ matrix.arch.msvc-arch }}
63+
5864
- name: Build Tremotesf with ${{ inputs.toolchain }} toolchain for ${{ matrix.arch.cmake-preset-arch }} architecture
5965
id: build
6066
uses: equeim/action-cmake-build@v10

packaging/windows/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ set(CPACK_PACKAGE_VENDOR "Tremotesf")
1010
set(CPACK_PACKAGE_EXECUTABLES "tremotesf;Tremotesf")
1111
set(CPACK_PACKAGE_INSTALL_DIRECTORY "Tremotesf")
1212
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/license.rtf")
13+
set(CPACK_WIX_VERSION 4)
14+
set(CPACK_WIX_INSTALL_SCOPE perMachine)
1315
set(CPACK_WIX_UPGRADE_GUID "67e0511b-d9de-4b3c-a604-0dd47522d451")
1416
set(CPACK_WIX_PRODUCT_ICON "${TREMOTESF_WINDOWS_ICON}")
1517
set(CPACK_WIX_EXTRA_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/registry.wxs")

packaging/windows/registry.wxs

Lines changed: 24 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,78 +1,75 @@
1-
<?xml version="1.0" encoding="UTF-8"?>
2-
<!--
1+
<!--
32
SPDX-FileCopyrightText: 2015-2025 Alexey Rochev
43
54
SPDX-License-Identifier: CC0-1.0
65
-->
7-
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
6+
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
87
<Fragment>
9-
<DirectoryRef Id="TARGETDIR">
10-
<Component Id="TorrentFileTypeRegistration" Guid="d24510b5-e983-4510-bdb0-cb3317b9f39d" NeverOverwrite="yes" Permanent="yes">
8+
<Component Id="TorrentFileTypeRegistration" Guid="d24510b5-e983-4510-bdb0-cb3317b9f39d" NeverOverwrite="yes" Permanent="yes" Directory="INSTALL_ROOT">
119
<RegistryKey Root="HKCU" Key="Software\Classes\.torrent">
12-
<RegistryValue Type="string" Name="Content Type" Value="application/x-bittorrent" KeyPath="yes"/>
10+
<RegistryValue Type="string" Name="Content Type" Value="application/x-bittorrent" KeyPath="yes" />
1311
</RegistryKey>
1412
</Component>
1513

16-
<Component Id="MagnetProtocolRegistration" Guid="425a4847-c965-4468-bb85-e0c03c229c4b" NeverOverwrite="yes" Permanent="yes">
14+
<Component Id="MagnetProtocolRegistration" Guid="425a4847-c965-4468-bb85-e0c03c229c4b" NeverOverwrite="yes" Permanent="yes" Directory="INSTALL_ROOT">
1715
<RegistryKey Root="HKCU" Key="Software\Classes\magnet">
18-
<RegistryValue Type="string" Value="URL:Magnet link" KeyPath="yes"/>
19-
<RegistryValue Type="string" Name="URL Protocol" Value=""/>
16+
<RegistryValue Type="string" Value="URL:Magnet link" KeyPath="yes" />
17+
<RegistryValue Type="string" Name="URL Protocol" Value="" />
2018
</RegistryKey>
2119
</Component>
2220

23-
<Component Id="FileAssociationRegistration" Guid="ea9576ef-8e47-4993-9814-3529a7de3a6d">
21+
<Component Id="FileAssociationRegistration" Guid="ea9576ef-8e47-4993-9814-3529a7de3a6d" Directory="INSTALL_ROOT">
2422
<RegistryKey Root="HKCU" Key="Software\Classes\Tremotesf.TorrentFile.1">
25-
<RegistryValue Type="string" Value="Torrent file"/>
26-
<RegistryValue Type="string" Name="FriendlyTypeName" Value="@&quot;[#CM_FP_tremotesf.exe]&quot;,0"/>
23+
<RegistryValue Type="string" Value="Torrent file" />
24+
<RegistryValue Type="string" Name="FriendlyTypeName" Value="@&quot;[#CM_FP_tremotesf.exe]&quot;,0" />
2725
<RegistryKey Key="DefaultIcon">
28-
<RegistryValue Type="string" Value="&quot;[#CM_FP_tremotesf.exe]&quot;,0"/>
26+
<RegistryValue Type="string" Value="&quot;[#CM_FP_tremotesf.exe]&quot;,0" />
2927
</RegistryKey>
3028
<RegistryKey Key="Shell">
3129
<RegistryKey Key="Open">
3230
<RegistryKey Key="command">
33-
<RegistryValue Type="string" Value="&quot;[#CM_FP_tremotesf.exe]&quot; &quot;%1&quot;"/>
31+
<RegistryValue Type="string" Value="&quot;[#CM_FP_tremotesf.exe]&quot; &quot;%1&quot;" />
3432
</RegistryKey>
3533
</RegistryKey>
3634
</RegistryKey>
3735
</RegistryKey>
3836

3937
<RegistryKey Root="HKCU" Key="Software\Classes\.torrent\OpenWithProgids">
40-
<RegistryValue Type="string" Name="Tremotesf.TorrentFile.1" Value=""/>
38+
<RegistryValue Type="string" Name="Tremotesf.TorrentFile.1" Value="" />
4139
</RegistryKey>
4240

4341
<RegistryKey Root="HKCU" Key="Software\Classes\Tremotesf.MagnetLink.1">
44-
<RegistryValue Type="string" Value="Magnet link"/>
45-
<RegistryValue Type="string" Name="FriendlyTypeName" Value="@&quot;[#CM_FP_tremotesf.exe]&quot;,1"/>
42+
<RegistryValue Type="string" Value="Magnet link" />
43+
<RegistryValue Type="string" Name="FriendlyTypeName" Value="@&quot;[#CM_FP_tremotesf.exe]&quot;,1" />
4644
<RegistryKey Key="DefaultIcon">
47-
<RegistryValue Type="string" Value="&quot;[#CM_FP_tremotesf.exe]&quot;,0"/>
45+
<RegistryValue Type="string" Value="&quot;[#CM_FP_tremotesf.exe]&quot;,0" />
4846
</RegistryKey>
4947
<RegistryKey Key="Shell">
5048
<RegistryKey Key="Open">
5149
<RegistryKey Key="command">
52-
<RegistryValue Type="string" Value="&quot;[#CM_FP_tremotesf.exe]&quot; &quot;%1&quot;"/>
50+
<RegistryValue Type="string" Value="&quot;[#CM_FP_tremotesf.exe]&quot; &quot;%1&quot;" />
5351
</RegistryKey>
5452
</RegistryKey>
5553
</RegistryKey>
5654
</RegistryKey>
5755

5856
<RegistryKey Root="HKCU" Key="Software\Tremotesf\Tremotesf\Capabilities">
59-
<RegistryValue Type="string" Name="ApplicationName" Value="Tremotesf"/>
60-
<RegistryValue Type="string" Name="ApplicationDescription" Value="Tremotesf - Remote GUI for transmission-daemon"/>
57+
<RegistryValue Type="string" Name="ApplicationName" Value="Tremotesf" />
58+
<RegistryValue Type="string" Name="ApplicationDescription" Value="Tremotesf - Remote GUI for transmission-daemon" />
6159
<RegistryKey Key="FileAssociations">
62-
<RegistryValue Type="string" Name=".torrent" Value="Tremotesf.TorrentFile.1"/>
60+
<RegistryValue Type="string" Name=".torrent" Value="Tremotesf.TorrentFile.1" />
6361
</RegistryKey>
6462
<RegistryKey Key="MimeAssociations">
65-
<RegistryValue Type="string" Name="application/x-bittorrent" Value="Tremotesf.TorrentFile.1"/>
63+
<RegistryValue Type="string" Name="application/x-bittorrent" Value="Tremotesf.TorrentFile.1" />
6664
</RegistryKey>
6765
<RegistryKey Key="UrlAssociations">
68-
<RegistryValue Type="string" Name="magnet" Value="Tremotesf.MagnetLink.1"/>
66+
<RegistryValue Type="string" Name="magnet" Value="Tremotesf.MagnetLink.1" />
6967
</RegistryKey>
7068
</RegistryKey>
7169

7270
<RegistryKey Root="HKCU" Key="Software\RegisteredApplications">
73-
<RegistryValue Type="string" Name="Tremotesf" Value="Software\Tremotesf\Tremotesf\Capabilities"/>
71+
<RegistryValue Type="string" Name="Tremotesf" Value="Software\Tremotesf\Tremotesf\Capabilities" />
7472
</RegistryKey>
7573
</Component>
76-
</DirectoryRef>
77-
</Fragment>
74+
</Fragment>
7875
</Wix>
Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
<?xml version="1.0" encoding="UTF-8"?>
2-
<!--
1+
<!--
32
SPDX-FileCopyrightText: 2015-2025 Alexey Rochev
43
54
SPDX-License-Identifier: CC0-1.0
65
-->
76
<CPackWiXPatch>
87
<CPackWiXFragment Id="#PRODUCTFEATURE">
9-
<ComponentRef Id="TorrentFileTypeRegistration"/>
10-
<ComponentRef Id="MagnetProtocolRegistration"/>
11-
<ComponentRef Id="FileAssociationRegistration"/>
8+
<ComponentRef Id="TorrentFileTypeRegistration" />
9+
<ComponentRef Id="MagnetProtocolRegistration" />
10+
<ComponentRef Id="FileAssociationRegistration" />
1211
</CPackWiXFragment>
1312
</CPackWiXPatch>

0 commit comments

Comments
 (0)