diff options
Diffstat (limited to 'omnibus/resources/chefdk/msi/source.wxs.erb')
-rw-r--r-- | omnibus/resources/chefdk/msi/source.wxs.erb | 177 |
1 files changed, 177 insertions, 0 deletions
diff --git a/omnibus/resources/chefdk/msi/source.wxs.erb b/omnibus/resources/chefdk/msi/source.wxs.erb new file mode 100644 index 0000000000..6ba97460ee --- /dev/null +++ b/omnibus/resources/chefdk/msi/source.wxs.erb @@ -0,0 +1,177 @@ +<?xml version="1.0" encoding="utf-8"?> +<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"> + + <!-- This is how we include wxi files --> + <?include "parameters.wxi" ?> + + <!-- + Id="*" is to enable upgrading. * means that the product ID will be autogenerated on each build. + Name is made of localized product name and version number. + --> + <Product Id="*" Name="!(loc.ProductName) v$(var.DisplayVersionNumber)" Language="!(loc.LANG)" + Version="$(var.VersionNumber)" Manufacturer="!(loc.ManufacturerName)" UpgradeCode="$(var.UpgradeCode)"> + + <!-- + Minimum installer version (2.0) - Window XP and above. + The install scope is per machine, not the current user + --> + <Package InstallerVersion="200" InstallPrivileges="elevated" + Compressed="yes" InstallScope="perMachine" /> + + <Media Id="1" Cabinet="ChefClient.cab" EmbedCab="yes" CompressionLevel="high" /> + + <!-- + Uncomment launch condition below to check for minimum OS + 601 = Windows 7/Server 2008R2. + --> + <!-- Condition Message="!(loc.MinimumOSVersionMessage)"> + <![CDATA[Installed OR VersionNT >= 601]]> + </Condition --> + + <!-- We always do Major upgrades --> + <MajorUpgrade DowngradeErrorMessage="!(loc.DowngradeErrorMessage)" /> + + <!-- + If fastmsi is set, custom actions will be invoked during install to unzip + project files, and during uninstall to remove the project folder + --> + <% if fastmsi %> + <SetProperty Id="FastUnzip" + Value="FASTZIPDIR=[INSTALLLOCATION];FASTZIPAPPNAME=chefdk" + Sequence="execute" + Before="FastUnzip" /> + + <CustomAction Id="FastUnzip" + BinaryKey="CustomActionFastMsiDLL" + DllEntry="FastUnzip" + Execute="deferred" + Impersonate="no" + Return="check" /> + + <Binary Id="CustomActionFastMsiDLL" + SourceFile="CustomActionFastMsi.CA.dll" /> + + <CustomAction Id="Cleanup" + Directory="INSTALLLOCATION" + ExeCommand="cmd /C "rd /S /Q chefdk"" + Execute="deferred" + Impersonate="no" + Return="ignore" /> + + <InstallExecuteSequence> + <Custom Action="FastUnzip" After="InstallFiles">NOT Installed</Custom> + <Custom Action="Cleanup" After="RemoveFiles">REMOVE~="ALL"</Custom> + </InstallExecuteSequence> + + <UI> + <ProgressText Action="FastUnzip">!(loc.FileExtractionProgress)</ProgressText> + </UI> + <% end %> + + <CustomActionRef Id="WixBroadcastSettingChange" /> + <CustomActionRef Id="WixBroadcastEnvironmentChange" /> + + <Directory Id="TARGETDIR" Name="SourceDir"> + <Directory Id="WindowsVolume"> + <Directory Id="INSTALLLOCATION" Name="opscode"> + <Directory Id="PROJECTLOCATION" Name="chefdk" > + <Directory Id="PROJECTLOCATIONBIN" Name="bin" > + <Component Id="ChefDkPath" Guid="{AEA5727E-DAD2-48CC-ADB8-38DD0EB46C62}" > + <Environment Id="Environment" + Name="PATH" Action="set" Part="last" System="yes" Value="[PROJECTLOCATIONBIN]" /> + </Component> + <Component Id="StartChefDk" Guid="{A8378BA1-85D7-4F11-B1C0-52BF84B4730A}" > + <File Id="StartChefDkScript" Source="Resources\assets\start-chefdk.ps1" KeyPath="yes" /> + </Component> + </Directory> + <Directory Id="PSMODULES" Name="modules" > + <Component Id="ChefPSModulePath" Guid="{DCD34ACB-7DAF-481F-B36F-8CD27AB5028D}" > + <Environment Id="ChefPSModulePathEnvironment" + Name="PSModulePath" Action="set" Part="last" System="yes" Value="[PSMODULES]" /> + </Component> + </Directory> + <Directory Id="EMBEDDED" Name="embedded" > + <Directory Id="EMBEDDEDBIN" Name="bin" > + <Component Id="ChefDkEnvHacks" Guid="{830aa603-a412-437f-87c6-d0cb88ebdd40}" > + <Environment Id="EnvHacksEnvironment" + Name="CHEFDK_ENV_FIX" Action="set" System="yes" Value="1" /> + </Component> + </Directory> + </Directory> + </Directory> + </Directory> + </Directory> + + <Directory Id="ProgramMenuFolder"> + <Component Id="StartMenuShortcut" Guid="{6DD3FFF3-E009-40E7-B1C2-EF606B941CCD}"> + <Shortcut Id="StartMenuShortcutDef" + Name="!(loc.ChefDkShortcutDefName)" + Description="!(loc.ChefDkShortcutDefDescription)" + Target="[WindowsFolder]\System32\WindowsPowerShell\v1.0\powershell.exe" + Arguments="-ExecutionPolicy Bypass -File [#StartChefDkScript]" + Icon="oc.ico"/> + </Component> + </Directory> + + <Directory Id="DesktopFolder" Name="Desktop"> + <Component Id="DesktopShortcut" Guid="{396E22A6-A7B6-4AA1-B63C-83A3DD7007A8}"> + <Shortcut Id="DesktopShortcutDef" + Name="!(loc.ChefDkShortcutDefName)" + Description="!(loc.ChefDkShortcutDefDescription)" + Target="[WindowsFolder]\System32\WindowsPowerShell\v1.0\powershell.exe" + Arguments="-ExecutionPolicy Bypass -File [#StartChefDkScript]" + Icon="oc.ico"/> + </Component> + </Directory> + </Directory> + + <!-- Set the components defined in our fragment files that will be used for our feature --> + <Feature Id="ChefDkFeature" Title="!(loc.FeatureMainName)" Absent="disallow" AllowAdvertise="no" Level="1" ConfigurableDirectory="INSTALLLOCATION"> + <ComponentGroupRef Id="ProjectDir" /> + <ComponentRef Id="ChefDkPath" /> + <ComponentRef Id="ChefPSModulePath" /> + </Feature> + + <Feature Id="ChefDkStartMenuShortcutFeature" Title="!(loc.FeatureChefDkStartMenuShortcut)" Description="!(loc.FeatureChefDkStartMenuShortcutDescription)" Level="1" AllowAdvertise="no" > + <ComponentRef Id="StartChefDk" /> + <ComponentRef Id="StartMenuShortcut" /> + </Feature> + + <Feature Id="ChefDkDesktopShortcutFeature" Title="!(loc.FeatureChefDkDesktopShortcut)" Description="!(loc.FeatureChefDkDesktopShortcutDescription)" Level="1" AllowAdvertise="no" > + <ComponentRef Id="StartChefDk" /> + <ComponentRef Id="DesktopShortcut" /> + </Feature> + + <Feature Id="ChefDkEnvHacks" Title="!(loc.FeatureChefDkEnvHacks)" Description="!(loc.FeatureChefDkEnvHacksDesc)" Level="1000" AllowAdvertise="no"> + <ComponentRef Id="ChefDkEnvHacks" /> + </Feature> + + <!-- + UI Stuff + --> + <Icon Id="oc16.ico" SourceFile="Resources\assets\oc_16x16.ico"/> + <Icon Id="oc32.ico" SourceFile="Resources\assets\oc_32x32.ico"/> + <Icon Id="oc.ico" SourceFile="Resources\assets\oc.ico"/> + <Property Id="ARPPRODUCTICON" Value="oc16.ico" /> + <Property Id="ARPHELPLINK" Value="http://www.getchef.com/support/" /> + <Property Id="WIXUI_INSTALLDIR" Value="INSTALLLOCATION" /> + + <UIRef Id="ChefDkUI_InstallDir"/> + <UI Id="ChefDkUI_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> + + <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> |