build(cpack/wix): fix protocol handler registration

Fixes #923.
This commit is contained in:
Oleg Shparber 2024-07-21 23:37:45 -04:00
parent d014f21a07
commit b9a25f2cbe

View File

@ -50,25 +50,25 @@
<?include "product_fragment.wxi"?> <?include "product_fragment.wxi"?>
<!-- Dash protocol handlers. --> <!-- Dash protocol handlers. -->
<Feature Id="Protocol" Title="Plugin Support" Level="1" <Component Id="ProtocolHandlers" Directory="INSTALL_ROOT">
Description="Provides dash:// and dash-plugin:// protocol handlers."> <?foreach UrlScheme in dash;dash-plugin ?>
<Component Id="ProtocolHandlers" Directory="TARGETDIR"> <!-- Remove broken HKCU keys. -->
<?foreach UrlScheme in dash;dash-plugin ?> <RemoveRegistryKey Action="removeOnInstall" Root="HKCU" Key="Software\Classes\$(var.UrlScheme)" />
<RegistryKey Root="HKMU" Key="Software\Classes\$(var.UrlScheme)">
<RegistryValue Type="string" Value="URL: Dash Plugin Protocol (Zeal)" />
<RegistryValue Name="URL Protocol" Type="string" Value="" />
<RegistryKey Key="DefaultIcon"> <RegistryKey Root="HKLM" Key="Software\Classes\$(var.UrlScheme)">
<RegistryValue Type="string" Value="&quot;[CM_FP_zeal.exe],1&quot;" /> <RegistryValue Type="string" Value="URL:Dash Plugin Protocol (Zeal)" />
</RegistryKey> <RegistryValue Name="URL Protocol" Type="string" Value="" />
<RegistryKey Key="shell\open\command"> <RegistryKey Key="DefaultIcon">
<RegistryValue Type="string" Value="&quot;[CM_FP_zeal.exe]&quot; &quot;%1&quot;" /> <RegistryValue Type="string" Value="&quot;[#CM_FP_zeal.exe],1&quot;" />
</RegistryKey>
</RegistryKey> </RegistryKey>
<?endforeach ?>
</Component> <RegistryKey Key="shell\open\command">
</Feature> <RegistryValue Type="string" Value="&quot;[#CM_FP_zeal.exe]&quot; &quot;%1&quot;" />
</RegistryKey>
</RegistryKey>
<?endforeach ?>
</Component>
<!-- Custom properties to control installation options --> <!-- Custom properties to control installation options -->
<Property Id="LAUNCHAPPONEXIT" Value="1" Secure="yes"/> <Property Id="LAUNCHAPPONEXIT" Value="1" Secure="yes"/>
@ -76,7 +76,9 @@
<!-- Set properties based on existing conditions, prevents changing state on upgrade. --> <!-- Set properties based on existing conditions, prevents changing state on upgrade. -->
<SetProperty Id="LicenseAccepted" After="AppSearch" Value="1">WIX_UPGRADE_DETECTED</SetProperty> <SetProperty Id="LicenseAccepted" After="AppSearch" Value="1">WIX_UPGRADE_DETECTED</SetProperty>
<FeatureRef Id="ProductFeature"/> <FeatureRef Id="ProductFeature">
<ComponentRef Id="ProtocolHandlers" />
</FeatureRef>
<!-- Action to launch application after installer exits. --> <!-- Action to launch application after installer exits. -->
<Property Id="WixShellExecTarget" Value="[#CM_FP_zeal.exe]"/> <Property Id="WixShellExecTarget" Value="[#CM_FP_zeal.exe]"/>