Skip to content

Commit b9a25f2

Browse files
committed
build(cpack/wix): fix protocol handler registration
Fixes #923.
1 parent d014f21 commit b9a25f2

File tree

1 file changed

+21
-19
lines changed

1 file changed

+21
-19
lines changed

pkg/wix/template.xml

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -50,33 +50,35 @@
5050
<?include "product_fragment.wxi"?>
5151

5252
<!-- Dash protocol handlers. -->
53-
<Feature Id="Protocol" Title="Plugin Support" Level="1"
54-
Description="Provides dash:// and dash-plugin:// protocol handlers.">
55-
<Component Id="ProtocolHandlers" Directory="TARGETDIR">
56-
<?foreach UrlScheme in dash;dash-plugin ?>
57-
<RegistryKey Root="HKMU" Key="Software\Classes\$(var.UrlScheme)">
58-
<RegistryValue Type="string" Value="URL: Dash Plugin Protocol (Zeal)" />
59-
<RegistryValue Name="URL Protocol" Type="string" Value="" />
60-
61-
<RegistryKey Key="DefaultIcon">
62-
<RegistryValue Type="string" Value="&quot;[CM_FP_zeal.exe],1&quot;" />
63-
</RegistryKey>
64-
65-
<RegistryKey Key="shell\open\command">
66-
<RegistryValue Type="string" Value="&quot;[CM_FP_zeal.exe]&quot; &quot;%1&quot;" />
67-
</RegistryKey>
53+
<Component Id="ProtocolHandlers" Directory="INSTALL_ROOT">
54+
<?foreach UrlScheme in dash;dash-plugin ?>
55+
<!-- Remove broken HKCU keys. -->
56+
<RemoveRegistryKey Action="removeOnInstall" Root="HKCU" Key="Software\Classes\$(var.UrlScheme)" />
57+
58+
<RegistryKey Root="HKLM" Key="Software\Classes\$(var.UrlScheme)">
59+
<RegistryValue Type="string" Value="URL:Dash Plugin Protocol (Zeal)" />
60+
<RegistryValue Name="URL Protocol" Type="string" Value="" />
61+
62+
<RegistryKey Key="DefaultIcon">
63+
<RegistryValue Type="string" Value="&quot;[#CM_FP_zeal.exe],1&quot;" />
64+
</RegistryKey>
65+
66+
<RegistryKey Key="shell\open\command">
67+
<RegistryValue Type="string" Value="&quot;[#CM_FP_zeal.exe]&quot; &quot;%1&quot;" />
6868
</RegistryKey>
69-
<?endforeach ?>
70-
</Component>
71-
</Feature>
69+
</RegistryKey>
70+
<?endforeach ?>
71+
</Component>
7272

7373
<!-- Custom properties to control installation options -->
7474
<Property Id="LAUNCHAPPONEXIT" Value="1" Secure="yes"/>
7575

7676
<!-- Set properties based on existing conditions, prevents changing state on upgrade. -->
7777
<SetProperty Id="LicenseAccepted" After="AppSearch" Value="1">WIX_UPGRADE_DETECTED</SetProperty>
7878

79-
<FeatureRef Id="ProductFeature"/>
79+
<FeatureRef Id="ProductFeature">
80+
<ComponentRef Id="ProtocolHandlers" />
81+
</FeatureRef>
8082

8183
<!-- Action to launch application after installer exits. -->
8284
<Property Id="WixShellExecTarget" Value="[#CM_FP_zeal.exe]"/>

0 commit comments

Comments
 (0)