And here comes the real magic. WixUI has five different flavors, depending on how sophisticated you want your user interface to be:
*Note that if you use the WixUI_Minimal dialog set, you'll have to provide an extra property somewhere in your source:
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR" />
In order to get a full user interface, all we have to do is to add two lines to include the WixUI interface library into our project:
<UIRef Id="WixUI_Mondo" /> <UIRef Id="WixUI_ErrorProgressText" />
The first reference includes the appropriate user interface library but it doesn't automatically use the localized (or modified, in case of English) error and action texts in the language files. Without the second reference, the installer package will be slightly smaller and will use the stock messages inside Windows Installer.
And, finally, we finish it just like in our earlier samples:
<Icon Id="Foobar10.exe" SourceFile="FoobarAppl10.exe" /> </Product> </Wix>
All the user interface variants come in a common precompiled library. We simply link against this extension library using the command line switch we have already mentioned. When working inside an integrated development environment, we have to add a reference to this library to achieve the same effect.
candle.exe SampleWixUI.wxs light.exe -ext WixUIExtension SampleWixUI.wixobj
You can customize some visual aspects of the user interface by simply providing replacement files. The default ones reside inside the toolset but you're allowed to create your own replacement bitmaps, icons and license text there. You can also replace selected files, not all of them. Their paths are stored in variables that you can specify either on the command line or directly in the source code:
<WixVariable Id="WixUILicenseRtf" Value="path\License.rtf" /> <WixVariable Id="WixUIBannerBmp" Value="path\banner.bmp" /> <WixVariable Id="WixUIDialogBmp" Value="path\dialog.bmp" /> <WixVariable Id="WixUIExclamationIco" Value="path\exclamation.ico" /> <WixVariable Id="WixUIInfoIco" Value="path\information.ico" /> <WixVariable Id="WixUINewIco" Value="path\new.ico" /> <WixVariable Id="WixUIUpIco" Value="path\up.ico" />
Their meaning and details are: