WiX Learning - User Interface - Customize Built-in Dialog Set

1.      Specify a licensefile

Set WiX variable “WixUILicenseRtf” to your ownlicense file.

<WixVariable Id=’WixUILicenseRtf’ Value=’[path to license file]’>

 

Tips: WiX linker “light.exe” supportsan argument switch “-b” to add more looking for directories.

         light… -b”[path to directories]” -dWixUILicenseRtf=bobpl.rtf …

 

         There’sa known issue about blank RTF file content in UI, but with 2 workarounds forit.

l  Resave RTF file in WordPad and rebuilt installer.

l  Don’t use WixUI_Minimal dialog set.

2.      Replace texts

All texts displayed in built-in WiX dialog setscan be overridden with custom strings. You can go to WixUI_en-us.wxl in WiX installationfolder to get the whole list of these replaceable string IDs. To override anexpected string, you must specify that string ID in relative .wxl files withcustom text.

<String Id="WelcomeDlgDescription">

This is a custom welcome message.Click Next to continue or Cancel to exit.

</String>

3.      Replace bitmaps

In .wxs file, to specify your own bitmaps forbuilt-in dialogs.

<WixVariableId='WixUIBannerBmp'Value='../Resources/InstallerBanner.bmp' />

 

Variable name

Description

Dimensions

WixUIBannerBmp

Top banner

493 × 58

WixUIDialogBmp

Background bitmap used on the welcome and completion dialogs

493 × 312

WixUIExclamationIco

Exclamation icon on the WaitForCostingDlg

32 × 32

WixUIInfoIco

Information icon on the cancel and error dialogs

32 × 32

WixUINewIco

Button glyph on the BrowseDlg

16 × 16

WixUIUpIco

Button glyph on the BrowseDlg

16 × 16

4.      Insert a customdialog into a built-in dialog set

l  Firstly you need to create the appearance of the custom dialogusing WiX elements.

It’s a good practice to define the customdialog in a separated .wxs file.

<Fragment>

<UI>

  <DialogId=’’ …>

<Control Id="Back" Type="PushButton" …>

  <Publish Event="NewDialog"Value="[WixUI_UserRegistrationDlgBack]">

1

</Publish>

</Control>

<Control Id="Next" Type="PushButton" …>

  <PublishEvent="NewDialog" Value="[WixUI_UserRegistrationDlgNext]">

ProductID

</Publish>

</Control>

  </Dialog>

</UI>

</Fragment>

l  Then in major .wxs file, redefine the UI sequence.

<UIId="MyWixUI_Mondo">

<UIRef Id="WixUI_Mondo" />

<DialogRefId="UserRegistrationDlg" />

<Publish  Dialog="LicenseAgreementDlg"

Control="Next"

Event="NewDialog"

Value="UserRegistrationDlg"

Order="2">LicenseAccepted= "1"

</Publish>

<Publish Dialog="SetupTypeDlg"

Control="Back"

Event="NewDialog"

Value="UserRegistrationDlg">1

</Publish>

<Property Id="WixUI_UserRegistrationDlgBack">

LicenseAgreementDlg

</Property>

<PropertyId="WixUI_UserRegistrationDlgNext">

SetupTypeDlg

</Property>

</UI>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值