WiX: Disable desktop icon and shortcut checkboxes.

Enable and disable the Wireshark and Wireshark-gtk desktop icon and
shortcut checkboxes depending on our feature selections to match the
NSIS installer behavior (and make sense).

Set the level of "Fe.WiresharkGTK" to 2 so that it's disabled by default.
This roughly matches the behavior of the NSIS installer.

Note that we can't enable or disable radio buttons.

Change-Id: I1c73f901344e21bd62e67890ce544f644c0cdda6
Reviewed-on: https://code.wireshark.org/review/17898
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
This commit is contained in:
Gerald Combs 2016-09-23 17:45:39 -07:00 committed by Michael Mann
parent a1b04ad228
commit 575e36324c
2 changed files with 31 additions and 8 deletions

View File

@ -28,7 +28,7 @@
<ComponentGroupRef Id="CG.TShark" />
</Feature>
<?ifdef GTK_DIR?>
<Feature Id="Fe.WiresharkGTK" Title="Wireshark 1" Level="1" AllowAdvertise="yes" Display="expand" Description="The classic user interface.">
<Feature Id="Fe.WiresharkGTK" Title="Wireshark 1" Level="2" AllowAdvertise="yes" Display="expand" Description="The classic user interface.">
<ComponentGroupRef Id="CG.WiresharkGTK" />
<ComponentGroupRef Id="CG.GTKRequiredDependencies" />
<ComponentGroupRef Id="CG.GTKSubdirectory" />

View File

@ -9,16 +9,39 @@
<Control Id="Title" Type="Text" X="15" Y="6" Width="200" Height="15" Transparent="yes" NoPrefix="yes" Text="Select Additional Tasks" />
<Control Id="Shortcuts" Type="GroupBox" X="15" Y="50" Width="250" Height="125" Text="Create Shortcuts"/>
<Control Id="WiresharkStartMenuCB" Type="CheckBox" X="20" Y="65" Width="180" Height="15" CheckBoxValue="1" Property="WIRESHARK_START_MENU" Text="Wireshark Start Menu Item" />
<Control Id="WiresharkDesktopIconCB" Type="CheckBox" X="20" Y="83" Width="180" Height="15" CheckBoxValue="1" Property="WIRESHARK_DESKTOP_ICON" Text="Wireshark Desktop Icon" />
<Control Id="WiresharkQuickLaunchIconCB" Type="CheckBox" X="20" Y="101" Width="180" Height="15" CheckBoxValue="1" Property="WIRESHARK_QUICK_LAUNCH_ICON" Text="Wireshark Quick Launch Icon" />
<Control Id="WiresharkLegacyStartMenuCB" Type="CheckBox" X="20" Y="117" Width="180" Height="15" CheckBoxValue="1" Property="WIRESHARK_LEGACY_START_MENU" Text="Wireshark Legacy Start Menu Item" />
<Control Id="WiresharkLegacyDesktopIconCB" Type="CheckBox" X="20" Y="135" Width="180" Height="15" CheckBoxValue="1" Property="WIRESHARK_LEGACY_DESKTOP_ICON" Text="Wireshark Legacy Desktop Icon" />
<Control Id="WiresharkLegacyQuickLaunchIconCB" Type="CheckBox" X="20" Y="153" Width="180" Height="15" CheckBoxValue="1" Property="WIRESHARK_LEGACY_QUICK_LAUNCH_ICON" Text="Wireshark Legacy Quick Launch Icon" />
<Control Id="WiresharkStartMenuCB" Type="CheckBox" X="20" Y="65" Width="180" Height="15" CheckBoxValue="1" Property="WIRESHARK_START_MENU" Text="Wireshark Start Menu Item">
<Condition Action="enable"><![CDATA[&Fe.Wireshark = 3]]></Condition>
<Condition Action="disable"><![CDATA[&Fe.Wireshark <> 3]]></Condition>
</Control>
<Control Id="WiresharkDesktopIconCB" Type="CheckBox" X="20" Y="83" Width="180" Height="15" CheckBoxValue="1" Property="WIRESHARK_DESKTOP_ICON" Text="Wireshark Desktop Icon">
<Condition Action="enable"><![CDATA[&Fe.Wireshark = 3]]></Condition>
<Condition Action="disable"><![CDATA[&Fe.Wireshark <> 3]]></Condition>
</Control>
<Control Id="WiresharkQuickLaunchIconCB" Type="CheckBox" X="20" Y="101" Width="180" Height="15" CheckBoxValue="1" Property="WIRESHARK_QUICK_LAUNCH_ICON" Text="Wireshark Quick Launch Icon">
<Condition Action="enable"><![CDATA[&Fe.Wireshark = 3]]></Condition>
<Condition Action="disable"><![CDATA[&Fe.Wireshark <> 3]]></Condition>
</Control>
<Control Id="WiresharkLegacyStartMenuCB" Type="CheckBox" X="20" Y="117" Width="180" Height="15" CheckBoxValue="1" Property="WIRESHARK_LEGACY_START_MENU" Text="Wireshark Legacy Start Menu Item">
<Condition Action="enable"><![CDATA[&Fe.WiresharkGTK = 3]]></Condition>
<Condition Action="disable"><![CDATA[&Fe.WiresharkGTK <> 3]]></Condition>
</Control>
<Control Id="WiresharkLegacyDesktopIconCB" Type="CheckBox" X="20" Y="135" Width="180" Height="15" CheckBoxValue="1" Property="WIRESHARK_LEGACY_DESKTOP_ICON" Text="Wireshark Legacy Desktop Icon">
<Condition Action="enable"><![CDATA[&Fe.WiresharkGTK = 3]]></Condition>
<Condition Action="disable"><![CDATA[&Fe.WiresharkGTK <> 3]]></Condition>
</Control>
<Control Id="WiresharkLegacyQuickLaunchIconCB" Type="CheckBox" X="20" Y="153" Width="180" Height="15" CheckBoxValue="1" Property="WIRESHARK_LEGACY_QUICK_LAUNCH_ICON" Text="Wireshark Legacy Quick Launch Icon">
<Condition Action="enable"><![CDATA[&Fe.WiresharkGTK = 3]]></Condition>
<Condition Action="disable"><![CDATA[&Fe.WiresharkGTK <> 3]]></Condition>
</Control>
<Control Id="FileExtensions" Type="GroupBox" X="15" Y="180" Width="250" Height="100" Text="File Extensions"/>
<Control Id="FileExtensionsRadio" Type="RadioButtonGroup" X="20" Y="190" Width="235" Height="50" Property="WIRESHARK_FILE_EXTENSIONS">
<RadioButtonGroup Property="WIRESHARK_FILE_EXTENSIONS">
<!--
It doesn't look like RadioButtons can be enabled or disabled:
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/disabling-a-single-RadioButton-td694368.html
-->
<RadioButton Value="0" X="5" Y="5" Height="15" Width="235" Text="Associate trace file extensions to Wireshark" />
<RadioButton Value="1" X="5" Y="20" Height="15" Width="235" Text="Associate trace file extensions to Wireshark Legacy" />
<RadioButton Value="2" X="5" Y="35" Height="15" Width="235" Text="None" />
@ -36,4 +59,4 @@
</Dialog>
</UI>
</Fragment>
</Wix>
</Wix>