Skip to content

Commit

Permalink
windows-wix: Redo protocol handler installation logic
Browse files Browse the repository at this point in the history
  • Loading branch information
trollixx committed Sep 6, 2017
1 parent 16e09e6 commit c190283
Showing 1 changed file with 17 additions and 30 deletions.
47 changes: 17 additions & 30 deletions windows-wix/zeal.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@

<Feature Id="Protocol" Title="Plugin Support" Level="1"
Description="Provides dash:// and dash-plugin:// protocol handlers.">
<ComponentGroupRef Id="ProtocolHandlers" />
<ComponentRef Id="ProtocolHandlers" />
</Feature>

<!-- Directory Structure -->
Expand Down Expand Up @@ -122,35 +122,22 @@
</Component>

<SetProperty Id="AppExePath" Value="[APPLICATIONFOLDER]$(var.AppExeName)" Before="CostFinalize" />
<ComponentGroup Id="ProtocolHandlers" Directory="TARGETDIR">
<Component>
<Condition>ALLUSERS</Condition>

<RegistryValue Root="HKLM" Key="SOFTWARE\Classes\dash" Type="string" Value="Zeal Search (Dash Protocol)" />
<RegistryValue Root="HKLM" Key="SOFTWARE\Classes\dash" Name="URL Protocol" Type="string" Value="" />
<RegistryValue Root="HKLM" Key="SOFTWARE\Classes\dash\shell\open\command" Type="string" Value='"[AppExePath]" "%1"' />
<RegistryValue Root="HKLM" Key="SOFTWARE\Classes\dash\DefaultIcon" Type="string" Value='"[AppExePath],1"' />

<RegistryValue Root="HKLM" Key="SOFTWARE\Classes\dash-plugin" Type="string" Value="Zeal Search (Dash Protocol)" />
<RegistryValue Root="HKLM" Key="SOFTWARE\Classes\dash-plugin" Name="URL Protocol" Type="string" Value="" />
<RegistryValue Root="HKLM" Key="SOFTWARE\Classes\dash-plugin\shell\open\command" Type="string" Value='"[AppExePath]" "%1"' />
<RegistryValue Root="HKLM" Key="SOFTWARE\Classes\dash-plugin\DefaultIcon" Type="string" Value='"[AppExePath],1"' />
</Component>

<Component>
<Condition>NOT ALLUSERS</Condition>

<RegistryValue Root="HKCU" Key="SOFTWARE\Classes\dash" Type="string" Value="Zeal Search (Dash Protocol)" />
<RegistryValue Root="HKCU" Key="SOFTWARE\Classes\dash" Name="URL Protocol" Type="string" Value="" />
<RegistryValue Root="HKCU" Key="SOFTWARE\Classes\dash\shell\open\command" Type="string" Value='"[AppExePath]" "%1"' />
<RegistryValue Root="HKCU" Key="SOFTWARE\Classes\dash\DefaultIcon" Type="string" Value='"[AppExePath],1"' />

<RegistryValue Root="HKCU" Key="SOFTWARE\Classes\dash-plugin" Type="string" Value="Zeal Search (Dash Protocol)" />
<RegistryValue Root="HKCU" Key="SOFTWARE\Classes\dash-plugin" Name="URL Protocol" Type="string" Value="" />
<RegistryValue Root="HKCU" Key="SOFTWARE\Classes\dash-plugin\shell\open\command" Type="string" Value='"[AppExePath]" "%1"' />
<RegistryValue Root="HKCU" Key="SOFTWARE\Classes\dash-plugin\DefaultIcon" Type="string" Value='"[AppExePath],1"' />
</Component>
</ComponentGroup>
<Component Id="ProtocolHandlers" Directory="TARGETDIR">
<?foreach UrlScheme in dash;dash-plugin ?>
<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">
<RegistryValue Type="string" Value="&quot;[AppExePath],1&quot;" />
</RegistryKey>

<RegistryKey Key="shell\open\command">
<RegistryValue Type="string" Value="&quot;[AppExePath]&quot; &quot;%1&quot;" />
</RegistryKey>
</RegistryKey>
<?endforeach ?>
</Component>

<UIRef Id="WixUI_Advanced" />

Expand Down

0 comments on commit c190283

Please sign in to comment.