Skip to content

Commit

Permalink
Tweak WiX Installer For Conditionals
Browse files Browse the repository at this point in the history
- Be more explicit in WiX variable conditional tests to prevent implicit evaluation from producing unexpected results.
  • Loading branch information
NoMoreFood committed Nov 12, 2024
1 parent 7853193 commit 75cc841
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions setup/WinDirStat.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@
</DirectorySearch>
</Property>
<SetProperty Id="DESKTOP_SHORTCUT" After="AppSearch" Value="1" Sequence="first">
<![CDATA[((WIX_UPGRADE_DETECTED AND DESKTOP_SHORTCUT_LOCATE <> "") OR ENABLE_SHORTCUT)]]></SetProperty>
<![CDATA[((WIX_UPGRADE_DETECTED <> "" AND DESKTOP_SHORTCUT_LOCATE <> "") OR ENABLE_SHORTCUT = 1)]]></SetProperty>
<Property Id="CONTEXT_MENU_LOCATE">
<RegistrySearch Id='ContextMenuSearch' Type='raw' Root='HKCR' Key='Directory\shell\WinDirStat' Name="Icon" Win64="$(var.Win64)"/>
</Property>
<SetProperty Id="CONTEXTMENU_ENTRY" After="AppSearch" Value="1" Sequence="first">
<![CDATA[(WIX_UPGRADE_DETECTED AND CONTEXT_MENU_LOCATE <> "") OR (NOT WIX_UPGRADE_DETECTED AND NOT DISABLE_CONTEXTMENU)]]></SetProperty>
<![CDATA[((WIX_UPGRADE_DETECTED <> "" AND CONTEXT_MENU_LOCATE <> "") OR NOT WIX_UPGRADE_DETECTED) AND DISABLE_CONTEXTMENU <> 1]]></SetProperty>
<UI Id="InstallerUI">
<Dialog Id="OptionsDlg" Width="370" Height="270" Title="WinDirStat Options">
<Control Id="BannerLine" Type="Line" X="0" Y="44" Width="370" Height="2"/>
Expand Down

0 comments on commit 75cc841

Please sign in to comment.