websitepanel/WebsitePanel.Installer/Sources/Setup.WIXInstaller/Product.wxs
2015-02-02 23:17:04 +04:00

181 lines
No EOL
12 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<?include Config.wxi?>
<Product Id="*" Name="WebsitePanel" Language="1033" Version="$(var.VERSION)" Manufacturer="Outercurve Foundation"
UpgradeCode="F59D3AED-C1B8-46B4-AFE2-A97F3B7DFB5E">
<Package InstallerVersion="200" Compressed="yes" />
<Media Id="1" EmbedCab="yes" Cabinet="websitepanel.cab" />
<Feature Id="ServerFeature" Title="Server" Level="1" ConfigurableDirectory="INSTALLSERVERFOLDER" AllowAdvertise="no"
Description="WebsitePanel Server is a set of services running on the remote server to be controlled. Server application should be reachable from Enterprise Server one.">
<ComponentGroupRef Id="ServerFiles" />
</Feature>
<Feature Id="EnterpriseServerFeature" Title="Enterprise Server" Level="1" ConfigurableDirectory="INSTALLENTERPRISESERVERFOLDER" AllowAdvertise="no"
Description="Enterprise Server is the heart of WebsitePanel system. It includes all business logic of the application. Enterprise Server should have access to Server and be accessible from Portal applications.">
<ComponentGroupRef Id="EnterpriseServerFiles" />
</Feature>
<Feature Id="PortalFeature" Title="Portal" Level="1" ConfigurableDirectory="INSTALLPORTALFOLDER" AllowAdvertise="no"
Description="WebsitePanel Portal is a control panel itself with user interface which allows managing user accounts, hosting spaces, web sites, FTP accounts, files, etc.">
<ComponentGroupRef Id="PortalFiles" />
</Feature>
<Feature Id="SchedulerServiceFeature" Title="Scheduler Service" Level="1" ConfigurableDirectory="INSTALLSERVICEFOLDER" AllowAdvertise="no"
Description="WebsitePanel scheduler Service">
<ComponentGroupRef Id="SchedulerServiceFiles" />
</Feature>
<Property Id="BannerBitmap">bannrbmp</Property>
<Property Id="PREVIOUSVERSIONSINSTALLED" Secure="yes" />
<Upgrade Id="F59D3AED-C1B8-46B4-AFE2-A97F3B7DFB5E">
<UpgradeVersion
Minimum="1.0.0.0" Maximum="99.0.0.0"
Property="PREVIOUSVERSIONSINSTALLED"
IncludeMinimum="yes" IncludeMaximum="no" />
</Upgrade>
<WixVariable Id="WixUIBannerBmp" Value="bannrbmp.bmp" />
<WixVariable Id="WixUIDialogBmp" Value="dlgbmp.bmp" />
<WixVariable Id="WixUILicenseRtf" Value="License.rtf" />
<WixVariable Id ="BUILDESPATH" Value = "$(var.PROJECTPATH)\Build\$(var.BUILD)\EnterpriseServer" />
<WixVariable Id ="BUILDSPATH" Value = "$(var.PROJECTPATH)\Build\$(var.BUILD)\Server" />
<WixVariable Id ="BUILDPPATH" Value = "$(var.PROJECTPATH)\Build\$(var.BUILD)\Portal" />
<Icon Id="WebSitePanel.ico" SourceFile="WebSitePanel.ico" />
<Property Id="ARPPRODUCTICON" Value="WebSitePanel.ico" />
<Property Id="SERVERNAME" Value="localhost\SQLExpress" />
<Property Id="CONNECTIONSTRING" Value="1" />
<Property Id="DATABASENAME" Value="WebsitePanel" />
<Property Id="AUTHENTICATIONTYPE" Value="Windows Authentication" />
<Binary Id="bannrbmp" SourceFile="bannrbmp.bmp" />
<UI Id="CustomInstaller">
<UIRef Id="WixUI_Mondo" />
<Dialog Id="DatabaseConnectionDlg" Width="370" Height="270" NoMinimize="yes" Title="[ProductName] Setup">
<Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Text="Back">
<Publish Event="NewDialog" Value="InstallLocationDlg">1</Publish>
</Control>
<Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Text="Next">
<Publish Event="DoAction" Value="CheckConnection">1</Publish>
<Publish Event="SpawnDialog" Value="ConnectionWarningDlg">CORRECTCONNECTION = "0"</Publish>
<Publish Event="NewDialog" Value="VerifyReadyDlg">CORRECTCONNECTION = "1"</Publish>
</Control>
<Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Cancel="yes" Text="Cancel">
<Publish Event="SpawnDialog" Value="CancelDlg">1</Publish>
</Control>
<Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="44" TabSkip="no" Text="[BannerBitmap]" />
<Control Id="BannerLine" Type="Line" X="0" Y="44" Width="370" Height="0" />
<Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" />
<Control Id="Description" Type="Text" X="20" Y="23" Width="280" Height="20" Transparent="yes" NoPrefix="yes" Text="Configure WebsitePanel database connection string" />
<Control Id="Title" Type="Text" X="15" Y="6" Width="200" Height="15" Transparent="yes" NoPrefix="yes" Text="{\WixUI_Font_Title}Database connection string" />
<Control Type="Text" Id="ServerLabel" Width="50" Height="17" X="75" Y="68" Text="SQL Server:" />
<Control Type="Edit" Id="ServerEdit" Width="163" Height="15" X="142" Y="68" Property="SERVERNAME" />
<Control Type="Text" Id="AuthenticationLabel" Width="70" Height="17" X="62" Y="94" Text="Authentication:" />
<Control Type="ComboBox" Id="AuthenticationCombo" Width="163" Height="16" X="142" Y="94" Property="AUTHENTICATIONTYPE">
<ComboBox Property="AUTHENTICATIONTYPE">
<ListItem Text="Windows Authentication" Value="Windows Authentication" />
<ListItem Text="SQL Server Authentication" Value="SQL Server Authentication" />
</ComboBox>
</Control>
<Control Type="Text" Id="LoginLabel" Width="50" Height="17" X="71" Y="120" Text="Login Name:" />
<Control Type="Edit" Id="LoginEdit" Width="163" Height="15" X="142" Y="120" Property="LOGIN">
<Condition Action="disable">AUTHENTICATIONTYPE = "Windows Authentication"</Condition>
<Condition Action="enable">NOT(AUTHENTICATIONTYPE = "Windows Authentication")</Condition>
</Control>
<Control Type="Text" Id="PasswordLabel" Width="50" Height="17" X="80" Y="146" Text="Password:" />
<Control Type="Edit" Id="PasswordEdit" Width="163" Height="17" X="142" Y="146" Property="PASSWORD" Hidden="no" Password="yes">
<Condition Action="disable">AUTHENTICATIONTYPE = "Windows Authentication"</Condition>
<Condition Action="enable">NOT(AUTHENTICATIONTYPE = "Windows Authentication")</Condition>
</Control>
<Control Type="Text" Id="DatabaseLabel" Width="50" Height="17" X="80" Y="172" Text="Database:" />
<Control Type="Edit" Id="DatabaseEdit" Width="163" Height="17" X="142" Y="172" Property="DATABASENAME" />
</Dialog>
<Dialog Id="ConnectionWarningDlg" Width="250" Height="85" Title="[ProductName] Setup" NoMinimize="yes">
<Control Id="Ok" Type="PushButton" X="184" Y="60" Width="56" Height="17" Text="Ok">
<Publish Event="EndDialog" Value="Return">1</Publish>
</Control>
<Control Id="Text" Type="Text" X="8" Y="8" Width="221" Height="30">
<Text>Connection not valid.</Text>
</Control>
</Dialog>
<Dialog Id="InstallLocationDlg" Width="370" Height="270" Title="[ProductName] Setup">
<Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Text="Next">
<Publish Event="DoAction" Value="PreInstallationAction">1</Publish>
<Publish Event="NewDialog" Value="DatabaseConnectionDlg" Order="3">SKIPCONNECTIONSTRINGSTEP = "0"</Publish>
<Publish Event="NewDialog" Value="VerifyReadyDlg" Order="3">SKIPCONNECTIONSTRINGSTEP = "1"</Publish>
</Control>
<Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Text="Back">
<Publish Event="NewDialog" Value="LicenseAgreementDlg" Order="3">1</Publish>
</Control>
<Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Cancel="yes" Text="Cancel">
<Publish Event="SpawnDialog" Value="CancelDlg">1</Publish>
</Control>
<Control Id="Description" Type="Text" X="25" Y="23" Width="280" Height="15" Transparent="yes" NoPrefix="yes" Text="Configure Scheduler Service Install location" />
<Control Id="Title" Type="Text" X="15" Y="6" Width="200" Height="15" Transparent="yes" NoPrefix="yes" Text="{\WixUI_Font_Title}Install Location" />
<Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="44" TabSkip="no" Text="[BannerBitmap]" />
<Control Id="BannerLine" Type="Line" X="0" Y="44" Width="370" Height="0" />
<Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" />
<Control Id="FolderLabel" Type="Text" X="20" Y="60" Width="290" Height="30" NoPrefix="yes" Text="Folder Name:" />
<Control Id="Folder" Type="PathEdit" X="22" Y="90" Width="320" Height="15" Property="WIXUI_INSTALLDIR" Indirect="yes" />
</Dialog>
<Publish Dialog="LicenseAgreementDlg" Control="Next" Event="NewDialog" Value="CustomizeDlg" Order="3">
LicenseAccepted = "1"
</Publish>
<Publish Dialog="CustomizeDlg" Control="Back" Event="NewDialog" Value="LicenseAgreementDlg" Order="3">
</Publish>
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="DatabaseConnectionDlg">SKIPCONNECTIONSTRINGSTEP = "0"</Publish>
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="InstallLocationDlg">SKIPCONNECTIONSTRINGSTEP = "1"</Publish>
<TextStyle Id="DlgTitleFont" FaceName="Tahoma" Size="8" Bold="yes" />
</UI>
<InstallExecuteSequence>
<Custom Action="PropertyFinalizeInstall" After='InstallValidate'/>
<Custom Action="FinalizeUnInstall" After="InstallValidate">(NOT UPGRADINGPRODUCTCODE) AND (REMOVE="ALL")</Custom>
<RemoveExistingProducts After="InstallValidate" />
<Custom Action='FinalizeInstall' After='InstallFiles' >NOT Installed or REINSTALL</Custom>
</InstallExecuteSequence>
</Product>
<Fragment>
<CustomAction Id="CheckConnection" BinaryKey="CheckConnection.CA" DllEntry="CheckConnection" />
<Binary Id="CheckConnection.CA" SourceFile="bin\WebsitePanel.WIXInstaller.CA.dll" />
</Fragment>
<Fragment>
<!-- immediate CA -->
<CustomAction Id='PropertyFinalizeInstall' Property='FinalizeInstall' Value='ConnectionString=[CONNECTIONSTRING];PreviousConnectionString=[PREVIOUSCONNECTIONSTRING];ServiceFolder=[SERVICEFOLDER];PreviousCryptoKey=[PREVIOUSCRYPTOKEY]' Return="check"/>
<!-- deferred CA -->
<CustomAction Id='FinalizeInstall' BinaryKey ='CheckConnection.CA' DllEntry='FinalizeInstall' Impersonate='no' Execute='deferred' Return='check' HideTarget='yes'/>
<!--<CustomAction Id="FinalizeInstall" BinaryKey="CheckConnection.CA" DllEntry="FinalizeInstall" />-->
</Fragment>
<Fragment>
<CustomAction Id="PreInstallationAction" BinaryKey="CheckConnection.CA" DllEntry="PreInstallationAction" />
<CustomAction Id="FinalizeUnInstall" BinaryKey="CheckConnection.CA" DllEntry="FinalizeUnInstall" />
<CustomAction Id='AlreadyUpdated' Error='Product has already been updated to $(var.VERSION) or newer.' />
<CustomAction Id='NoDowngrade' Error='A later version of [ProductName] is already installed.' />
</Fragment>
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="WEBSITEPANELDIR" Name="WebsitePanel">
<Directory Id="INSTALLSERVICEFOLDER" Name="SchedulerService" />
<Directory Id="INSTALLSERVERFOLDER" Name="Server" />
<Directory Id="INSTALLENTERPRISESERVERFOLDER" Name="Enterprise Server" />
<Directory Id="INSTALLPORTALFOLDER" Name="Portal" />
</Directory>
</Directory>
</Fragment>
</Wix>