summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraliasgar16 <aliasgar.batterywala@msystechnologies.com>2016-11-29 16:06:43 +0530
committeraliasgar16 <aliasgar.batterywala@msystechnologies.com>2016-12-09 19:40:30 +0530
commitc28618eee936a6a104c6d421e1c91f6ac9cc8dae (patch)
tree0be33f207b9b92061c37678d1b373eb16df7f19e
parent85f5dd657ab7370c7cca4fbfaea5970cbd8719dd (diff)
downloadchef-c28618eee936a6a104c6d421e1c91f6ac9cc8dae.tar.gz
Embedded and modified WixUI_FeatureTree module in Chef's WIX config as per the requirement for Chef_Service_Options.
Signed-off-by: aliasgar16 <aliasgar.batterywala@msystechnologies.com>
-rw-r--r--omnibus/resources/chef/msi/localization-en-us.wxl.erb6
-rw-r--r--omnibus/resources/chef/msi/source.wxs.erb63
-rw-r--r--omnibus/resources/chef/msi/source_ui.wxs.erb95
3 files changed, 130 insertions, 34 deletions
diff --git a/omnibus/resources/chef/msi/localization-en-us.wxl.erb b/omnibus/resources/chef/msi/localization-en-us.wxl.erb
index 00e9e254b2..0c2fde53bc 100644
--- a/omnibus/resources/chef/msi/localization-en-us.wxl.erb
+++ b/omnibus/resources/chef/msi/localization-en-us.wxl.erb
@@ -16,15 +16,15 @@
<String Id="VerifyReadyDlgInstallTitle">{\WixUI_Font_Title_White}Ready to install [ProductName]</String>
- <!-- Schedule Task -->
- <String Id="SchTaskDisplayName"><%= friendly_name %> Schedule Task</String>
+ <!-- Scheduled Task -->
+ <String Id="SchTaskDisplayName"><%= friendly_name %> Scheduled Task</String>
<String Id="SchTaskDescription">Schedule <%= friendly_name %> to run at a pre-defined time intervals.</String>
<!-- Service -->
<!-- Keep these in sync with the name and description in chef-service-manager -->
<String Id="ServiceDisplayName"><%= friendly_name %> Service</String>
<String Id="ServiceDescription">Runs <%= friendly_name %> on regular, configurable intervals.</String>
<String Id="FeatureMainName"><%= friendly_name %></String>
- <String Id="FeatureSchTaskName"><%= friendly_name %> Schedule Task</String>
+ <String Id="FeatureSchTaskName"><%= friendly_name %> Scheduled Task</String>
<String Id="FeatureServiceName"><%= friendly_name %> Service</String>
<String Id="FeaturePSModuleName"><%= friendly_name %> PowerShell wrappers</String>
diff --git a/omnibus/resources/chef/msi/source.wxs.erb b/omnibus/resources/chef/msi/source.wxs.erb
index 3d2692903f..f7f645cc74 100644
--- a/omnibus/resources/chef/msi/source.wxs.erb
+++ b/omnibus/resources/chef/msi/source.wxs.erb
@@ -28,6 +28,8 @@
<Media Id="1" Cabinet="ChefClient.cab" EmbedCab="yes" CompressionLevel="high" />
+ <Property Id="CHEF_SERVICE_OPTIONS_RADIO_BUTTON_GROUP" Value="None" />
+
<!--
Uncomment launch condition below to check for minimum OS
601 = Windows 7/Server 2008R2.
@@ -69,7 +71,7 @@
<CustomAction Id="CreateChefClientScheduledTask"
Directory="TARGETDIR"
- ExeCommand="&quot;[SystemFolder]SCHTASKS.EXE&quot; /CREATE /TN &quot;ChefClientSchTask&quot; /SC &quot;MINUTE&quot; /MO &quot;20&quot; /F /TR &quot;cmd /c \&quot;[RubyExecutable] [ChefClientPath]\chef-client -L [ChefClientLog]\chef-client.log -c [CONFIGLOCATION]\client.rb\&quot;&quot; /RU &quot;NT Authority\System&quot; /RP /RL &quot;HIGHEST&quot; /ST &quot;<% (Time.now + 60 * 30).strftime('%H:%M') -%>&quot;"
+ ExeCommand="&quot;[SystemFolder]SCHTASKS.EXE&quot; /CREATE /TN &quot;ChefClientSchTask&quot; /SC &quot;MINUTE&quot; /MO &quot;30&quot; /F /TR &quot;cmd /c \&quot;[RubyExecutable] [ChefClientPath]\chef-client -L [ChefClientLog]\chef-client.log -c [CONFIGLOCATION]\client.rb\&quot;&quot; /RU &quot;NT Authority\System&quot; /RP /RL &quot;HIGHEST&quot; /ST &quot;<% (Time.now + 60 * 30).strftime('%H:%M') -%>&quot;"
Execute="deferred"
Impersonate="no"
Return="check" />
@@ -79,28 +81,29 @@
ExeCommand="&quot;[SystemFolder]SCHTASKS.EXE&quot; /DELETE /TN &quot;ChefClientSchTask&quot; /F"
Execute="deferred"
Impersonate="no"
- Return="check" />
+ Return="ignore" />
<CustomAction Id="RemoveChefClientService"
Directory="TARGETDIR"
ExeCommand="&quot;[SystemFolder]SC.EXE&quot; DELETE &quot;chef-client&quot;"
Execute="deferred"
Impersonate="no"
- Return="check" />
+ Return="ignore" />
<InstallExecuteSequence>
<Custom Action="FastUnzip" After="InstallFiles">NOT Installed</Custom>
<Custom Action="Cleanup" After="RemoveFiles">REMOVE~="ALL"</Custom>
+
<Custom Action="CreateChefClientScheduledTask" After="InstallFiles">
- <![CDATA[(NOT Installed) AND &ChefSchTaskFeature=3]]>
+ <![CDATA[&ChefSchTaskFeature=3]]>
</Custom>
<Custom Action="RemoveChefClientScheduledTask" Before="RemoveFiles">
- <![CDATA[Installed AND (&None=3 OR &ChefServiceFeature=3)]]>
+ <![CDATA[(Installed AND (&NoneFeature=3 OR &ChefServiceFeature=3)) OR (REMOVE="ALL")]]>
</Custom>
<Custom Action="RemoveChefClientService" Before="RemoveFiles">
- <![CDATA[Installed AND (&None=3 OR &ChefSchTaskFeature=3)]]>
+ <![CDATA[Installed AND (&NoneFeature=3 OR &ChefSchTaskFeature=3) OR (REMOVE="ALL")]]>
</Custom>
</InstallExecuteSequence>
@@ -167,6 +170,16 @@
</Directory>
</Directory>
</Directory>
+ <Directory Id="ChefSchTaskFeatureTempDir">
+ <Component Id="ChefSchTask" Guid="{7f9f917a-952c-41d8-baa1-037269eecb50}">
+ <CreateFolder />
+ </Component>
+ </Directory>
+ <Directory Id="NoneFeatureTempDir">
+ <Component Id="None" Guid="{d8f3eba5-cecb-436c-a4ef-540dba3c5ccf}">
+ <CreateFolder />
+ </Component>
+ </Directory>
</Directory>
</Directory>
@@ -184,16 +197,22 @@
</Feature>
<Feature Id="ChefServiceOptions" Title="Chef Service Options" Level="1000" AllowAdvertise="no">
- <Feature Id="ChefSchTaskFeature" Title="!(loc.FeatureSchTaskName)" Level="1000" AllowAdvertise="no">
- <!--CustomAction will get executed and scheduled task for chef-client will get created-->
+ <Feature Id="ChefSchTaskFeature" Title="!(loc.FeatureSchTaskName)" Level="1000" AllowAdvertise="no" Display="hidden">
+ <!-- Here, CustomAction will get executed and scheduled task for chef-client will get created -->
+
+ <!-- This is an empty component to keep track of the feature -->
+ <ComponentRef Id="ChefSchTask" />
</Feature>
- <Feature Id="ChefServiceFeature" Title="!(loc.FeatureServiceName)" Level="1000" AllowAdvertise="no">
+ <Feature Id="ChefServiceFeature" Title="!(loc.FeatureServiceName)" Level="1000" AllowAdvertise="no" Display="hidden">
<ComponentRef Id="ChefClientService" />
</Feature>
- <Feature Id="None" Title="None" Level="1000" AllowAdvertise="no">
- <!--Do Nothing-->
+ <Feature Id="NoneFeature" Title="None" Level="1000" AllowAdvertise="no" Display="hidden">
+ <!-- Do Nothing -->
+
+ <!-- This is an empty component to keep track of the feature -->
+ <ComponentRef Id="None" />
</Feature>
</Feature>
@@ -208,27 +227,9 @@
<!--
UI Stuff
-->
- <Icon Id="oc.ico" SourceFile="Resources\assets\oc_16x16.ico"/>
- <Property Id="ARPPRODUCTICON" Value="oc.ico" />
- <Property Id="ARPHELPLINK" Value="http://www.getchef.com/support/" />
- <Property Id="WIXUI_INSTALLDIR" Value="INSTALLLOCATION" />
-
- <UIRef Id="ChefClientUI_InstallDir"/>
- <UI Id="ChefClientUI_InstallDir">
- <UIRef Id="WixUI_FeatureTree"/>
- <TextStyle Id="WixUI_Font_Normal_White" FaceName="Tahoma" Size="8" Red="255" Green="255" Blue="255" />
- <TextStyle Id="WixUI_Font_Bigger_White" FaceName="Tahoma" Size="12" Red="255" Green="255" Blue="255" />
- <TextStyle Id="WixUI_Font_Title_White" FaceName="Tahoma" Size="9" Bold="yes" Red="255" Green="255" Blue="255" />
+ <UI>
+ <UIRef Id="ChefClientUI_InstallDir" />
</UI>
- <WixVariable Id="WixUILicenseRtf" Value="Resources\assets\LICENSE.rtf" />
- <WixVariable Id="WixUIDialogBmp" Value="Resources\assets\dialog_background.bmp" />
- <WixVariable Id="WixUIBannerBmp" Value="Resources\assets\banner_background.bmp" />
-
- <WixVariable Id="WixUIExclamationIco" Value="Resources\assets\oc_32x32.ico" />
- <WixVariable Id="WixUIInfoIco" Value="Resources\assets\oc_32x32.ico" />
- <WixVariable Id="WixUINewIco" Value="Resources\assets\oc_16x16.ico" />
- <WixVariable Id="WixUIUpIco" Value="Resources\assets\oc_16x16.ico" />
-
</Product>
</Wix>
diff --git a/omnibus/resources/chef/msi/source_ui.wxs.erb b/omnibus/resources/chef/msi/source_ui.wxs.erb
new file mode 100644
index 0000000000..7f1d0129f2
--- /dev/null
+++ b/omnibus/resources/chef/msi/source_ui.wxs.erb
@@ -0,0 +1,95 @@
+<?xml version='1.0'?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
+
+ <Fragment>
+ <Icon Id="oc.ico" SourceFile="assets\oc_16x16.ico"/>
+ <Property Id="ARPPRODUCTICON" Value="oc.ico" />
+ <Property Id="ARPHELPLINK" Value="http://www.getchef.com/support/" />
+ <Property Id="WIXUI_INSTALLDIR" Value="INSTALLLOCATION" />
+
+ <UI Id="ChefClientUI_InstallDir">
+ <!-- WixUI_FeatureTree module's code embedded and modified here as per the requirement -->
+ <TextStyle Id="WixUI_Font_Normal_White" FaceName="Tahoma" Size="8" Red="255" Green="255" Blue="255" />
+ <TextStyle Id="WixUI_Font_Bigger_White" FaceName="Tahoma" Size="12" Red="255" Green="255" Blue="255" />
+ <TextStyle Id="WixUI_Font_Title_White" FaceName="Tahoma" Size="9" Bold="yes" Red="255" Green="255" Blue="255" />
+ <TextStyle Id="WixUI_Font_Normal" FaceName="Tahoma" Size="8" />
+ <TextStyle Id="WixUI_Font_Bigger" FaceName="Tahoma" Size="12" />
+ <TextStyle Id="WixUI_Font_Title" FaceName="Tahoma" Size="9" Bold="yes" />
+
+ <Property Id="DefaultUIFont" Value="WixUI_Font_Normal" />
+ <Property Id="WixUI_Mode" Value="FeatureTree" />
+
+ <DialogRef Id="ErrorDlg" />
+ <DialogRef Id="FatalError" />
+ <DialogRef Id="FilesInUse" />
+ <DialogRef Id="MsiRMFilesInUse" />
+ <DialogRef Id="PrepareDlg" />
+ <DialogRef Id="ProgressDlg" />
+ <DialogRef Id="ResumeDlg" />
+ <DialogRef Id="UserExit" />
+
+ <Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999">1</Publish>
+
+ <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="LicenseAgreementDlg">NOT Installed</Publish>
+ <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg">Installed AND PATCH</Publish>
+
+ <Publish Dialog="LicenseAgreementDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg">1</Publish>
+ <Publish Dialog="LicenseAgreementDlg" Control="Next" Event="NewDialog" Value="CustomizeDlg">LicenseAccepted = "1"</Publish>
+
+ <Publish Dialog="CustomizeDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg" Order="1">Installed</Publish>
+ <Publish Dialog="CustomizeDlg" Control="Back" Event="NewDialog" Value="LicenseAgreementDlg" Order="2">NOT Installed</Publish>
+
+ <Publish Dialog="CustomizeDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg"><![CDATA[((NOT &ChefServiceOptions=3) AND NOT ((?ChefSchTask=3) OR (?ChefClientService=3) OR (?None=3)))]]></Publish>
+
+ <Publish Dialog="CustomizeDlg" Control="Next" Event="NewDialog" Value="ChefServiceOptionSelectionDlg"><![CDATA[((&ChefServiceOptions=3) OR (?ChefSchTask=3 OR ?ChefClientService=3 OR ?None=3))]]></Publish>
+
+ <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="CustomizeDlg" Order="1"><![CDATA[NOT &ChefServiceOptions=3]]> AND (NOT Installed OR WixUI_InstallMode = "Change")</Publish>
+ <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="ChefServiceOptionSelectionDlg" Order="1"><![CDATA[&ChefServiceOptions=3]]> AND (NOT Installed OR WixUI_InstallMode = "Change")</Publish>
+ <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg" Order="2">Installed AND NOT PATCH</Publish>
+ <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg" Order="3">Installed AND PATCH</Publish>
+
+ <Publish Dialog="MaintenanceWelcomeDlg" Control="Next" Event="NewDialog" Value="MaintenanceTypeDlg">1</Publish>
+
+ <Publish Dialog="MaintenanceTypeDlg" Control="ChangeButton" Event="NewDialog" Value="CustomizeDlg">1</Publish>
+ <Publish Dialog="MaintenanceTypeDlg" Control="RepairButton" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
+ <Publish Dialog="MaintenanceTypeDlg" Control="RemoveButton" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
+ <Publish Dialog="MaintenanceTypeDlg" Control="Back" Event="NewDialog" Value="MaintenanceWelcomeDlg">1</Publish>
+
+
+ <Dialog Id ="ChefServiceOptionSelectionDlg" Width ="270" Height ="130" Title ="Chef Service Options" NoMinimize ="no">
+ <Control Id="optionsRadioGroup" Type="RadioButtonGroup" Property="CHEF_SERVICE_OPTIONS_RADIO_BUTTON_GROUP" Height="80" Width="140" X="20" Y="15">
+ <RadioButtonGroup Property="CHEF_SERVICE_OPTIONS_RADIO_BUTTON_GROUP">
+ <RadioButton Value="SchTask" Text="Chef Client Scheduled Task" Height="17" Width="140" X="0" Y="0" />
+ <RadioButton Value="Service" Text="Chef Client Service" Height="17" Width="140" X="0" Y="20" />
+ <RadioButton Value="None" Text="None" Height="17" Width="140" X="0" Y="40" />
+ </RadioButtonGroup>
+ </Control>
+
+ <Control Id="Back" Type="PushButton" X="20" Y="95" Width="56" Height="17" Default="no" Text="Back">
+ <Publish Event="NewDialog" Value="CustomizeDlg">1</Publish>
+ </Control>
+ <Control Id="Next" Type="PushButton" X="90" Y="95" Width="56" Height="17" Default="yes" Text="Next">
+ <Publish Event="AddLocal" Value="ChefSchTaskFeature">CHEF_SERVICE_OPTIONS_RADIO_BUTTON_GROUP = "SchTask"</Publish>
+ <Publish Event="AddLocal" Value="ChefServiceFeature">CHEF_SERVICE_OPTIONS_RADIO_BUTTON_GROUP = "Service"</Publish>
+ <Publish Event="AddLocal" Value="NoneFeature">CHEF_SERVICE_OPTIONS_RADIO_BUTTON_GROUP = "None"</Publish>
+ <Publish Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
+ </Control>
+ <Control Id="Cancel" Type="PushButton" X="160" Y="95" Width="56" Height="17" Default="no" Text="Cancel" Cancel="yes">
+ <Publish Event="SpawnDialog" Value="CancelDlg">1</Publish>
+ </Control>
+ </Dialog>
+
+ </UI>
+
+ <UIRef Id="WixUI_Common" />
+
+ <WixVariable Id="WixUILicenseRtf" Value="assets\LICENSE.rtf" />
+ <WixVariable Id="WixUIDialogBmp" Value="assets\dialog_background.bmp" />
+ <WixVariable Id="WixUIBannerBmp" Value="assets\banner_background.bmp" />
+
+ <WixVariable Id="WixUIExclamationIco" Value="assets\oc_32x32.ico" />
+ <WixVariable Id="WixUIInfoIco" Value="assets\oc_32x32.ico" />
+ <WixVariable Id="WixUINewIco" Value="assets\oc_16x16.ico" />
+ <WixVariable Id="WixUIUpIco" Value="assets\oc_16x16.ico" />
+ </Fragment>
+</Wix>