Thursday, August 21, 2008

wix with custom screen

Needed to create a custom screen for my wix UI, but I still wanted to use the existing screens as well. This worked well. This shows a custom dialog, button wireup, font setting, ..




<UI Id="UserInterface">
<Property Id="DefaultUIFont" Value="WixUI_Font_Normal" />
<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="WIXUI_INSTALLDIR" Value="INSTALLDIR" />

<DialogRef Id="BrowseDlg" />
<DialogRef Id="DiskCostDlg" />
<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="InstallDirDlg">1</Publish>

<Publish Dialog="InstallDirDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg">1</Publish>
<Publish Dialog="InstallDirDlg" Control="Next" Event="SetTargetPath" Value="[WIXUI_INSTALLDIR]" Order="1">1</Publish>
<Publish Dialog="InstallDirDlg" Control="Next" Event="NewDialog" Value="CustomizeDlg" Order="2">1</Publish>
<Publish Dialog="InstallDirDlg" Control="ChangeFolder" Property="_BrowseProperty" Value="[WIXUI_INSTALLDIR]" Order="1">1</Publish>
<Publish Dialog="InstallDirDlg" Control="ChangeFolder" Event="SpawnDialog" Value="BrowseDlg" Order="2">1</Publish>

<Publish Dialog="CustomizeDlg" Control="Back" Event="NewDialog" Value="InstallDirDlg">1</Publish>
<Publish Dialog="CustomizeDlg" Control="Next" Event="NewDialog" Value="SqlDialog" Order="2"></Publish>

<Publish Dialog="SqlDialog" Control="Back" Event="NewDialog" Value="CustomizeDlg">1</Publish>
<Publish Dialog="SqlDialog" Control="Next" Event="NewDialog" Value="LogonAccountDialog" Order="2"></Publish>
<Dialog Id="SqlDialog" Width="370" Height="270" Title="[ProductName] Setup">
<Control Id="Title" Type="Text" X="15" Y="6" Width="200" Height="15" Transparent="yes" NoPrefix="yes" Text="{\WixUI_Font_Title}ProSolv Database Settings" />
<Control Id="Description" Type="Text" X="25" Y="23" Width="280" Height="15" Transparent="yes" NoPrefix="yes" Text="Specify the database that the ProSolv Server Applications will use." />
<Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="44" TabSkip="no" Text="!(loc.InstallDirDlgBannerBitmap)" />
<Control Id="BannerLine" Type="Line" X="0" Y="44" Width="370" Height="0" />

<Control Id="serverLabel" Type="Text" Height="17" Width="78" X="19" Y="93" Text="Database Server" />
<Control Id="sqlServer" Type="Edit" Height="15" Width="215" X="102" Y="93" Property="SQL_SERVER" />

<Control Id="databaseLabel" Type="Text" Height="17" Width="58" X="19" Y="121" Text="Database" />
<Control Id="sqlDatabase" Type="Edit" Height="15" Width="215" X="102" Y="121" Property="SQL_DATABASE" />

<Control Id="userLabel" Type="Text" Height="17" Width="58" X="19" Y="152" Text="Username" />
<Control Id="sqlUser" Type="Edit" Height="15" Width="215" X="102" Y="152" Property="SQL_USER" />

<Control Id="passLabel" Type="Text" Height="17" Width="58" X="19" Y="183" Text="Password" />
<Control Id="sqlPassword" Type="Edit" Height="15" Width="215" X="102" Y="183" Property="SQL_PASSWORD" Password="yes" />

<Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" />
<Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Text="Next" />
<Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Text="Back" />
<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>
</Dialog>
</UI>

No comments: